leaflet-draw delete button remove “clear all” action

后端 未结 2 1588
时光取名叫无心
时光取名叫无心 2021-01-18 06:09

How can I remove the \"clear all\" action from the delete button in the leaflet-draw edit toolbar?

I know you can remove the whole delete button but still need to re

2条回答
  •  一整个雨季
    2021-01-18 06:27

    i use this code and work for me. change remove to true==>> remove: true:

    var drawControl = new L.Control.Draw({
                position: 'topright',
                draw: {
    
                        polyline: false,
                        polygon:false,
                        circle: false, // Turns off this drawing tool
                        rectangle: true,
    
                        marker: true
                        },
                edit: {
                     featureGroup: drawnItems,
                    remove: true
                            }
            });
    

提交回复
热议问题