Skip to content

Latest commit

 

History

History
76 lines (39 loc) · 1.8 KB

Data.Polygon.md

File metadata and controls

76 lines (39 loc) · 1.8 KB

See html formatted version

Data.Polygon class

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

undefined

Data.Polygon(elements)

Parameters: 

Constructs a Data.Polygon from the given Data.LinearRings or arrays of positions.

Methods

undefined

forEachLatLng(callback)

Parameters: 

  • callback:  function(LatLng)

Return Value:  None

undefined

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.

undefined

getAt(n)

Parameters: 

  • n:  number

Return Value:  Data.LinearRing

Returns the n-th contained Data.LinearRing.

undefined

getLength()

Parameters:  None

Return Value:  number

Returns the number of contained Data.LinearRings.

undefined

getType()

Parameters:  None

Return Value:  string

Returns the string "Polygon".