How do you calculate the distance between two markers in Google maps V3? (Similar to the distanceFrom function inV2.)
distanceFrom
Thanks..
//p1 and p2 are google.maps.LatLng(x,y) objects function calcDistance(p1, p2) { var d = (google.maps.geometry.spherical.computeDistanceBetween(p1, p2) / 1000).toFixed(2); console.log(d); }