We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ecc1e81 + ec9b906 commit aa303f4Copy full SHA for aa303f4
geojson-utils.js
@@ -154,10 +154,10 @@
154
155
// from http://www.movable-type.co.uk/scripts/latlong.html
156
gju.pointDistance = function (pt1, pt2) {
157
- var lon1 = pt1.coordinates[0],
158
- lat1 = pt1.coordinates[1],
159
- lon2 = pt2.coordinates[0],
160
- lat2 = pt2.coordinates[1],
+ var lon1 = pt1.coordinates[1],
+ lat1 = pt1.coordinates[0],
+ lon2 = pt2.coordinates[1],
+ lat2 = pt2.coordinates[0],
161
dLat = gju.numberToRadius(lat2 - lat1),
162
dLon = gju.numberToRadius(lon2 - lon1),
163
a = Math.pow(Math.sin(dLat / 2), 2) + Math.cos(gju.numberToRadius(lat1))
0 commit comments