bluehalo / ngx-leaflet-draw

MIT License
88 stars 29 forks source link

Cannot Edit or Delete shapes on map when using own toolbar #118

Open ferily7 opened 2 years ago

ferily7 commented 2 years ago

Hi there,

I am using my own toolbar for drawing the shapes on the map, similar to this issue, but when I am having an issue where the map shows that I can edit or delete the shapes:

edit

delete

The map shows that I can edit or delete the polygon but I can't actually drag the vertexes nor delete the polygon. Here is how my code looks like when I am editing and deleting:

new L.EditToolbar.Edit(map, {
        featureGroup: this.featureGroup,
        selectedPathOptions: {},
        poly: {
          allowIntersection: false
        },
        edit: true
} as any);
new L.EditToolbar.Delete(map, {
        featureGroup: this.featureGroup
} as any)

Am I doing something wrong? Any help is greatly appreciated!