Home > @magiclane/maps-sdk > RectangleGeographicArea

RectangleGeographicArea class

RectangleGeographicArea object.

Signature:

export declare class RectangleGeographicArea implements GeographicArea 

Implements: GeographicArea

Constructors

Constructor

Modifiers

Description

(constructor)({ topLeft, bottomRight }, input)

Constructor

Properties

Property

Modifiers

Type

Description

bottomRight

Coordinates

Bottom-right coordinates of the rectangle

boundingBox

readonly

RectangleGeographicArea

Get the bounding box.

centerPoint

readonly

Coordinates

Retrieves the center point of the geographic area.

copy

readonly

RectangleGeographicArea

Create a new RectangleGeographicArea object with the same properties as the original.

isDefault

readonly

boolean

isEmpty

readonly

boolean

Checks if the geographic area is empty.

topLeft

Coordinates

Top-left coordinates of the rectangle

type

readonly

GeographicAreaType

Retrieves the specific type of the geographic area.

Methods

Method

Modifiers

Description

contains(area)

Checks if this rectangle completely contains another rectangle.

containsCoordinates(point)

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

convert(toType)

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

equals(other)

Equality comparison

fromJson(json)

fromJson(json)

static

Create from JSON representation

intersects(area)

Checks if this rectangle intersects with another rectangle.

makeIntersection(area)

Creates a new RectangleGeographicArea as the intersection of this rectangle and another rectangle.

makeUnion(area)

Creates a new RectangleGeographicArea as the union of this rectangle and another rectangle.

reset()

Resets the rectangle to default state.

toJson()

Convert to JSON representation

toString()

String representation