Class GeoPoint (3.27.2)

public class GeoPoint implements Serializable

Immutable class representing a geographic location in Firestore

Inheritance

Object > GeoPoint

Implements

Serializable

Constructors

GeoPoint(double latitude, double longitude)

public GeoPoint(double latitude, double longitude)

Construct a new GeoPoint using the provided latitude and longitude values.

Parameters
Name Description
latitude double

The latitude of this GeoPoint in the range [-90, 90].

longitude double

The longitude of this GeoPoint in the range [-180, 180].

Methods

equals(Object obj)

public boolean equals(Object obj)

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

Parameter
Name Description
obj Object

The object to compare against.

Returns
Type Description
boolean

Whether this GeoPoint is equal to the provided object.

Overrides

getLatitude()

public double getLatitude()

Returns the latitude.

Returns
Type Description
double

The latitude value of this GeoPoint.

getLongitude()

public double getLongitude()

Returns the longitude.

Returns
Type Description
double

The longitude value of this GeoPoint.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

toString()

public String toString()
Returns
Type Description
String
Overrides