@Implements(value=android.location.Location.class) public class ShadowLocation extends Object
Location.| Constructor and Description |
|---|
ShadowLocation() |
| Modifier and Type | Method and Description |
|---|---|
void |
__constructor__(android.location.Location l) |
void |
__constructor__(String provider) |
float |
bearingTo(android.location.Location dest)
Returns the approximate initial bearing in degrees East of true
North when traveling along the shortest path between this
location and the given location.
|
static void |
computeDistanceAndBearing(double lat1,
double lon1,
double lat2,
double lon2,
float[] results) |
static void |
distanceBetween(double startLatitude,
double startLongitude,
double endLatitude,
double endLongitude,
float[] results)
If it is non-null, returns the mock distance last set with
setDistanceBetween(float[]). |
float |
distanceTo(android.location.Location dest)
Returns the approximate distance in meters between this
location and the given location.
|
boolean |
equals(Object o) |
float |
getAccuracy() |
double |
getAltitude() |
float |
getBearing() |
android.os.Bundle |
getExtras() |
double |
getLatitude() |
double |
getLongitude() |
String |
getProvider() |
float |
getSpeed() |
long |
getTime() |
boolean |
hasAccuracy() |
boolean |
hasAltitude() |
boolean |
hasBearing() |
int |
hashCode() |
boolean |
hasSpeed() |
void |
removeAccuracy() |
void |
removeAltitude() |
void |
removeBearing() |
void |
removeSpeed() |
void |
set(android.location.Location l) |
void |
setAccuracy(float accuracy) |
void |
setAltitude(double altitude) |
void |
setBearing(float bearing) |
static void |
setDistanceBetween(float[] distanceBetween) |
void |
setExtras(android.os.Bundle extras) |
void |
setLatitude(double latitude) |
void |
setLongitude(double longitude) |
void |
setProvider(String provider) |
void |
setSpeed(float speed) |
void |
setTime(long time) |
String |
toString() |
public void __constructor__(android.location.Location l)
public void __constructor__(String provider)
@Implementation public void set(android.location.Location l)
@Implementation public String getProvider()
@Implementation public void setProvider(String provider)
@Implementation public long getTime()
@Implementation public void setTime(long time)
@Implementation public float getAccuracy()
@Implementation public void setAccuracy(float accuracy)
@Implementation public void removeAccuracy()
@Implementation public boolean hasAccuracy()
@Implementation public double getAltitude()
@Implementation public void setAltitude(double altitude)
@Implementation public void removeAltitude()
@Implementation public boolean hasAltitude()
@Implementation public float getBearing()
@Implementation public void setBearing(float bearing)
@Implementation public void removeBearing()
@Implementation public boolean hasBearing()
@Implementation public double getLatitude()
@Implementation public void setLatitude(double latitude)
@Implementation public double getLongitude()
@Implementation public void setLongitude(double longitude)
@Implementation public float getSpeed()
@Implementation public void setSpeed(float speed)
@Implementation public void removeSpeed()
@Implementation public boolean hasSpeed()
@HiddenApi
@Implementation
public static void computeDistanceAndBearing(double lat1,
double lon1,
double lat2,
double lon2,
float[] results)
public static void setDistanceBetween(float[] distanceBetween)
@Implementation
public static void distanceBetween(double startLatitude,
double startLongitude,
double endLatitude,
double endLongitude,
float[] results)
setDistanceBetween(float[]).
Otherwise computes the approximate distance in meters between two
locations, and optionally the initial and final bearings of the
shortest path between them. Distance and bearing are defined using the
WGS84 ellipsoid.
The computed distance is stored in results[0]. If results has length 2 or greater, the initial bearing is stored in results[1]. If results has length 3 or greater, the final bearing is stored in results[2].
startLatitude - the starting latitudestartLongitude - the starting longitudeendLatitude - the ending latitudeendLongitude - the ending longituderesults - an array of floats to hold the resultsIllegalArgumentException - if results is null or has length < 1@Implementation public float distanceTo(android.location.Location dest)
dest - the destination location@Implementation public float bearingTo(android.location.Location dest)
dest - the destination location@Implementation public android.os.Bundle getExtras()
@Implementation public void setExtras(android.os.Bundle extras)
Copyright © 2016. All rights reserved.