Home > @magiclane/maps-sdk > PolygonGeographicArea

PolygonGeographicArea class

PolygonGeographicArea object.

Signature:

export declare class PolygonGeographicArea implements GeographicArea 

Implements: GeographicArea

Constructors

Constructor

Modifiers

Description

(constructor)({ coordinates }, input)

Constructor

Properties

Property

Modifiers

Type

Description

boundingBox

readonly

RectangleGeographicArea

Get the bounding box.

centerPoint

readonly

Coordinates

Retrieves the center point of the geographic area.

coordinates

Coordinates[]

List of coordinates defining the polygon

isDefault

readonly

boolean

isEmpty

readonly

boolean

Checks if the geographic area is empty.

type

readonly

GeographicAreaType

Retrieves the specific type of the geographic area.

Methods

Method

Modifiers

Description

containsCoordinates(point)

Checks if the specified point is contained within the geographic area.

convert(toType)

Converts the polygon to another geographic area type, if possible.

equals(other)

Equality comparison

fromJson(json)

fromJson(json)

static

Create from JSON representation

reset()

Resets the polygon to default state.

toJson()

Convert to JSON representation

toString()

String representation