Set number of zoom levels on a per layer basis. Closes #603.
authorTom Hughes <tom@compton.nu>
Tue, 4 Dec 2007 00:42:08 +0000 (00:42 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 4 Dec 2007 00:42:08 +0000 (00:42 +0000)
public/javascripts/map.js
public/openlayers/OpenStreetMap.js

index 217e6e7589caa9fce2c7fcfb3e2e16f075c3491e..0f842cf48d697e08e98fb6c60c6bb78d64d83b4b 100644 (file)
@@ -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" });
index 40722d4e0bc81c359a3d638f554dc00d3164ee4c..8329aef8b88dc47b78541e7a7cd2d1ddf5d3826b 100644 (file)
@@ -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);
     },