When i call the method

google.maps.geometry.spherical.computeDistanceBetween(from, to);

it returns a number,

is this distance in KiloMeters or Miles??

How can we find this and doc on this API?

2 Answers 2


The function signature is:

computeDistanceBetween(from:LatLng, to:LatLng, radius?:number)

Given the documentation for the computeArea() function just above, I think you can safely assume it is in the same units as the radius, where "the default radius is Earth's radius of 6378137 meters".

Of course, the earth isn't as spherical as Google Maps might like it to be, so be careful about how you apply that distance...


it actually says "meters" in the API reference for Distance Objects.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.