Closed Kaitohooi closed 4 months ago
I want to prevent the line from adding new waypoints by setting addWaypoints=false, but the linetouched event didn't fire anymore.
addWaypoints=false
linetouched
routeLine: function(route) { const line = L.Routing.line(route, { styles: [ { color: defaultColor, weight: 5, } ], extendToWaypoints: false, missingRouteTolerance: 100, addWaypoints: false, }); line.on("linetouched", function(e) { console.log(routeName, "is clicked"); }) return line; }
Without setting addWaypoints=false, it will fire.
line.eachLayer(function(l) { l.on("click", function(e) { console.log(routeName, "is clicked"); }) })
I used to fix this, thanks.
I want to prevent the line from adding new waypoints by setting
addWaypoints=false
, but thelinetouched
event didn't fire anymore.