perliedman / leaflet-routing-machine

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

Display realtime traffic congestion on generated route just like google maps. #599

Closed imaginevinay closed 4 years ago

imaginevinay commented 4 years ago

Hi there,

Leaflet routing machine is awesome but there is a use case wherein I need to display congestion on the generated route (low/moderate/high) only just like google maps.

I am using mapbox router along with LRM. It would be very helpful if anyone can help me if out or if this is possible with LRM or any other library which can help me for this use case.

image

What we want is to show colours on route depending on congestion (traffic) :

image

Note : I do not want to use google maps api due to high cost so please suggest a way out for this

perliedman commented 4 years ago

Hi, sorry but this is outside the scope of LRM. You would need to find a data source for congestion data and a way to query that information for the LRM route, and finally customize the line to display on the map.