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) {
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {number}
|
||||
*/
|
||||
this.a = a;
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {number}
|
||||
*/
|
||||
this.flattening = flattening;
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {number}
|
||||
*/
|
||||
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
|
||||
*/
|
||||
ol.proj.EPSG3857.prototype.getPointResolution =
|
||||
function(resolution, point) {
|
||||
ol.proj.EPSG3857.prototype.getPointResolution = function(resolution, point) {
|
||||
return resolution / ol.math.cosh(point[1] / ol.proj.EPSG3857.RADIUS);
|
||||
};
|
||||
|
||||
@@ -87,8 +87,7 @@ ol.Projection = function(options) {
|
||||
* @private
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.global_ = goog.isDef(options.global) ?
|
||||
options.global : false;
|
||||
this.global_ = goog.isDef(options.global) ? options.global : false;
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user