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
+15
View File
@@ -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);
}; };
+1 -2
View File
@@ -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
View File
@@ -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