How can I disable/remove the delete button in the leaflet-draw edit toolbar? The "edit" button should remain enabled.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Regarding to the docs in chapter Disabeling a Toolbar Item you can do the following:
map.addControl(new L.Control.Draw({
edit: {
featureGroup: drawnItems,
remove: false
}
}));
This adds a new Control bar without the delete Button, but the edit button will remain