Do not depend on units for resolutions calculation

This commit is contained in:
Andreas Hocevar
2016-01-06 23:12:17 +01:00
parent 6b8da1237c
commit b8fc917016

View File

@@ -682,7 +682,7 @@ ol.View.createResolutionConstraint_ = function(options) {
var size = !extent ?
// use an extent that can fit the whole world if need be
360 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /
ol.proj.METERS_PER_UNIT[projection.getUnits()] :
projection.getMetersPerUnit() :
Math.max(ol.extent.getWidth(extent), ol.extent.getHeight(extent));
var defaultMaxResolution = size / ol.DEFAULT_TILE_SIZE / Math.pow(