google.maps.Data.GeometryCollection class
A GeometryCollection contains a number of geometry objects. Any LatLng or LatLngLiteral objects are automatically converted to Data.Point geometry objects.
This class implements Data.Geometry.
Constructor
Data.GeometryCollection(elements)
Parameters:
- elements: Array<Data.Geometry|LatLng|LatLngLiteral>
Constructs a Data.GeometryCollection from the given geometry objects or LatLngs.
Methods
forEachLatLng(callback)
Parameters:
- callback: function(LatLng)
Return Value: None
getArray()
Parameters: None
Return Value: Array<Data.Geometry>
Returns an array of the contained geometry objects. A new array is returned each time getArray() is called.
getAt(n)
Parameters:
- n: number
Return Value: Data.Geometry
Returns the n-th contained geometry object.
getLength()
Parameters: None
Return Value: number
Returns the number of contained geometry objects.
getType()
Parameters: None
Return Value: string
Returns the string "GeometryCollection".