Calculate distance between two points with latitude and longitude coordinates


/ Published in: JavaScript
Save to your folder(s)

This function calculates distance with the Haversine formula, this formula assumes that our Earth is spherical, but it isn’t since it’s more like a big orange fruit also compresses at poles. I’ve read that this function has an error about + o – 3 meters (it depends), but it’s a small error for many purposes.

URL: http://www.barattalo.it/2009/12/26/decimal-degrees-conversion-and-distance-of-two-points-on-google-map/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.