Implement getPointResolution for EPSG:3587
This commit is contained in:
@@ -4,6 +4,7 @@ goog.require('goog.array');
|
||||
goog.require('ol.Extent');
|
||||
goog.require('ol.Projection');
|
||||
goog.require('ol.ProjectionUnits');
|
||||
goog.require('ol.math');
|
||||
goog.require('ol.projection');
|
||||
|
||||
|
||||
@@ -128,3 +129,12 @@ ol.projection.EPSG3857.toEPSG4326 = function(input, opt_output, opt_dimension) {
|
||||
}
|
||||
return output;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.projection.EPSG3857.prototype.getPointResolution =
|
||||
function(resolution, point) {
|
||||
return resolution / ol.math.cosh(point.y / ol.projection.EPSG3857.RADIUS);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user