Looked into reference and tried a few things.

> > - Does computeLength take a "path" an array of latlng objects (it
> > doesn't seem to, how do we use it?
> > It says this: You may instead use computeLength() to calculate the
> > length of a given path if you have several locations

It does, just use the poly.getPath().getArray() and pass in.


> > - Does computeArea take a path? Will it work on a google.maps.Polygon?
It does. For multi-parts polygon, you may need to calculate individual
parts and subtract rings or add together. For simple ones, just
poly.getPath().getArray().
The documentation says it requires a closed loop, but it looks like it
can work either way, i.e. you do not need push the first point into
the array.

I did noticed a problem, the API code used a constant 1.0E-6 to decide
the sign of the smaller triangle area, but that number is way too big,
so the function only works if you are at a small zoom level like
county wide, once you zoom to street level, it returns 0 which is
apparently wrong. I'll report.

test link: 
http://gmaps-utility-gis.googlecode.com/svn/trunk/v3test/geom/measure.html



-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to