Register now for Android Dev Summit 2019!

LatLng

public final class LatLng
extends Object implements VersionedParcelable

java.lang.Object
   ↳ androidx.car.cluster.navigation.LatLng


A representation of a latitude, longitude that can be serialized as a VersionedParcelable.

Unlike Location, this class only contains latitude and longitude and not other fields like bearing, speed and so on.

Summary

Public constructors

LatLng(double latitude, double longitude)

Construct a new LatLng with the given latitude and longitude.

Public methods

boolean equals(Object o)
double getLatitude()

Returns the latitude.

double getLongitude()

Returns the longitude.

int hashCode()
String toString()

Inherited methods

Public constructors

LatLng

public LatLng (double latitude, 
                double longitude)

Construct a new LatLng with the given latitude and longitude.

Parameters
latitude double

longitude double

Public methods

equals

public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getLatitude

public double getLatitude ()

Returns the latitude.

Returns
double

getLongitude

public double getLongitude ()

Returns the longitude.

Returns
double

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String