perliedman / leaflet-routing-machine

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

Use Markers which are already created to display a route between them #483

Closed Matth10 closed 6 years ago

Matth10 commented 6 years ago

Hi, I have a set of markers that represent some localisation of some stores, and I have a marker that represent where the client is. All of them are already displayed on the map.

I'm trying to display the fastest route between my position and another marker. However the constructor of L.Routing.Control takes two waypoints and then transforms them to markers.

But I would like to know if there is a way to put some markers in the constructor instead of waypoints to avoid creating another markers which are already created

Thanks for your advice