Leaflet Routing Machine || Open Source Routing service || GeoDev
HTML-код
- Опубликовано: 8 фев 2025
- Leaflet routing machine GitHub: github.com/per...
Source code: github.com/iam...
#leafletjs #routing #location #opensource #trackLocation #locate
----------------------------------------------------------------------------------------
Here are some playlists that you might interested with:
----------------------------------------------------------------------------------------
1. Leaflet from basic to advance: • Leaflet from basic to ...
2. GeoServer with leaflet web-GIS: • GeoServer and Leaflet ...
3. GeoDjango project: • Bookmark note on map |...
4. geoserver-rest: • geoserver-rest
5. GIS training in Nepali: • Beginner GIS training ...
6. LULC map production: • LandUse Land Cover Map...
7. Geospatial analysis with python: • GeoSpatial analysis wi...
8. GeoNode from basic to advance: • GeoNode from basic to ...
--------------------------------------------------------------------------------------------------------------
Check out my courses at the discounted price from the below link:
--------------------------------------------------------------------------------------------------------------
1. "Geospatial data analysis with python": www.udemy.com/...
2. "Web GIS Development 2021": www.udemy.com/...
3. "Web mapping and Web-GIS from Dev to Deploy 2021: GeoDjango": www.udemy.com/...
4. "Introduction to Web Mapping and Web GIS 2020: GeoDjango": www.udemy.com/...
---------------------------------------------------------------------------------------------------
Follow me on GitHub: github.com/iam...
Follow me on Twitter: / iamtekson
Follow me on Instagram: / iamtekson
-----------------------------------------------------------------------------------------------------
Bravo e grazie. Io seguo sempre i tuoi corsi ---- Bravo and thanks. I always take and follows your videos
Thanks Aldo, Your word inspire me to create more fruitful contents.
Very good video thanks dude.
You are welcome!
Very good video thanks Bro 👍👍
Thank you too
This is so much valuable thank you so much
Dhanyabaad Daaju💖
You are welcome!
Like it with python roadmap..!
What do you mean by python roadmap?
This is so helpful, thank you 🙌
Glad it was helpful!
amazing content bro
Appreciate it
great tutorial, please how to use it on a mobile phone ?
I think you can run this function on mobile browser as well. No extra setup is needed for that.
Hi man i have watched most of your videos but this one is the most relevant for me. I'm working on my thesis and i have learnt some things thanks to your videos. I want to ask you if there is a way we can change this code for finding the shortest path via walking and not driving. Thanks in advance
thank u so much.
You are most welcome
Hi! Thank you for this Tutorial it helps for our thesis. It very helpful. Is it possible to click only the route , it cannot click on mountains and oceans.
nice
Thanks
How can you set the taxi travel time from point A to B that should be equal to the estimated time.? If estimated time is 2mins..then the taxi should move and arrive 2mins to the destination.
That logic can be implemented by some mathematical logics.
Sir please make a video to how we can identifying forest fire prone zone in arcgis
That's a great suggestion. I will try to make it publish soon. Thanks!
Hi, thanks for amazing code.
How to change icon A/B or remove it ?
Thanks again
You can remove the marker by map.removeLayer(marker)
Thanks ;) It is possible to plan a route with many points in a leaflet?
Yes, possible. Please check this resource: www.liedman.net/leaflet-routing-machine/tutorials/interaction/
Thanks for making this, quick one...what if you routing a river?
To route a river, you need a river network dataset and somehow need to publish it before designing the webapp.
Very good job, where can I complement this information, with the vehicle icon, follow the route in the direction, make the turns and continue following the route?
Thank you!!
You are welcome
Is this routing option still good for production? The console says this is OSRM's demo server and is not suitable for production. I want to use this routing option but don't know how to set up my own OSRM server for it. Maybe an updated video about that could help, thanks!
I think you can use this for the production. There are lots of source of geocoding API. you can use the suitable one from here: www.liedman.net/leaflet-routing-machine/tutorials/geocoders/
Will you make a Taxi map , real time update location.
I think, I already cover how to update real time location. Here is the video reference: ruclips.net/video/8KX4_4NK7ZY/видео.html
is it possible to increase the gap between each move? like each jump is 10% of the total route distance
I think it is possible but I haven't tested with it. You can try to skip some of the geolocations or increase the speed of the market moving
Nice video. Can I use this leaflet map and routing in the android app for commercial purposes? without taking google maps API?
Yes, absolutely you can. I always recommend and support to use the open source solutions.
Nice Video, very helpful! Can I change the marker of the start and end point of the routing machine? (like color or something)
Yes, of course you can. You need to add the icon for both markers.
Can this project be linked to Database?
It displays the path of the person when he walks like an Uber and be real time
gracias
You are welcome!
Nice Video. Do you know how to change the Itineraty Layer to Another local?
Sorry I didn't get you.
Super
Thank you!
Thanks for making this video. It's very helpful. Is it possible to add a pause/stop while the car is moving? Like if I click on the car icon, the car stops and if I click back on the icon, it resumes until it gets to the final destination.
Yes, that can be done. But for that you need to add two more enentlistner in your javascript code.
Can we add number of waypoints from source to destination?? Also can we customize the waypoints as per our requirements???
Yes, if you know the waypoints. You can update it simply by just appending the waypoints to the response from leaflet routing machine.
Is there any way same can be made for railway route
Yes, you can, but not with the same way. The current route is generated using OSM routes. If you want to generate the new route, you need to add that route in your OSM or in your backend server.
hi i would like to know how to add route positions on the map and display them when using routing
Good Job, You Master, Leaft or openstreet hace geofencing?
Thank you!
hello, I have this problem and I have put the code the same.
Uncaught TypeError: Cannot read properties from undefined (reading 'control')
Looks like plugin issue. Please check whether your links are correct or not. And please try to debug based on the line number given in error msz.
@@geodevThank you
i love you bro
How to get multiple routes, I always get only 'the best' route? I want to display at least 2-3 routes to user even if they are longer, so he can pick the one he wants. Any help?
By default, the routing engine for leaflet router is "OSRM", and it provides only one route (You can check on the console, possible routes). If you use "GraphHopper" routing engine, it might provide you the multiple routes. Please check by yourself. I haven't tested it before.
Can we tracking route with leaflet?
Yes we can.
bro create two input box to input city to city location with line-draft...
Hi, i want to be able to choose my starting location on the map aswell as my destination, is this possible?
Yes it is possible, you can pass the first point location through input form, same as we passed the destination point
Cependant, en n'y intégrant L'API Direction de google Maps on peut avoir plus de fiabilité sur les résultats
How change car icon orientation according path direction ?
Not possible in easy way for such implementation, you need to write your own Js code and also need lots of car photo directing to all directions.
Open 3d point cloud based visual positioning and lidar positioning using navigation system this is my project statement can you please help me with problem
Hi! Thank you for this wonderful video. I wonder if this routing machine can also work using folium python? Thank you.
Since it is a plugin of leaflet, I don't think it is available in folium
@@geodev Thank you for replying! This is highly appreciated. If you could also recommend a library or module that I can use in python to do route distancing, I would appreciate it. God bless you! :)
E possível fazer edição com essa api? Faz um video
Hi thank you for valuable lesson.
i want to between start route end route i want arrow icon instant of bar solid color please replay me
Please check this plugin if you want to customize the path: github.com/bbecquet/Leaflet.PolylineDecorator
how can I translate the itinerary in other language and move the legend in other place of screen??
Sorry, I think it is only available on English but you can check the official documents and check whether there is another language or not
Cannot read properties of undefined (reading 'control')
I think you might have spelling error. Please check the code correctly
@@geodev Got it, so is this not suitable for production use?
Like it with python.
how to hide the fix with the instructions ?
Is this applicable on admin routes?
Yes, it should be.
Thank you very much sir which of your course on #Udemy can solve my issue I what to great a web app with #Django that can track customer order when a costumer wont to see his order
Thats a great suggestion. I will think about it. Thanks for suggestion.
what will be map input event if i am having 2 input search box
what do you mean by 2 input search box?
@@geodev I have 2 search input box one is startpoint and endpoint and need to find distance between 2 cities . Implementing code in ts but not allowed me to track right location and distance between 2 cities . if you provide me google hangout then I can show you problem
MAP is not showing i dont know why this issue facing by me however i follow each step
Can you check the Full code in github? I pushed everything from this code.
@@geodev yes I checked and apply full code of git hub but map is not showing and tracking is working in GitHub code
I have the same problem. And I noted this msn in page of liedman (Update 2020-04-06: The example above relies on OSRM's demo server. At this moment, the demo server (which is outside scope and control of the plugin's author) is no longer maintained, and its SSL certificate has expired. The plugin will not work unless you configure a routing backend yourself. I am sorry to say that, to my knowledge, there is no good default.). I don't know how to solve.
@Fatima Khan The solution is change http for https in L.tileLayer('{s}.tile.osm.org/{z}/{x}/{y}.png', { attribution: 'Leaflet © ' + mapLink + ', contribution', maxZoom: 18 }).addTo(map). This solution was propose by Marketitsios in this video ruclips.net/video/H9c9CcEKj2I/видео.html
how to get current location using leaflet when mobile screen locked
Sorry, I don't know how to create mobile app. But i think you have to give the permission from phone for that
Thanks a lot. This tutorial is very helpful but I need assistance or improvement on what you did.
What if I don't want to loop but update the map/marker A when A moves to the destination B?? Something like you did with this tutorial: ruclips.net/video/8KX4_4NK7ZY/видео.html
How do I do that? What do I change/add??
Not sure what do you mean. This tutorial is about the routing and previous was about the real time location tracking. Both are different.
@@geodev thanks for your response. My question basically is how to integrate both. Like get points A and B then start real time location tracking as user in point A moves to destination B.
@@ariodejohnson5712 You need to implement the previous video settimeout function here instead of the settimeout function in `routesfond` event.
@@geodev thanks again for your response. Please will you be kind of to show me like a working example? Maybe on Codepen so I can the workings and the code. Please.
Thank you.
hello bro
i want the tracker to go back after touching its destination and
we used on click function , but I want that to happen without clicking like automatic roaming of locations
like :- ruclips.net/video/8KX4_4NK7ZY/видео.html
you have shown in the starting of this vedio
Please help
Hi Molugu, to track the multiple locations, you need to add the locational information in the database and update it in certain interval.
@@geodev please show me how to do all that
@@geodev How to make 3 or 4 vehicles move in Javascript
ruclips.net/video/8KX4_4NK7ZY/видео.html
like you have shown in this video starting ??