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
This commit is contained in:
crschmidt
2006-08-24 05:11:28 +00:00
parent eb783aab37
commit 82f786c630

View File

@@ -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]];