0

general fixes for min/maxzoom, documentation cleared up

hopeful fix for #1086
This commit is contained in:
Aaron Griffith
2014-04-05 20:29:58 -04:00
parent 49cf0b4187
commit a8fc3300b4
3 changed files with 34 additions and 9 deletions

View File

@@ -552,7 +552,9 @@ class TileSet(object):
poititle = self.options.get("poititle"),
showlocationmarker = self.options.get("showlocationmarker")
)
d['maxZoom'] = min(self.treedepth, d['maxZoom'])
d['minZoom'] = min(max(0, self.options.get("minzoom", 0)), d['maxZoom'])
d['defaultZoom'] = max(d['minZoom'], min(d['defaultZoom'], d['maxZoom']))
if isOverlay:
d.update({"tilesets": self.options.get("overlay")})