calculate average distance between markers google maps api code example
Example: distance between two lat long points google maps api
google.maps.geometry.spherical.computeDistanceBetween (latLngA, latLngB);
google.maps.geometry.spherical.computeDistanceBetween (latLngA, latLngB);