Add view.getMaxZoom() and view.getMinZoom()

This commit is contained in:
Tim Schaub committed 2017-02-19 18:11:04 -07:00
1 parent 719fa6e004
commit b383e0ecb2
2 files changed
+52

No files matched your search

+20
View File
@@ -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.