Add a minzoom option
This only affects what's written to overviewerConfig.js. That is, it does not change the amount of tiles rendered (it's exactly analogous to maxzom) Closes #994
This commit is contained in:
@@ -86,6 +86,7 @@ renders = Setting(required=True, default=util.OrderedDict(),
|
||||
"poititle": Setting(required=False, validator=validateStr, default="Markers"),
|
||||
"customwebassets": Setting(required=False, validator=validateWebAssetsPath, default=None),
|
||||
"maxzoom": Setting(required=False, validator=validateInt, default=None),
|
||||
"minzoom": Setting(required=False, validator=validateInt, default=0),
|
||||
"manualpois": Setting(required=False, validator=validateManualPOIs, default=[]),
|
||||
"showlocationmarker": Setting(required=False, validator=validateBool, default=True),
|
||||
# Remove this eventually (once people update their configs)
|
||||
|
||||
@@ -517,7 +517,6 @@ class TileSet(object):
|
||||
|
||||
d = dict(name = self.options.get('title'),
|
||||
zoomLevels = self.treedepth,
|
||||
minZoom = 0,
|
||||
defaultZoom = self.options.get('defaultzoom'),
|
||||
maxZoom = self.options.get('maxzoom', self.treedepth) if self.options.get('maxzoom', self.treedepth) >= 0 else self.treedepth+self.options.get('maxzoom'),
|
||||
path = self.options.get('name'),
|
||||
@@ -531,6 +530,7 @@ class TileSet(object):
|
||||
poititle = self.options.get("poititle"),
|
||||
showlocationmarker = self.options.get("showlocationmarker")
|
||||
)
|
||||
d['minZoom'] = min(max(0, self.options.get("minzoom", 0)), d['maxZoom'])
|
||||
|
||||
if isOverlay:
|
||||
d.update({"tilesets": self.options.get("overlay")})
|
||||
|
||||
Reference in New Issue
Block a user