Polylines

The path of the polyline is defined by an array of array of two (latitude and longitude).

Polygons

The path of a polygon can be defined as an array of:

  • google.maps.LatLng objects, or
  • arrays of coordinates, with index 0 and 1 as, respectively, latitude and longitude (as in the example)

Also, you can add a GeoJSON Polygon or MultiPolygon path using useGeoJSON: true.

GeoJSON Polygons

The GeoJSON Polygon should be surrounded by brackets, according the specification.