I have started recently to work with folium.
Has folium any way to set a callback function or just a popup when the user clicks on the polygon area?
I saw some issues maybe about that .. but I'm not sure if this functionality is implemented or not .
thanks for your attention
my best regards
@xmnlab it is not implemented yet. PR https://github.com/python-visualization/folium/pull/490 is the first one to go in that direction but implements a specific call back (highlight).
@ocefpaf thank you a lot for the explanation.
Has there been any change on this? I see that the referenced #490 was merged several months ago, but what about a popup? I was hoping to use folium for a choropleth map where the user could click on any of the areas and see a small popup with some info about that area.
I was hoping to use folium for a choropleth map where the user could click on any of the areas and see a small popup with some info about that area.
If you want to put a PR together to implement that I'd gladly review it :smile:
Folium has some limited click events now but a full customized clicking event from the python side is not possible yet. Closing this as stale but improvements to the GeoJson class are welcomed :grimacing:
thanks @ocefpaf !
Most helpful comment
Has there been any change on this? I see that the referenced #490 was merged several months ago, but what about a popup? I was hoping to use folium for a choropleth map where the user could click on any of the areas and see a small popup with some info about that area.