Permalink
Browse files

Merge pull request #6 from dominiklaubach/master

fixed wrong parameters for getDistance()-call within getCenter()
  • Loading branch information...
2 parents 2bfeae2 + 9716515 commit e6deabdd1cb3963a0cd0800e121e84b9e60dbc83 @manuelbieh committed Jan 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 geolib.js
View
@@ -243,7 +243,7 @@
lng = ((minLng + maxLng)/2).toFixed(6);
// distance from the deepest left to the highest right point (diagonal distance)
- var distance = geolib.convertUnit('km', geolib.getDistance(minLat, minLng, maxLat, maxLng));
+ var distance = geolib.convertUnit('km', geolib.getDistance({latitude: minLat, longitude: minLng}, {latitude: maxLat, longitude: maxLng}));
return {"latitude": lat, "longitude": lng, "distance": distance};

0 comments on commit e6deabd

Please sign in to comment.