From d0e198df93d0e1f402440f0c95ab6aa0490d235d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 4 Jul 2013 09:16:04 +0200 Subject: [PATCH] Use constrainResolution function Use the constrainResolution function when setting the initial view resolution. --- src/ol/view2d.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/view2d.js b/src/ol/view2d.js index 90290a267b..8e465c2407 100644 --- a/src/ol/view2d.js +++ b/src/ol/view2d.js @@ -87,8 +87,8 @@ ol.View2D = function(opt_options) { if (goog.isDef(options.resolution)) { values[ol.View2DProperty.RESOLUTION] = options.resolution; } else if (goog.isDef(options.zoom)) { - values[ol.View2DProperty.RESOLUTION] = resolutionConstraint( - this.maxResolution_, options.zoom, 0); + values[ol.View2DProperty.RESOLUTION] = this.constrainResolution( + this.maxResolution_, options.zoom); } values[ol.View2DProperty.ROTATION] = goog.isDef(options.rotation) ? options.rotation : 0;