added minzoom config.js setting
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
var config = {
|
var config = {
|
||||||
tileSize: 384,
|
tileSize: 384,
|
||||||
defaultZoom: 2,
|
defaultZoom: 2,
|
||||||
|
minZoom: {minzoom},
|
||||||
maxZoom: {maxzoom},
|
maxZoom: {maxzoom},
|
||||||
// center on this point, in world coordinates, ex:
|
// center on this point, in world coordinates, ex:
|
||||||
//center: [0,0,0],
|
//center: [0,0,0],
|
||||||
|
|||||||
@@ -89,6 +89,8 @@ class MapGen(object):
|
|||||||
configpath = os.path.join(util.get_program_path(), "config.js")
|
configpath = os.path.join(util.get_program_path(), "config.js")
|
||||||
|
|
||||||
config = open(configpath, 'r').read()
|
config = open(configpath, 'r').read()
|
||||||
|
config = config.replace(
|
||||||
|
"{minzoom}", str(0))
|
||||||
config = config.replace(
|
config = config.replace(
|
||||||
"{maxzoom}", str(zoomlevel))
|
"{maxzoom}", str(zoomlevel))
|
||||||
|
|
||||||
|
|||||||
@@ -659,7 +659,7 @@ for (idx in mapTypeData) {
|
|||||||
getTileUrl: getTileUrlGenerator(view.path, view.base, imgformat),
|
getTileUrl: getTileUrlGenerator(view.path, view.base, imgformat),
|
||||||
tileSize: new google.maps.Size(config.tileSize, config.tileSize),
|
tileSize: new google.maps.Size(config.tileSize, config.tileSize),
|
||||||
maxZoom: config.maxZoom,
|
maxZoom: config.maxZoom,
|
||||||
minZoom: 0,
|
minZoom: config.minZoom,
|
||||||
isPng: !(imgformat.match(/^png$/i) == null)
|
isPng: !(imgformat.match(/^png$/i) == null)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user