removing the restrictedMinZoom property, and allow for restricting zoom levels with maxResolution and numZoomLevels. Thanks tschaub for the doc, test and examples improvements. r=tschaub (see #3338)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12106 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2011-06-18 19:25:46 +00:00
parent 6248cdc94d
commit a9d3b8b72e
8 changed files with 98 additions and 105 deletions

View File

@@ -1927,8 +1927,8 @@ OpenLayers.Map = OpenLayers.Class({
*/
isValidZoomLevel: function(zoomLevel) {
return ( (zoomLevel != null) &&
(zoomLevel >= this.getRestrictedMinZoom()) &&
(zoomLevel < this.getNumZoomLevels()) );
(zoomLevel >= 0) &&
(zoomLevel < this.getNumZoomLevels()) );
},
/**
@@ -2031,20 +2031,6 @@ OpenLayers.Map = OpenLayers.Class({
return maxExtent;
},
/**
* Method: getRestricteMinZoom
*
* Returns:
* {Integer} the minimum zoom level allowed for the current baseLayer.
*/
getRestrictedMinZoom: function() {
var minZoom = null;
if (this.baseLayer != null) {
minZoom = this.baseLayer.restrictedMinZoom;
}
return minZoom;
},
/**
* APIMethod: getNumZoomLevels
*