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

Leaflet Draw - Remove markers one by one without save confirm #1032

Open FranGhe opened 2 years ago

FranGhe commented 2 years ago

I have a map with draw controls to create, edit and remove only markers.

All works fine, but I would like to remove the marker just with one click... without save confirm.

I haven't found any posts explaining how I can do this ... or my search is incorrect. only this code

L.EditToolbar.Delete.include({ enable: function () { this.options.featureGroup.clearLayers(); } }); but this remove all markers... I want remove the markers one by one without confirm.

I would like: click on trash icon, than the marker that will be removed... click on trash icon, than the marker that will be removed... ... ecc

Is it possible?

askerakbar commented 1 year ago

Hi, did you find any solutin to this?