0

Add option to configure maxzoom and appropriate documentation

This commit is contained in:
Thomas Lake
2012-11-21 21:28:45 +00:00
committed by Andrew Chin
parent c6d7a6d8fd
commit 223b326df1
4 changed files with 15 additions and 3 deletions

View File

@@ -509,6 +509,17 @@ values. The valid configuration keys are listed below.
**Default:** ``1``
``maxzoom``
This specifies the maximum zoom allowed by the zoom control on the web page.
.. note::
This does not change the number of zoom levels rendered, but allows
you to neglect uploading the larger and more detailed zoom levels if bandwidth
usage is an issue.
**Default:** Automatically set to most detailed zoom level
``base``
Allows you to specify a remote location for the tile folder, useful if you
rsync your map's images to a remote server. Leave a trailing slash and point
@@ -516,7 +527,7 @@ values. The valid configuration keys are listed below.
tiles folder itself. For example, if the tile images start at
http://domain.com/map/world_day/ you want to set this to http://domain.com/map/
.. _option_texture_pack:
.. _option_texturepath:
``texturepath``
This is a where a specific texture pack can be found to be used during this render.

View File

@@ -432,7 +432,7 @@ dir but you forgot to put quotes around the directory, since it contains spaces.
# only pass to the TileSet the options it really cares about
render['name'] = render_name # perhaps a hack. This is stored here for the asset manager
tileSetOpts = util.dict_subset(render, ["name", "imgformat", "renderchecks", "rerenderprob", "bgcolor", "defaultzoom", "imgquality", "optimizeimg", "rendermode", "worldname_orig", "title", "dimension", "changelist","showspawn", "overlay","base", "poititle"])
tileSetOpts = util.dict_subset(render, ["name", "imgformat", "renderchecks", "rerenderprob", "bgcolor", "defaultzoom", "imgquality", "optimizeimg", "rendermode", "worldname_orig", "title", "dimension", "changelist", "showspawn", "overlay", "base", "poititle", "maxzoom"])
tileSetOpts.update({"spawn": w.find_true_spawn()}) # TODO find a better way to do this
tset = tileset.TileSet(w, rset, assetMrg, tex, tileSetOpts, tileset_dir)
tilesets.append(tset)

View File

@@ -85,6 +85,7 @@ renders = Setting(required=True, default=util.OrderedDict(),
"base": Setting(required=False, validator=validateStr, default=""),
"poititle": Setting(required=False, validator=validateStr, default="Signs"),
"customwebassets": Setting(required=False, validator=validateWebAssetsPath, default=None),
"maxzoom": Setting(required=False, validator=validateInt, default=None),
# Remove this eventually (once people update their configs)
"worldname": Setting(required=False, default=None,
validator=error("The option 'worldname' is now called 'world'. Please update your config files")),

View File

@@ -519,7 +519,7 @@ class TileSet(object):
zoomLevels = self.treedepth,
minZoom = 0,
defaultZoom = self.options.get('defaultzoom'),
maxZoom = self.treedepth,
maxZoom = self.options.get('maxzoom', self.treedepth),
path = self.options.get('name'),
base = self.options.get('base'),
bgcolor = bgcolorformat(self.options.get('bgcolor')),