GeographyPoint class

Represents a geographic point in global coordinates.

Constructors

GeographyPoint({ latitude: number, longitude: number })

Constructs a new instance of GeographyPoint given the specified coordinates.

Properties

latitude

The latitude in decimal.

longitude

The longitude in decimal.

Methods

toJSON()

Used to serialize to a GeoJSON Point.

Constructor Details

GeographyPoint({ latitude: number, longitude: number })

Constructs a new instance of GeographyPoint given the specified coordinates.

new GeographyPoint(geographyPoint: { latitude: number, longitude: number })

Parameters

geographyPoint

{ latitude: number, longitude: number }

object with longitude and latitude values in decimal

Property Details

latitude

The latitude in decimal.

latitude: number

Property Value

number

longitude

The longitude in decimal.

longitude: number

Property Value

number

Method Details

toJSON()

Used to serialize to a GeoJSON Point.

function toJSON(): Record<string, unknown>

Returns

Record<string, unknown>