Circle shapes

In addition to the generic Polygonclass, the Google Maps JavaScript API includes a specific class for Circleobjects, to simplify their construction. A Circleis similar to a Polygonin that you can define custom colors, weights, and opacities for the edge of the circle (the stroke) and custom colors and opacities for the area within the circle (the fill). Colors should be indicated in hexadecimal numeric HTML style.

Polyline shapes

The Polylineclass defines a linear overlay of connected line segments on the map. Polylineobjects are drawn as a series of straight segments on the map. You can specify custom colors, weights, and opacities for the stroke of the line within the PolylineOptionswhen constructing your line, or you can change those properties after construction. The polyline's editableproperty specifies whether users can edit the shape.

Polygon shapes

A polygonrepresents an area enclosed by a closed path (or loop), which is defined by a series of coordinates. Polygonobjects are similar to Polylineobjects in that they consist of a series of coordinates in an ordered sequence. Polygons are drawn with a stroke and a fill. You can define custom colors, weights, and opacities for the edge of the polygon (the stroke) and custom colors and opacities for the enclosed area (the fill).

Rectangle shapes

In addition to a generic Polygonclass, the Google Maps JavaScript API includes a specific class for Rectangleobjects, to simplify their construction. A Rectangleis similar to a Polygonin that you can define custom colors, weights, and opacities for the edge of the rectangle (the stroke) and custom colors and opacities for the area within the rectangle (the fill). Colors should be indicated in hexadecimal numeric HTML style.