From 449ea370c02a947ce8880df075cbf39df9bc7116 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Thu, 23 Jun 2016 15:00:30 +0200 Subject: [PATCH] Add getters for min and max resolution of the view --- src/ol/view.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/ol/view.js b/src/ol/view.js index 293316271b..780aa43694 100644 --- a/src/ol/view.js +++ b/src/ol/view.js @@ -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.