From fa49aff4b0097711de4217dbd3cf080e9ee432f1 Mon Sep 17 00:00:00 2001 From: Alex Headley Date: Fri, 22 Apr 2011 11:19:02 -0400 Subject: [PATCH] added minzoom config.js setting --- config.js | 1 + googlemap.py | 2 ++ web_assets/functions.js | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config.js b/config.js index 6ccd3ee..839d724 100644 --- a/config.js +++ b/config.js @@ -2,6 +2,7 @@ var config = { tileSize: 384, defaultZoom: 2, + minZoom: {minzoom}, maxZoom: {maxzoom}, // center on this point, in world coordinates, ex: //center: [0,0,0], diff --git a/googlemap.py b/googlemap.py index 868297c..25b5c70 100644 --- a/googlemap.py +++ b/googlemap.py @@ -89,6 +89,8 @@ class MapGen(object): configpath = os.path.join(util.get_program_path(), "config.js") config = open(configpath, 'r').read() + config = config.replace( + "{minzoom}", str(0)) config = config.replace( "{maxzoom}", str(zoomlevel)) diff --git a/web_assets/functions.js b/web_assets/functions.js index 639970a..9fd7d0b 100644 --- a/web_assets/functions.js +++ b/web_assets/functions.js @@ -659,7 +659,7 @@ for (idx in mapTypeData) { getTileUrl: getTileUrlGenerator(view.path, view.base, imgformat), tileSize: new google.maps.Size(config.tileSize, config.tileSize), maxZoom: config.maxZoom, - minZoom: 0, + minZoom: config.minZoom, isPng: !(imgformat.match(/^png$/i) == null) };