From 4c3b59fe253330e5e20fac4b1a462511a4ee305e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 4 Dec 2007 00:42:08 +0000 Subject: [PATCH 1/1] Set number of zoom levels on a per layer basis. Closes #603. --- public/javascripts/map.js | 1 - public/openlayers/OpenStreetMap.js | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/javascripts/map.js b/public/javascripts/map.js index 217e6e758..0f842cf48 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -5,7 +5,6 @@ var popup; function createMap(divName) { map = new OpenLayers.Map(divName, { maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508), - numZoomLevels: 19, maxResolution: 156543, units: 'm', projection: "EPSG:41001" }); diff --git a/public/openlayers/OpenStreetMap.js b/public/openlayers/OpenStreetMap.js index 40722d4e0..8329aef8b 100644 --- a/public/openlayers/OpenStreetMap.js +++ b/public/openlayers/OpenStreetMap.js @@ -109,6 +109,7 @@ OpenLayers.Layer.OSM.Mapnik = OpenLayers.Class(OpenLayers.Layer.OSM, { "http://b.tile.openstreetmap.org/", "http://c.tile.openstreetmap.org/" ]; + options = OpenLayers.Util.extend(options, { numZoomLevels: 19 }); var newArguments = [name, url, options]; OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments); }, @@ -136,6 +137,7 @@ OpenLayers.Layer.OSM.Osmarender = OpenLayers.Class(OpenLayers.Layer.OSM, { "http://b.tah.openstreetmap.org/Tiles/tile.php/", "http://c.tah.openstreetmap.org/Tiles/tile.php/" ]; + options = OpenLayers.Util.extend(options, { numZoomLevels: 18 }); var newArguments = [name, url, options]; OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments); }, -- 2.43.2