new restrictedMinZoom property. r=bartvde (closes #3024)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11058 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1800,8 +1800,8 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
* within the min/max range of zoom levels.
|
||||
*/
|
||||
isValidZoomLevel: function(zoomLevel) {
|
||||
return ( (zoomLevel != null) &&
|
||||
(zoomLevel >= 0) &&
|
||||
return ( (zoomLevel != null) &&
|
||||
(zoomLevel >= this.getRestrictedMinZoom()) &&
|
||||
(zoomLevel < this.getNumZoomLevels()) );
|
||||
},
|
||||
|
||||
@@ -1905,6 +1905,20 @@ 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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user