Merge pull request #5513 from bartvde/view-getminmaxres

Add getters for min and max resolution of the view
This commit is contained in:
Bart van den Eijnden
2016-06-23 15:28:07 +02:00
committed by GitHub

View File

@@ -297,6 +297,26 @@ ol.View.prototype.calculateExtent = function(size) {
};
/**
* Get the maximum resolution of the view.
* @return {number} The maximum resolution of the view.
* @api
*/
ol.View.prototype.getMaxResolution = function() {
return this.maxResolution_;
};
/**
* Get the minimum resolution of the view.
* @return {number} The minimum resolution of the view.
* @api
*/
ol.View.prototype.getMinResolution = function() {
return this.minResolution_;
};
/**
* Get the view projection.
* @return {ol.proj.Projection} The projection of the view.