Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

GeoPoint

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

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

class GeoPoint {
constructor(latitude: number, longitude: number);
get latitude(): number;
get longitude(): number;
 
isEqual(other: GeoPoint): boolean;
toJSON(): {
latitude: number;
longitude: number;
}
;
}

§Constructors

§
new GeoPoint(latitude: number, longitude: number)
[src]

Creates a new immutable GeoPoint object with the provided latitude and longitude values.

@param latitude
  • The latitude as number between -90 and 90.
@param longitude
  • The longitude as number between -180 and 180.

§Properties

§
latitude: number readonly
[src]

The latitude of this GeoPoint instance.

§
longitude: number readonly
[src]

The longitude of this GeoPoint instance.

§Methods

§
isEqual(other: GeoPoint): boolean
[src]

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

@param other
  • The GeoPoint to compare against.
@return

true if this GeoPoint is equal to the provided one.

§
toJSON(): {
latitude: number;
longitude: number;
}
[src]

Returns a JSON-serializable representation of this GeoPoint.