I'm using the google.maps.geometry.spherical's "computeDistanceBetween" function to get the distance between two points on a map. I get a numeric value just fine, but does anyone know what units it's in? (Meters? Yards?) And is it possible to pass a parameter into the function to return, say miles? If there's a conversion utility function I'd be grateful to know of it.
I've looked at Google's API documentation but can't see anything about the units of measure being returned. (I'm probably looking in the wrong place.) Thanks for the help.
You set the unit you want to use. Read here: https://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/4580d3c5f7c08d7a?pli=1 Based on what you can find here: http://code.google.com/apis/maps/documentation/javascript/reference.html#DirectionsUnitSystem either set a metric or an imperial system, and then you're free to do any further conversion yourself ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With