Closed Basile001 closed 1 year ago
Hi there,
If my line has addWaypoints set to false the linetouched event doesn't triggered. I want to do something other than add waypoints to my route.
waypoints: waypoints, ....... routeLine: (route) => { var line = L.Routing.line(route, { styles: [{ color: "red", weight: 4 }], extendToWaypoints: true, missingRouteTolerance: 0, addWaypoints: false }); line.on('linetouched', (e: L.LeafletEvent) => { console.log(e); }); return line; },
Kind regards, Basile
Sorry I found a solution in an old post :
line.eachLayer((l) => { l.on('click', (e) => { console.log(e); }); });
Hi there,
If my line has addWaypoints set to false the linetouched event doesn't triggered. I want to do something other than add waypoints to my route.
Kind regards, Basile