Leaflet / Leaflet.draw

Vector drawing and editing plugin for Leaflet
https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html
MIT License
1.96k stars 992 forks source link

Add drawing markers to custom pane #1058

Open ma7moudat opened 1 year ago

ma7moudat commented 1 year ago

Skipped the issue template, since this is more of a feature request 🙏

This is similar to https://github.com/Leaflet/Leaflet.draw/issues/360, but in my case I want the markers that are generated while drawing, which are created in the following lines (as far as I could see):

https://github.com/Leaflet/Leaflet.draw/blob/d5dd11781c2e07f9e719308e504fe579000edf54/src/draw/handler/Draw.Polyline.js#L88

https://github.com/Leaflet/Leaflet.draw/blob/d5dd11781c2e07f9e719308e504fe579000edf54/src/draw/handler/Draw.Polyline.js#L355

https://github.com/Leaflet/Leaflet.draw/blob/d5dd11781c2e07f9e719308e504fe579000edf54/src/draw/handler/Draw.Polyline.js#L381

I want these to be created in a custom pane instead of the marker-pane. The same also applies for the drawing guides and the handling of mouse events.

I'm aware that, in this case, some map elements might have a higher z-index and block the drawing process. This is a desired effect.

Is this possible to implement?