Here's the sample of application that draw road path based on two markers
Sorry I cannot search the tutorial to create this one because I cannot determine the right keyword.
All i want is to place two markers, then the road path will be created between those markers. It will adjust as one marker is moved.
Please provide insights on how this can be achieved. A sample code is much appreciated. Thank you in advance.
Here's the sample of application that draw road path based on two markers
Sorry I cannot search the tutorial to create this one because I cannot determine the right keyword.
All i want is to place two markers, then the road path will be created between those markers. It will adjust as one marker is moved.
Please provide insights on how this can be achieved. A sample code is much appreciated. Thank you in advance.
Share Improve this question asked Mar 14, 2016 at 13:16 MellorineMellorine 2851 gold badge5 silver badges14 bronze badges 3- 4 You are probably looking for Leaflet Routing plugins? – ghybs Commented Mar 14, 2016 at 16:42
- 2 Do you mean that the path should be recalculated while dragging? See the routeWhileDragging attribute in the LRM plugin: liedman/leaflet-routing-machine/tutorials/… – Karussell Commented Mar 14, 2016 at 21:30
- Yes sirs, i just want to draw road path in real-time that is always in road, just like in other website that offers this feature – Mellorine Commented Mar 21, 2016 at 11:57
1 Answer
Reset to default 8This is OSRM, the Open Source Routing Machine. Here is a demo: http://map.project-osrm/
You can actually use it through HTTP request in any language you want: Python, javascript, java, C, ... Check the doc!