Open LCweb-ita opened 4 years ago
Hi, there is currently no mechanism to distinguish a click on the line from a drag: both are, in LRM's perspective, the same thing, it's just that you are dragging the new waypoint zero pixels before dropping it.
I am guessing an option to enforce a minimum drag distance would be one way to solve this. I'd be open to discussing an pull request for such a change, but since I'm not actively working on LRM I will not have the time to do it myself.
Thanks for the kind answer. I'm a developer too, if you tell me where you track the click/drag (file + line) I can try achieving it.
Hi there, I'm creating a routing system increasing the line at each map click. Everything works fine except when I click on the existing path.
The new route end is properly applied, but also another waypoint is added on the same point. Please check this screenshot to better understand: https://i.imgur.com/Bz1tMjU.png
Here's my router configuration:
` routing_ctrl = L.Routing.control({ waypoints: [ L.latLng( to_save.start[0], to_save.start[1]), L.latLng( to_save.end[0], to_save.end[1]) ], geocoder: L.Control.Geocoder.nominatim(), routeWhileDragging: true, reverseWaypoints: false, fitSelectedRoutes: false,
`
Please note I want to keep the line draggable, so I can't use addWaypoints: false How can I fix it?
Thanks