I am using leaflet map library. I am facing issue with leaflet-draw-toolbar in which I have edit & delete buttons but these buttons are disabled by default. please provide me solution by which I can enable these buttons & their click functionality by default. ThanksThis is my image in which edit & delete buttons are disabled by default
const drawOptions = {
draw: {
marker: false,
polyline: false,
polygon: {
shapeOptions: {
color: 'red',
fillColor: 'red',
},
},
rectangle: false,
circle: false,
circlemarker: false,
},
edit: {
featureGroup: drawnItems,
remove: true,
},
position: 'bottomleft',
};
by default edit & delete buttons are disabled in leaflet-draw-toolbar. when i add shape by leaflet draw library (i am saving shapes in database) edit & delete buttons become enable & i am able to edit or delete shape but when i reload page i am getting shape from database & shape is rendering on map but edit & delete buttons become disable after reloading page. i want to get solution by which i can enable these buttons & their click functionalities