Viewing Selected Polygons #834
-
I'm using leafmap and solara to display a vector which highlights some selectable countries that correspond to the information I'm trying to display. I see that on hover an info widget appears with the properties of the polygon below the mouse, but I can't find the correct field to send to solara to let solara know the desired country. Is it possible to get information on or some properties of the polygon which a user has clicked on? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is no direct way to get the polygon from mouse click events. One workaround is to observe the map mouse click events, and then get the clicked coordiantes to be used for intersecting a GeoDataFrame. Lines 1236 to 1245 in 30e52c5 |
Beta Was this translation helpful? Give feedback.
There is no direct way to get the polygon from mouse click events. One workaround is to observe the map mouse click events, and then get the clicked coordiantes to be used for intersecting a GeoDataFrame.
leafmap/leafmap/leafmap.py
Lines 1236 to 1245 in 30e52c5