Skip to content

Commit

Permalink
Fix minzoom and maxzoom attribute error (#226)
Browse files Browse the repository at this point in the history
* Fix minzoom and maxzoom attribute error

* Improve it

* Remove info attrbute check
  • Loading branch information
giswqs authored Oct 27, 2024
1 parent 4ba30af commit b19e7d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions localtileserver/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,17 @@ def band_names(self):

@property
def min_zoom(self):
return self.info.minzoom
if hasattr(self.info, "minzoom"):
return self.info.minzoom
else:
return self.reader.minzoom

@property
def max_zoom(self):
return self.info.maxzoom
if hasattr(self.info, "maxzoom"):
return self.info.maxzoom
else:
return self.reader.maxzoom

@property
def default_zoom(self):
Expand Down

0 comments on commit b19e7d0

Please sign in to comment.