1

I'm using Google Maps Android API v2 and a polygon drawn on maps. Now I want to calculate the area of this polygon.

I know that Google Maps JavaScript API v3 has a simple way to do this, using: google.maps.geometry.spherical.computeArea(yourPolygon.getPath()).

Is there a similar way to calculate polygon area using Google Maps Android API v2? If no, wich method do you suggest?

Thanks in advance.

Best regards.

EDIT:

I found the following algorithm that seems to resolve my problem:

http://users.soe.ucsc.edu/~pang/160/f98/Gems/GemsIV/sph_poly.c

1 Answers1

0

I guess you will have to do some math. There doesn't seem to be a method for that in the Google Maps Android API v2.

Check the following questions for possible help:

Calculating area enclosed by arbitrary polygon on Earth's surface

measure area of irregular polygon in android

Calculate the area covered by a polygon in a google map in an Android App

Community
  • 1
  • 1
zbr
  • 6,860
  • 4
  • 31
  • 43
  • Hi Zabri! Thanks for you reponses and the related topics already discussed here! I thought Google had a method to easily calculate this. I will take a look on that! – Murilo Travaglia May 27 '13 at 03:04
  • I found this algorithm that seems to resolve the problem: http://users.soe.ucsc.edu/~pang/160/f98/Gems/GemsIV/sph_poly.c – Murilo Travaglia May 28 '13 at 04:13