diff --git a/src/ol/sphere/sphere.js b/src/ol/sphere/sphere.js index 11beda86f3..4175c046ff 100644 --- a/src/ol/sphere/sphere.js +++ b/src/ol/sphere/sphere.js @@ -87,23 +87,6 @@ ol.Sphere.prototype.geodesicArea = function(coordinates) { }; -/** - * Returns the distance of c3 from the great circle path defined by c1 and c2. - * - * @param {ol.Coordinate} c1 Coordinate 1. - * @param {ol.Coordinate} c2 Coordinate 2. - * @param {ol.Coordinate} c3 Coordinate 3. - * @return {number} Cross-track distance. - */ -ol.Sphere.prototype.crossTrackDistance = function(c1, c2, c3) { - var d13 = this.cosineDistance(c1, c2); - var theta12 = goog.math.toRadians(this.initialBearing(c1, c2)); - var theta13 = goog.math.toRadians(this.initialBearing(c1, c3)); - return this.radius * - Math.asin(Math.sin(d13 / this.radius) * Math.sin(theta13 - theta12)); -}; - - /** * Returns the distance from c1 to c2 using Pythagoras's theorem on an * equirectangular projection. diff --git a/test/spec/ol/sphere/sphere.test.js b/test/spec/ol/sphere/sphere.test.js index 465a42bcbe..13259f9f5f 100644 --- a/test/spec/ol/sphere/sphere.test.js +++ b/test/spec/ol/sphere/sphere.test.js @@ -1,5 +1,4 @@ // See http://www.movable-type.co.uk/scripts/latlong.html -// FIXME add tests for crossTrackDistance // FIXME add tests for maximumLatitude // FIXME add tests for offset