Do not depend on units for resolutions calculation
This commit is contained in:
+1
-1
@@ -682,7 +682,7 @@ ol.View.createResolutionConstraint_ = function(options) {
|
|||||||
var size = !extent ?
|
var size = !extent ?
|
||||||
// use an extent that can fit the whole world if need be
|
// use an extent that can fit the whole world if need be
|
||||||
360 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /
|
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));
|
Math.max(ol.extent.getWidth(extent), ol.extent.getHeight(extent));
|
||||||
|
|
||||||
var defaultMaxResolution = size / ol.DEFAULT_TILE_SIZE / Math.pow(
|
var defaultMaxResolution = size / ol.DEFAULT_TILE_SIZE / Math.pow(
|
||||||
|
|||||||
Reference in New Issue
Block a user