LatLng
public
final
class
LatLng
extends Object
java.lang.Object | |
↳ | com.google.android.libraries.car.app.model.LatLng |
Represents a geographical location with a latitude and a longitude.
Summary
Public methods | |
---|---|
static
LatLng
|
create(double latitude, double longitude)
Returns a new instance of a |
static
LatLng
|
create(Location location)
Returns a new instance of a |
boolean
|
equals(Object other)
|
double
|
getLatitude()
Returns the latitude of the location, in degrees. |
double
|
getLongitude()
Returns the longitude of the location, in degrees. |
int
|
hashCode()
|
String
|
toString()
|
Inherited methods | |
---|---|
Public methods
create
public static LatLng create (double latitude, double longitude)
Returns a new instance of a LatLng
.
Parameters | |
---|---|
latitude |
double |
longitude |
double |
Returns | |
---|---|
LatLng |
create
public static LatLng create (Location location)
Returns a new instance of a LatLng
with the same latitude and longitude contained in
the given Location
.
Parameters | |
---|---|
location |
Location |
Returns | |
---|---|
LatLng |
Throws | |
---|---|
NullPointerException |
if location is null .
|
getLatitude
public double getLatitude ()
Returns the latitude of the location, in degrees.
Returns | |
---|---|
double |
getLongitude
public double getLongitude ()
Returns the longitude of the location, in degrees.
Returns | |
---|---|
double |
hashCode
public int hashCode ()
Returns | |
---|---|
int |