Reputation: 405
I want to calculate the area in square kilometers of a polygon in Google Maps API V3. With the google.maps.geometry.spherical.computeSignedArea() this should be possible and easy.
http://code.google.com/intl/en-US/apis/maps/documentation/javascript/reference.html#spherical
It works nicely and it returns a number as described in the documentation. But what unit of measurement is the number? I can't find it anywhere! Is it meters, centimeters, feet?
Upvotes: 1
Views: 2003
Reputation: 1206
The function returns the unit in m^2 (square meters)
As described in the documentation for computeArea:
Returns the area of a closed path. The computed area uses the same units as the radius. The radius defaults to the Earth's radius in meters, in which case the area is in square meters.
Upvotes: 3