Class Coordinate

Class representing a pseudo-mercator coordinate.

The Pseudo-Mercator projection is a type of cylindrical and conformal map projection. It is identified as EPSG:3857 (https://epsg.io/3857). This projection is a modified version of the traditional Mercator projection, which is commonly used in marine navigation.

Properties

floorId?: string

The floor ID of the coordinate.

id: string = ...
latitude: number

The latitude of the coordinate.

longitude: number

The longitude of the coordinate.

Methods

  • Checks if this coordinate is equal to another coordinate.

    Parameters

    • coordinate: Coordinate

      The coordinate to compare with.

    Returns boolean

    True if coordinates are equal, false otherwise.

  • Serializes the coordinate data to JSON.

    Returns {
        floor: undefined | string;
        latitude: number;
        longitude: number;
    }

    An object representing the coordinate.

    • floor: undefined | string
    • latitude: number
    • longitude: number
  • Checks if the provided instance is of type Coordinate.

    Parameters

    • instance: object

      The instance to check.

    Returns instance is Coordinate

    True if the instance is a Coordinate, false otherwise.