perliedman / leaflet-routing-machine

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

Remove fitBounds after drawing route #481

Closed AbdallahMezo closed 6 years ago

AbdallahMezo commented 6 years ago

I am using this library to draw a real-time routing, It works perfectly for me and all cases for the job had been done but there's something I cant fix, when the route ends, its sets a new zoom to map (bounds) and I dont want that to be done, searched for an option to pass it to control and didnt find, how can I fix that? Thanks.

perliedman commented 6 years ago

Hi! Great to hear that you're finding the plugin useful.

I think you're looking for the fitSelectedRoutes option (see docs), which you can just set to false to avoid fitting the route.