features.GeoJson Tooltip
See original GitHub issueNoticing in the latest documentation that there is now a tooltip
option in the folium.features.GeoJson
class.
Right now it looks like it only takes raw strings - would it be possible to borrow some syntax from style_function
and highlight_function
in this class to a function call back to the GeoJson via a tooltip = lambda feature: feature['properties'][value]
structure, or to possibly wrap this into the highlight_function
mouseover event dictionary to assist in the user’s exploration of the data (similar to this D3 visual). A popup in this vein would be really functional as well, particularly when paired with some of the Vega/Vega-Lite offerings.
I’m new to JS, but going through the leaflet tutorials right now. I’ve never made a PR before, but really enjoy this library and would love to contribute if someone could steer me in the right direction to start.
Thank you!
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
This is now referenced in PR #883. Added new Tooltip Class object to enable for flexible data handling across different data structures. I’m not super familiar with the Topojson standard and how folium/Leaflet works with it but the specs in that folium class look pretty similar to GeoJson so I think this could be handled in that Jinja2 template as well.
Tooltips for GeoJson have been added in #883 so I’m closing this issue.