perliedman / leaflet-routing-machine

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

Add waypointclick event #466

Closed david-k closed 6 years ago

david-k commented 6 years ago

Hi, as I see it, there are currently events for waypointdragstart, waypointdrag and waypointdragend. What I would need is waypointclick to show some information when the user clicks on a waypoint. Any chance this could be added?

perliedman commented 6 years ago

waypointdragstart etc. are used internally to track dragging, that's why those events exist.

If you need to add custom events to the waypoint markers, you are better off using the createMarker option to control how the markers are created. That way, you can change icons, add any events you need, etc.

Hope this helps!

david-k commented 6 years ago

Thank you, missed that option!