Remove unused sphere.equirectangularDistance() method

This commit is contained in:
Tim Schaub
2015-08-23 11:48:09 -06:00
parent 8ec2bcef17
commit daa4781072
2 changed files with 0 additions and 46 deletions

View File

@@ -70,24 +70,6 @@ ol.Sphere.prototype.geodesicArea = function(coordinates) {
};
/**
* Returns the distance from c1 to c2 using Pythagoras's theorem on an
* equirectangular projection.
*
* @param {ol.Coordinate} c1 Coordinate 1.
* @param {ol.Coordinate} c2 Coordinate 2.
* @return {number} Equirectangular distance.
*/
ol.Sphere.prototype.equirectangularDistance = function(c1, c2) {
var lat1 = goog.math.toRadians(c1[1]);
var lat2 = goog.math.toRadians(c2[1]);
var deltaLon = goog.math.toRadians(c2[0] - c1[0]);
var x = deltaLon * Math.cos((lat1 + lat2) / 2);
var y = lat2 - lat1;
return this.radius * Math.sqrt(x * x + y * y);
};
/**
* Returns the distance from c1 to c2 using the haversine formula.
*