File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ def _explore_graph(
149
149
node_kws = None ,
150
150
focal_kws = None ,
151
151
m = None ,
152
+ ** kwargs ,
152
153
):
153
154
"""Plot graph as an interactive Folium Map
154
155
@@ -177,6 +178,10 @@ def _explore_graph(
177
178
passing a subset of nodes with the `focal` argument
178
179
m : Folilum.Map, optional
179
180
folium map objecto to plot on top of, by default None
181
+ **kwargs : dict, optional
182
+ additional keyword arguments are passed directly to geopandas.explore, when
183
+ ``m=None`` by default None
184
+
180
185
181
186
Returns
182
187
-------
@@ -230,7 +235,11 @@ def _explore_graph(
230
235
["focal" , "neighbor" , "weight" , "geometry" ]
231
236
]
232
237
233
- m = edges .explore (m = m , ** edge_kws ) if m is not None else edges .explore (** edge_kws )
238
+ m = (
239
+ edges .explore (m = m , ** edge_kws )
240
+ if m is not None
241
+ else edges .explore (** edge_kws , ** kwargs )
242
+ )
234
243
235
244
if nodes is True :
236
245
if focal is not None :
Original file line number Diff line number Diff line change @@ -1288,6 +1288,7 @@ def explore(
1288
1288
node_kws = None ,
1289
1289
focal_kws = None ,
1290
1290
m = None ,
1291
+ ** kwargs ,
1291
1292
):
1292
1293
"""Plot graph as an interactive Folium Map
1293
1294
@@ -1314,6 +1315,9 @@ def explore(
1314
1315
passing a subset of nodes with the `focal` argument
1315
1316
m : Folilum.Map, optional
1316
1317
folium map objecto to plot on top of, by default None
1318
+ **kwargs : dict, optional
1319
+ additional keyword arguments are passed directly to geopandas.explore, when
1320
+ ``m=None`` by default None
1317
1321
1318
1322
Returns
1319
1323
-------
@@ -1330,6 +1334,7 @@ def explore(
1330
1334
node_kws = node_kws ,
1331
1335
focal_kws = focal_kws ,
1332
1336
m = m ,
1337
+ ** kwargs ,
1333
1338
)
1334
1339
1335
1340
Original file line number Diff line number Diff line change @@ -368,3 +368,9 @@ def test_m(self):
368
368
assert s .count ("LineString" ) == 6
369
369
# geoms
370
370
assert s .count ("Polygon" ) == 5
371
+
372
+ def test_explore_kwargs (self ):
373
+ m = self .G_str .explore (self .nybb_str , tiles = "OpenStreetMap HOT" )
374
+ s = fetch_map_string (m )
375
+
376
+ assert "tile.openstreetmap.fr/hot" in s
You can’t perform that action at this time.
0 commit comments