Add view.getMaxZoom() and view.getMinZoom()
This commit is contained in:
@@ -528,6 +528,26 @@ ol.View.prototype.getMinResolution = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the maximum zoom level for the view.
|
||||
* @return {number} The maximum zoom level.
|
||||
* @api
|
||||
*/
|
||||
ol.View.prototype.getMaxZoom = function() {
|
||||
return /** @type {number} */ (this.getZoomForResolution(this.minResolution_));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the minimum zoom level for the view.
|
||||
* @return {number} The minimum zoom level.
|
||||
* @api
|
||||
*/
|
||||
ol.View.prototype.getMinZoom = function() {
|
||||
return /** @type {number} */ (this.getZoomForResolution(this.maxResolution_));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the view projection.
|
||||
* @return {ol.proj.Projection} The projection of the view.
|
||||
|
||||
Reference in New Issue
Block a user