public final class MapUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
hasValidAccuracy(android.location.Location location)
Check if the hasAccuracy and getAccuracy functions are in sync.
|
static boolean |
hasValidAltitude(android.location.Location location)
Check if the hasAltitude and getAltitude functions are in sync.
|
static boolean |
hasValidBearing(android.location.Location location)
Deprecated.
Android will sometimes return Locations with
hasBearing() == true , but
getBearing() still returns a value greater than zero. To prevent this noise, this function
will be removed in a future release. |
static boolean |
hasValidSpeed(android.location.Location location)
Check if the speed is valid.
|
static boolean |
isValidLocation(double latitude,
double longitude)
Validates the given coordinates.
|
static boolean |
isValidLocation(android.location.Location location)
Validates the information stored in the given Location object: latitude, longitude, accuracy,
altitude and speed will be verified.
|
public static boolean isValidLocation(double latitude, double longitude)
latitude
- The latitude degrees of the location, [-90, 90].longitude
- The longitude degrees of the location, [-180, 180).public static boolean isValidLocation(android.location.Location location)
location
- The Location to validate. May not be null.public static boolean hasValidAccuracy(android.location.Location location)
location
- The Location to query.public static boolean hasValidAltitude(android.location.Location location)
location
- The Location to query.@Deprecated public static boolean hasValidBearing(android.location.Location location)
hasBearing() == true
, but
getBearing()
still returns a value greater than zero. To prevent this noise, this function
will be removed in a future release.location
- The Location to query.public static boolean hasValidSpeed(android.location.Location location)
location
- The Location to query.