Use constrainResolution function

Use the constrainResolution function when setting the initial view resolution.
This commit is contained in:
Éric Lemoine
2013-07-04 09:16:04 +02:00
parent e6efa741d2
commit d0e198df93

View File

@@ -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;