It depends on the purpose you need the 'center' for. Easiest and roughest center is the center of the bounds of the polygon. GPolygon.getBounds().getCenter(); That is useful if you just want to fit the polygon in your map.
The most accurate is the center of gravity of the polygon. That is also called centroid. Try googling and you will see that it takes some mathematics. Basically it is calculated from triangles that are formed when a line is drawn from every individual vertex to a reference point. If the polygon is very large, you have to do even some spherical maths for greater accuracy. Average (means) of the vertex coordinates of an irregular polygon is not generally very useful. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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-API?hl=en -~----------~----~----~----~------~----~------~--~---
