-
Notifications
You must be signed in to change notification settings - Fork 362
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
DrawControl edited event: which shape was edited? #849
Comments
As far as I know, ipyleaflet does not support this yet. See a relevant issue #672 |
First of all, thank you for your answer! Yes, that issue is related and if it were solved, getting the edited and the original shape would not be necessary to keep track as you could just list all shapes. So there is currently no way of knowing the set of shapes that were established with the Is there some way to "hack" it? I tried to change the various objects in |
I was able to hack it to keep track of the edited geometries. You can inspect the leafmap source code to see how I implemented it. All geometries are stored in Some relevant source in leafmap that handles this: Notebook: https://leafmap.org/notebooks/46_edit_vector/ Demo: 46_edit_vector.mp4 |
Did someone find an ipyleaflet/ipywidget event which gets called after |
Hey there,
as far as I can see the
DrawControl
will only store thelast_action
and thelast_draw
n geometry in the Python representation on the server side, whereaslast_draw
is also set prior to sending thedelete
action. This allows to keep track about the created and delete geometries.However, I can not figure out how to know, which geometry was edited, when receiving the respective event. I do know the new geometry after the changes from
last_draw
, but I do not know the original geometry that was edited, which makes it impossible to know the shape of geometries currently on the map.Am I missing something or is this functionality not implemented?
Stefan
The text was updated successfully, but these errors were encountered: