perliedman / leaflet-routing-machine

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

Waypoint with number, button and show/hide route #557

Closed nigelboulton closed 4 years ago

nigelboulton commented 4 years ago

I am working with LRM to create route maps. Is there any documentation or examples on how to do the following:

1) Show waypoints with route colour and a number. So that the user can see the order of the route 2) Buttons when the waypoint is clicked 3) Ability to hide / show a route so that other routes can be more easily viewed.

perliedman commented 4 years ago

All of these are possible, but sorry, no tutorial in place.

  1. Look at the createMarker option in the API
  2. Not sure exactly what you want, but look at the Interaction tutorial
  3. Calling setWaypoints can achieve this, it will simply display the new route; you can also use L.Routing.Line directly to display routes as layers on the map.