-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove drawn features layer when geometries are cleared #2038
Remove drawn features layer when geometries are cleared #2038
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add unit tests (as long as it doesn't take too long)?
Done. To make this better testable, I refactored to move the layer deletion logic to where we call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much!
draw_control.reset()
method, the "Drawn Features" layer will also be removed from the layers list.See: https://colab.research.google.com/drive/1vzHVOhtEr9lQwKqPHh3CkF2FIVcQ5SLN?usp=sharing