From d3f1f75db2741a2946358059e54af147eea67121 Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Tue, 22 Oct 2024 09:02:44 -0500 Subject: [PATCH] Fix localtileserver minzoom issue (#929) * Fix localtileserver minzoom issue * Change default zoom level --- leafmap/leafmap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/leafmap/leafmap.py b/leafmap/leafmap.py index a8d17594c0..baf5ed2c4a 100644 --- a/leafmap/leafmap.py +++ b/leafmap/leafmap.py @@ -2376,7 +2376,10 @@ def add_raster( self.add(tile_layer, index=layer_index) if zoom_to_layer: self.center = tile_client.center() - self.zoom = tile_client.default_zoom + try: + self.zoom = tile_client.default_zoom + except AttributeError: + self.zoom = 15 arc_add_layer(tile_layer.url, layer_name, True, 1.0)