From 82f786c6304d55dbf49d2941a30b361774552357 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Thu, 24 Aug 2006 05:11:28 +0000 Subject: [PATCH] Restore maxZoomLevel functionality, removoed between rc1 and rc2 by Erik. This was the *only* way of setting zoom levels up until 2.0, taking it away in an RC release is bad. (This resolves Jeff Dege's most recent mail to the users list.) git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1348 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index 714bb4b9c4..686dc83426 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -182,6 +182,9 @@ OpenLayers.Layer.prototype = { 'minExtent', 'maxExtent', 'numZoomLevels' ); + if (this.map.maxZoomLevel && !this.numZoomLevels) { + this.numZoomLevels = this.map.maxZoomLevel + 1; + } for(var i=0; i < properties.length; i++) { if (this[properties[i]] == null) { this[properties[i]] = this.map[properties[i]];