Add function for mouseover lines
Hello,
With the current code we can use the mouseover function on the circleMarkers, origin and destination points but it's impossible to have this feature for the lines.
Could you add this feature, please ?
Thank you for your support.
I don't know yet if that will be possible without substantial additional work. But, I welcome pull requests with code enhancements to support this!
The lines are drawn in a pure <canvas> that is handled outside of LeafletJS. Any user interaction events for the bezier lines would require some research and likely writing a bit of new code.
There's been some more interest shown in supporting this enhancement. Here are some more notes in case I or anyone else ends up researching this some more.
Might want to look into: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D#Hit_regions (but they're experimental)
Also might be useful to find out how LeafletJS source code to see how they wired up mouse interactions, popups, tooltips, etc. when they render features on the canvas.