How do you add GeoJsonTooltip to folium.Choropleth class in folium? How do you add GeoJsonTooltip to folium.Choropleth class in folium? json json

How do you add GeoJsonTooltip to folium.Choropleth class in folium?


Two things:

  • You need to use the GeoJsonTooltip class to use the geojson fields. The regular Tooltip class only works with simple text. That's the error you're getting.
  • You can pass the GeoJsonTooltip to the GeoJson object that is created by Choropleth under the hood: GeoJsonTooltip(....).add_to(theft.geojson)