google.maps.Data.Polygon
class
A Polygon geometry contains a number of Data.LinearRings. The first linear-ring must be the polygon exterior boundary and subsequent linear-rings must be interior boundaries, also known as holes. See the sample polygon with a hole.
This class implements
Data.Geometry.
| Constructor | |
|---|---|
Data.Polygon |
Data.Polygon(elements)Parameters:
Constructs a Data.Polygon from the given Data.LinearRings or arrays of positions. |
| Methods | |
|---|---|
forEachLatLng |
forEachLatLng(callback)Parameters:
Return Value: None
|
getArray |
getArray()Parameters: None
Return Value:
Array<Data.LinearRing>Returns an array of the contained Data.LinearRings. A new array is returned each time getArray() is called. |
getAt |
getAt(n)Parameters:
Return Value:
Data.LinearRingReturns the n-th contained Data.LinearRing. |
getLength |
getLength()Parameters: None
Return Value:
numberReturns the number of contained Data.LinearRings. |
getType |
getType()Parameters: None
Return Value:
stringReturns the string "Polygon". |