I am developing an application via the Google Maps API (Version 3).
I have 2 google.maps.LatLng objects named loc1 and loc2.
How do I calculate the distance between them in say meters?
I have tried using various tricks from this question to convert latitude/longitude measures into meters. However, I question the reliability of my implementation.
I have also tried implementing a distance matrix, but I think that a distance matrix is a lot of work just to calculate the distance between 2 points.
Thank you!
Sounds simple, I recommend the geometry library,
https://developers.google.com/maps/documentation/javascript/reference#spherical
From my experience the result is in meters. Remember to add the optional geometry library in your tag