-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to stop edit and remove marker/line/polygon? #29
Comments
Humm, you have more than one option. It depends how you use the API. Does that help? |
I can't seem to find Thanks |
Sorry, I meant |
Hmm... I've tried that too, but |
humm, yeah, sorry, it depends which version of Leaflet your are using, |
I'm having a similar issue. Your suggestion didn't work for me because e.layer doesn't have a removeFrom method. However, I changed it so that my editable:drawing:cancel handler calls However, this doesn't work if the user is drawing a new hole in a polygon. This method will remove the polygon that the new hole is a part of. Is there a way to cancel the drawing of a new polygon? I am using Leaflet.Editable 0.6.2 and Leaflet 0.7.7. |
I was having a similar issue, and none of the suggestions worked for me. The solution from @etrochim got me close, but I was getting the The solution for me was to listen for the This is because Why does this fix work? At the point By listening to Note: I'm also using Leaflet.Editable 0.6.2 and Leaflet 0.7.7. |
from click event, for markers , "e.target.remove()" works |
hai i am currently remove the polygons in the map but i cant able to remove the markers in the polygons |
how you do it? please help! |
Prob not the best way to do it, but using a global variable worked for me:
And then in a button:
|
What's the best way to cancel out of current edit and remove any marker/line/polygon created? I've tried
map.editTools.stopDrawing();
but that doesn't remove markers it just stops editing.edit:
I guess my question is how to stop the workflow and clear uncommitted edits...
The text was updated successfully, but these errors were encountered: