perliedman / leaflet-routing-machine

Control for routing in Leaflet
https://www.liedman.net/leaflet-routing-machine/
Other
1.08k stars 350 forks source link

Bearing for route waypoints #564

Open iamsvenh opened 4 years ago

iamsvenh commented 4 years ago

I am drawing route segments on the path traveled by drivers on the map as they go. I am doing so by calculating a route between the last waypoint and the current waypoint. Getting the snapped coordinates from the routing controller and drawing a polyline.

This works great so far. However, sometimes the snap lands on the oposite side of the road on a two-way street, and then calculates the route including u-turns, etc.

From my research, I believe the proper solution would be to allow bearing parameters while routing as suggested by the osrm folks here

https://github.com/Project-OSRM/osrm-backend/issues/1749#issuecomment-222753214

Would this be able to be included in the leaflet-routing-machine?