Skip to content

Commit 08fdda3

Browse files
committed
do not always resize map to data
1 parent 62694cb commit 08fdda3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hat/interactive/leaflet.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def add_geolayer(
125125
station_id_colname="station_id",
126126
name="Stations",
127127
property_names=None,
128+
fit_map=True,
128129
# cluster=False
129130
):
130131
"""
@@ -196,7 +197,7 @@ def update_widgets_from_click(*args, **kwargs):
196197
geojson.on_hover(self.create_hover(widgets, property_names=property_names))
197198
self.map.add(geojson)
198199

199-
if coord_names is not None:
200+
if coord_names is not None and fit_map:
200201
self._set_default_boundaries(geodata, coord_names)
201202

202203
# Add the legend to the map

0 commit comments

Comments
 (0)