Add export for ol.proj.METERS_PER_UNIT
This commit is contained in:
+3
-2
@@ -16,6 +16,7 @@ goog.require('ol.View');
|
||||
goog.require('ol.coordinate');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.proj.METERS_PER_UNIT');
|
||||
goog.require('ol.proj.Projection');
|
||||
goog.require('ol.proj.Units');
|
||||
|
||||
@@ -544,8 +545,8 @@ ol.View2D.createResolutionConstraint_ = function(options) {
|
||||
.getExtent();
|
||||
var size = goog.isNull(projectionExtent) ?
|
||||
// use an extent that can fit the whole world if need be
|
||||
360 * ol.METERS_PER_UNIT[ol.proj.Units.DEGREES] /
|
||||
ol.METERS_PER_UNIT[projection.getUnits()] :
|
||||
360 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /
|
||||
ol.proj.METERS_PER_UNIT[projection.getUnits()] :
|
||||
Math.max(projectionExtent[2] - projectionExtent[0],
|
||||
projectionExtent[3] - projectionExtent[1]);
|
||||
maxResolution = size / ol.DEFAULT_TILE_SIZE;
|
||||
|
||||
Reference in New Issue
Block a user