Merge pull request #787 from twpayne/proj-related-clean-ups

Projection-related clean ups
This commit is contained in:
Tom Payne
2013-06-12 07:44:52 -07:00
3 changed files with 17 additions and 4 deletions

View File

@@ -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);
};

View File

@@ -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);
};

View File

@@ -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