perliedman / leaflet-routing-machine

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

Exclude paths in specified area. #595

Closed AdamSawoscianik closed 4 years ago

AdamSawoscianik commented 4 years ago

Hello,

Im currently working on some project using your awesome library( Thanks btw :) ), and im wondering if is there a way to exclude paths beeing for example in geojson area and make it find some path around?

Thank you in advance for response.

perliedman commented 4 years ago

Hi, the actual routing calculation is performed by the routing backend (which is OSRM by default), so you would need to have support for this on the backend. To my knowledge, OSRM does not support something like this, at least not dynamically, maybe other routers do (see tutorials on how to change routing backend).

So, in short the answer is currently no.