perliedman / leaflet-routing-machine

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

Move marker in leaflet routing control #570

Closed HunzlaSheikh closed 4 years ago

HunzlaSheikh commented 4 years ago

I want to move/play marker along route path which routing machine defined. Like this functionality. http://ewoken.github.io/Leaflet.MovingMarker/ How can I achieve this functionality? please help.

perliedman commented 4 years ago

Hi, the route object has a coordinates property, which contains all LatLng objects for the route, you should be able to use that to move the marker.