Merge pull request #787 from twpayne/proj-related-clean-ups
Projection-related clean ups
This commit is contained in:
@@ -13,20 +13,35 @@ goog.require('ol.Coordinate');
|
|||||||
ol.Ellipsoid = function(a, flattening) {
|
ol.Ellipsoid = function(a, flattening) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @const
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
this.a = a;
|
this.a = a;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @const
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
this.flattening = flattening;
|
this.flattening = flattening;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @const
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
this.b = this.a * (1 - this.flattening);
|
this.b = this.a * (1 - this.flattening);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @const
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
this.eSquared = 2 * flattening - flattening * flattening;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @const
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
this.e = Math.sqrt(this.eSquared);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ ol.proj.EPSG3857.toEPSG4326 = function(input, opt_output, opt_dimension) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.proj.EPSG3857.prototype.getPointResolution =
|
ol.proj.EPSG3857.prototype.getPointResolution = function(resolution, point) {
|
||||||
function(resolution, point) {
|
|
||||||
return resolution / ol.math.cosh(point[1] / ol.proj.EPSG3857.RADIUS);
|
return resolution / ol.math.cosh(point[1] / ol.proj.EPSG3857.RADIUS);
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-2
@@ -87,8 +87,7 @@ ol.Projection = function(options) {
|
|||||||
* @private
|
* @private
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
this.global_ = goog.isDef(options.global) ?
|
this.global_ = goog.isDef(options.global) ? options.global : false;
|
||||||
options.global : false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
|
|||||||
Reference in New Issue
Block a user