Skip to content

Commit

Permalink
cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
mortewle committed Oct 22, 2023
1 parent 93de77f commit 1c04a45
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/sgis/maps/explore.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"""
import os
import warnings
from collections.abc import Iterable
from numbers import Number
from statistics import mean
from collections.abc import Iterable

import branca as bc
import folium
Expand Down Expand Up @@ -126,7 +126,7 @@ def __init__(
if self.gdfs is None:
return

# stringify or remove columns not renerable by leaflet (list etc.)
# stringify or remove columns not renerable by leaflet (list, geometry etc.)
new_gdfs, show_new = [], []
for gdf, show in zip(self.gdfs, self.show, strict=True):
for col in gdf.columns:
Expand Down Expand Up @@ -675,8 +675,10 @@ def _style_highlight(x):
tooltip = None
popup = None

gdf_as_json = gdf.__geo_interface__

return folium.GeoJson(
gdf.__geo_interface__,
gdf_as_json,
tooltip=tooltip,
popup=popup,
marker=marker,
Expand All @@ -690,7 +692,6 @@ def _style_highlight(x):

def _tooltip_popup(type, fields, gdf, **kwds):
"""get tooltip or popup"""
import folium

# specify fields to show in the tooltip
if fields is False or fields is None or fields == 0:
Expand Down

0 comments on commit 1c04a45

Please sign in to comment.