Naar console

An immutable object representing a geo point in Firestore. The geo point is represented as latitude/longitude pair.

Latitude values are in the range of [-90, 90]. Longitude values are in the range of [-180, 180].

Index

Constructors

Properties

Methods

Constructors

constructor

  • new GeoPoint(latitude: number, longitude: number): GeoPoint
  • Creates a new immutable GeoPoint object with the provided latitude and longitude values.

    Parameters

    • latitude: number

      The latitude as number between -90 and 90.

    • longitude: number

      The longitude as number between -180 and 180.

    Returns GeoPoint

Properties

latitude

latitude: number

The latitude of this GeoPoint instance.

longitude

longitude: number

The longitude of this GeoPoint instance.

Methods

isEqual

  • isEqual(other: GeoPoint): boolean
  • Returns true if this GeoPoint is equal to the provided one.

    Parameters

    • other: GeoPoint

      The GeoPoint to compare against.

    Returns boolean

    true if this GeoPoint is equal to the provided one.