Skip to content

Commit b19e7d0

Browse files
authored
Fix minzoom and maxzoom attribute error (#226)
* Fix minzoom and maxzoom attribute error * Improve it * Remove info attrbute check
1 parent 4ba30af commit b19e7d0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

localtileserver/client.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,17 @@ def band_names(self):
8989

9090
@property
9191
def min_zoom(self):
92-
return self.info.minzoom
92+
if hasattr(self.info, "minzoom"):
93+
return self.info.minzoom
94+
else:
95+
return self.reader.minzoom
9396

9497
@property
9598
def max_zoom(self):
96-
return self.info.maxzoom
99+
if hasattr(self.info, "maxzoom"):
100+
return self.info.maxzoom
101+
else:
102+
return self.reader.maxzoom
97103

98104
@property
99105
def default_zoom(self):

0 commit comments

Comments
 (0)