ipyleaflet
ipyleaflet copied to clipboard
Get selected object from GeomanDrawControl
The geoman javascript demo allows selecting and highlighting draw features. Is it possible to do the same thing using the ipyleaflet GeomanDrawControl? How do we access the selected object, similar to the DrawControl.last_draw_feature attribute? The goal is to select draw features and add/edit their properties programtically.
https://geoman.io/demo/leaflet
I am looking for python counterpart of the JS Draw.getActiveShape()
https://geoman.io/docs/leaflet/modes/draw-mode
Any luck ? @giswqs Interested too.
FYI I've been looking into this and it seems its a bit of a limitation of the current ipyleaflet design, there isn't really a "catalogue" of layers on the javascript side than can be easily matched with the layer widget objects created on the Python side, when a layer is interacted with via Geoman.
I think this would required adding some kind of unique ID parameter to each layer so that the same layer can be identified both in python and javascript.