An immutable object representing a geo point in Firestore. The geo pointis 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

  • newGeoPoint(latitudenumber, longitudenumber):GeoPoint
  • Creates a new immutable GeoPoint object with the provided latitude andlongitude values.

    Parameters

    • latitude:number

      The latitude as number between -90 and 90.

    • longitude:number

      The longitude as number between -180 and 180.

    ReturnsGeoPoint

Properties

latitude

latitude:number

The latitude of this GeoPoint instance.

longitude

longitude:number

The longitude of this GeoPoint instance.

Methods

isEqual

  • isEqual(otherGeoPoint):boolean
  • Returns true if thisGeoPoint is equal to the provided one.

    Parameters

    • other:GeoPoint

      TheGeoPoint to compare against.

    Returnsboolean

    true if thisGeoPoint is equal to the provided one.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-07-27 UTC.