From 82604ff60b727f3b0045fd240099c65ef5d01c13 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Tue, 8 Jul 2014 21:41:08 +0200 Subject: [PATCH] Make sure that projection is an ol.proj.Projection instance --- src/ol/view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/view.js b/src/ol/view.js index c4573aa8d9..30c6d2a664 100644 --- a/src/ol/view.js +++ b/src/ol/view.js @@ -699,8 +699,8 @@ ol.View.createResolutionConstraint_ = function(options) { resolutions); } else { // calculate the default min and max resolution - var projection = options.projection; - var extent = ol.proj.createProjection(projection, 'EPSG:3857').getExtent(); + var projection = ol.proj.createProjection(options.projection, 'EPSG:3857'); + var extent = projection.getExtent(); var size = goog.isNull(extent) ? // use an extent that can fit the whole world if need be 360 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /