perliedman / leaflet-routing-machine

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

Leaflet ignores Tracks when no other road is available #450

Closed JAT86 closed 6 years ago

JAT86 commented 6 years ago

In isolated villages with only track roads, Leaflet Routing Machine appears to ignore those roads and searches for the nearest non-track road, even though it is several miles away. It creates a straight line from the isolated villages to that distant road, ignoring the tracks route (I have recently updated the road type in OSM to minor):

https://www.openstreetmap.org/#map=15/17.7760/120.9408 lroutingmachineignoringtracks

Zoomed out: lroutingmachineignoringtrackszoomedout

perliedman commented 6 years ago

Hi, as you might know, Leaflet Routing Machine is just a web user interface to calculate routes. It uses a routing backend to actually calculate the route. As default, it uses OSRM's demo server, for example.

So, LRM can't do anything about the actual route calculation. Probably, you could alter OSRM's configuration to address your particular issue, if it ignores track roads. Check out the [OSRM backend] if you haven't already.