Properties

new GeoPoint(latitude, longitude)

Creates a GeoPoint.

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}`);
});

Parameters

Name Type Optional Description

latitude

 

 

The latitude as a number between -90 and 90.

longitude

 

 

The longitude as a number between -180 and 180.

Properties

read-only

latitude  number

The latitude as a number between -90 and 90.

read-only

longitude  number

The longitude as a number between -180 and 180.

Method

isEqual(other) → boolean

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

Parameter

Name Type Optional Description

other

any type

 

The value to compare against.

Returns

boolean 

true if this GeoPoint is equal to the provided value.