Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Access by calling const {Data} = await google.maps.importLibrary("maps"). See https://developers.google.com/maps/documentation/javascript/libraries.

Hierarchy

  • Polygon

Implements

Index

Constructors

Methods

  • forEachLatLng(callback: ((a: LatLng) => void)): void
  • Repeatedly invokes the given function, passing a point from the geometry to the function on each invocation.

    Parameters

    Returns void

  • Returns an array of the contained Data.LinearRings. A new array is returned each time getArray() is called.

    Returns LinearRing[]

  • Returns the n-th contained Data.LinearRing.

    Parameters

    • n: number

    Returns LinearRing

  • getLength(): number
  • Returns the number of contained Data.LinearRings.

    Returns number

  • getType(): string
  • Returns the string "Polygon".

    Returns string

Generated using TypeDoc