Calculate distance between two points in google maps V3
If you want to calculate it yourself, then you can use the Haversine formula: var rad = function(x) { return x * Math.PI / 180; }; var getDistance = function(p1, p2) { var R = 6378137; // Earth’s mean radius in meter var dLat = rad(p2.lat() – p1.lat()); var dLong = rad(p2.lng() – p1.lng()); var … Read more