You can create polyline, polygon and polygon with hole for Google Maps API Version 3 (v3) with this online tool. Javascript
code for what you draw and create, will be shown.
Useful links:
Google Maps V3 Documentation
Polys in the Maps API v3
Google Maps API V3 discussion group