Wednesday, September 30, 2009

Great New Polygons in the Maps API v3

Google have added Polylines and Polygons to Maps API v3 and made some great improvements to their use. Polylines and polygons allow you to draw lines or filled regions on a map, specify stroke and fill styles, and handle events.

Now you can create polygons with holes like in this Pentagon example.



You can also now create vertices with polygons as in this fractal snowflake poly example.



Via: Google Geo Developers Blog

_____________

2 comments:

Rick Tuinenburg said...

Can you label these?

Keir Clarke said...

Rick you could add a click event to the polygon to open an information window with a name.

Alternatively you could add labels using the Label library -

http://googlemapsmania.blogspot.co.uk/2011/05/introducing-google-maps-label-library.html