question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

features.GeoJson Tooltip

See original GitHub issue

Noticing 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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jtbakercommented, Jun 15, 2018

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.

0reactions
Conengmocommented, Sep 3, 2018

Tooltips for GeoJson have been added in #883 so I’m closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding tooltip to folium.features.GeoJson from a geopandas ...
I am having issues adding tooltips to my folium.features.GeoJson. I can't get columns to display from the dataframe when I select them.
Read more >
Modify GeoJSON tooltip format when using Folium to produce ...
I wish to show some data using tooltips when hovering over a country. I can do this using the folium.features.GeoJsonTooltip() function and have ......
Read more >
Add Tooltips and Styles - HERE Developer
To display custom information from a GeoJSON feature, you can set values for tooltip and description of the feature's properties property. tooltip is...
Read more >
Folium 0.12.1 documentation
Create a popup feature to bind to each element of a GeoJson layer based on its attributes. Parameters. fields (list or tuple.) –...
Read more >
How to make nice GeoJSON tooltips on the map #108 - GitHub
The Obsidian Leaflet plugin takes tooltip titles from the GeoJSON feature properties, namely name or title . OpenDataLab (and other) GeoJSON data received ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found