google-maps-documentation

Data.LinearRing class

google.maps.Data.LinearRing class

A LinearRing geometry contains a number of LatLngs, representing a closed LineString. There is no need to make the first LatLng equal to the last LatLng. The LinearRing is closed implicitly.

This class implements Data.Geometry.

Constructor
Data.LinearRing
Data.LinearRing(elements)
Parameters: 
Constructs a Data.LinearRing from the given LatLngs or LatLngLiterals.
Methods
forEachLatLng
forEachLatLng(callback)
Parameters: 
  • callbackfunction(LatLng)
Return Value:  None
getArray
getArray()
Parameters:  None
Return Value:  Array<LatLng>
Returns an array of the contained LatLngs. A new array is returned each time getArray() is called.
getAt
getAt(n)
Parameters: 
  • nnumber
Return Value:  LatLng
Returns the n-th contained LatLng.
getLength
getLength()
Parameters:  None
Return Value:  number
Returns the number of contained LatLngs.
getType
getType()
Parameters:  None
Return Value:  string
Returns the string "LinearRing".