GeoPoint

GeoPoint

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

Constructor

new GeoPoint(latitude, longitude)

Creates a GeoPoint.

Parameters:
Name Type Description
latitude number

The latitude as a number between -90 and 90.

longitude number

The longitude as a number between -180 and 180.

Source:
Example
let data = {
  google: new Firestore.GeoPoint(37.422, 122.084)
};

firestore.doc('col/doc').set(data).then(() => {
  console.log(`Location is ${data.google.latitude}, ` +
    `${data.google.longitude}`);
});

Members

(readonly) latitude :number

The latitude as a number between -90 and 90.

Source:

(readonly) longitude :number

The longitude as a number between -180 and 180.

Source:

Methods

isEqual(other) → {boolean}

Returns true if this GeoPoint is equal to the provided value.

Parameters:
Name Type Description
other *

The value to compare against.

Source: