@@ -225,6 +225,7 @@ def plot_clusters_interactive(
225225 centroids : np .ndarray | None = None ,
226226 title : str = "Interactive Clustering Results" ,
227227 save_path : str | None = None ,
228+ tiles : str = "CartoDB positron" ,
228229) -> "folium.Map" :
229230 """
230231 Create an interactive map visualization of clustering results using folium.
@@ -235,6 +236,8 @@ def plot_clusters_interactive(
235236 centroids: Optional cluster centers as numpy array [k, 2]
236237 title: Map title (shown as map title)
237238 save_path: Path to save HTML file (optional)
239+ tiles: Map tile provider. Options: "CartoDB positron" (default, light),
240+ "CartoDB dark_matter" (dark), "OpenStreetMap"
238241
239242 Returns:
240243 Folium map object that can be displayed in Jupyter or saved to HTML
@@ -277,7 +280,7 @@ def plot_clusters_interactive(
277280 zoom_start = 8
278281
279282 # Create base map
280- m = folium .Map (location = [center_lat , center_lon ], zoom_start = zoom_start , tiles = "OpenStreetMap" )
283+ m = folium .Map (location = [center_lat , center_lon ], zoom_start = zoom_start , tiles = tiles )
281284
282285 # Color palette for clusters
283286 n_clusters = len (np .unique (labels ))
@@ -366,6 +369,7 @@ def plot_route_interactive(
366369 route_geometry : str | None = None ,
367370 title : str = "Interactive Route" ,
368371 save_path : str | None = None ,
372+ tiles : str = "CartoDB positron" ,
369373) -> "folium.Map" :
370374 """
371375 Create an interactive map visualization of TSP/routing results using folium.
@@ -376,6 +380,8 @@ def plot_route_interactive(
376380 route_geometry: Optional encoded polyline string from routing API (OSRM/Google)
377381 title: Map title
378382 save_path: Path to save HTML file (optional)
383+ tiles: Map tile provider. Options: "CartoDB positron" (default, light),
384+ "CartoDB dark_matter" (dark), "OpenStreetMap"
379385
380386 Returns:
381387 Folium map object that can be displayed in Jupyter or saved to HTML
@@ -411,7 +417,7 @@ def plot_route_interactive(
411417 zoom_start = 8
412418
413419 # Create base map
414- m = folium .Map (location = [center_lat , center_lon ], zoom_start = zoom_start , tiles = "OpenStreetMap" )
420+ m = folium .Map (location = [center_lat , center_lon ], zoom_start = zoom_start , tiles = tiles )
415421
416422 # Add route line
417423 if route_geometry and HAS_POLYLINE :
0 commit comments