public class IALocation extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
IALocation.Builder
Builder to configure
IALocation . |
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<IALocation> |
CREATOR |
static String |
EXTRA_FLOOR_CERTAINTY
Key used when storing floor level information under
Location.getExtras() . |
static String |
EXTRA_FLOOR_LEVEL
Key used when storing floor level information under
Location.getExtras() . |
static String |
EXTRA_REGION
Key used when storing region information under
Location.getExtras() . |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
protected |
IALocation(Parcel in)
Do not use this constructor directly.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(Object o) |
static IALocation |
from(IARegion region)
Convenience method to construct
IALocation object based on given IARegion . |
static IALocation |
from(Location location)
Convenience method to construct
IALocation object from properties in a platform
location . |
float |
getAccuracy()
Returns location accuracy in meters.
|
double |
getAltitude()
Returns altitude in meters, or
0.0 if not available. |
float |
getBearing()
Returns bearing in degrees, in range of
(0.0, 360.0] . |
float |
getFloorCertainty()
The certainty of the floor selection between 0 and 1.
|
int |
getFloorLevel()
The logical floor level of building.
|
double |
getLatitude()
Returns latitude in degrees.
|
double |
getLongitude()
Returns longitude in degrees.
|
IARegion |
getRegion()
Returns region information from which this location was produced from.
|
long |
getTime()
Returns UTC time of this location fix.
|
boolean |
hasFloorCertainty()
Returns
true if this location fix had floor certainty information. |
boolean |
hasFloorLevel()
Returns
true if this location fix had floor level information. |
int |
hashCode() |
IALocation.Builder |
newBuilder() |
Location |
toLocation()
Returns a platform location representing the same coordinate location as
this
instance. |
String |
toString() |
void |
writeToParcel(Parcel dest,
int flags) |
public static final String EXTRA_REGION
Location.getExtras()
.toLocation()
,
Constant Field Valuespublic static final String EXTRA_FLOOR_LEVEL
Location.getExtras()
.toLocation()
,
Constant Field Valuespublic static final String EXTRA_FLOOR_CERTAINTY
Location.getExtras()
.toLocation()
,
Constant Field Valuespublic static final Parcelable.Creator<IALocation> CREATOR
protected IALocation(Parcel in)
public IALocation.Builder newBuilder()
IALocation.Builder
pre-populated with values from this location
.public static IALocation from(Location location)
IALocation
object from properties in a platform
location
. The returned IALocation
can be used e.g. with
IALocationManager.setLocation(IALocation)
IALocation
object populated with values read from location
IALocationManager.setLocation(IALocation)
public static IALocation from(IARegion region)
IALocation
object based on given IARegion
.
The returned IALocation
can be used e.g. with
IALocationManager.setLocation(IALocation)
.IALocation
object populated with region set to given region
.IALocationManager.setLocation(IALocation)
public Location toLocation()
this
instance.
IndoorAtlas specific attributes that the regular Location
does not express,
such as floor level and region are stored under extra bundle returned by
Location.getExtras()
. See EXTRA_XXX
constants in this class.
Location
instance representing this
objectpublic double getLatitude()
public double getLongitude()
public float getBearing()
(0.0, 360.0]
. North is 0 degrees, east 90
degrees and so on.public float getAccuracy()
public long getTime()
public double getAltitude()
0.0
if not available.public boolean hasFloorLevel()
true
if this location fix had floor level information.getFloorLevel()
,
hasFloorCertainty()
,
getFloorCertainty()
public int getFloorLevel()
0
if information
not available.hasFloorLevel()
,
hasFloorCertainty()
,
getFloorCertainty()
public boolean hasFloorCertainty()
true
if this location fix had floor certainty information.hasFloorLevel()
,
getFloorLevel()
,
getFloorCertainty()
public float getFloorCertainty()
hasFloorLevel()
,
getFloorLevel()
,
hasFloorCertainty()
public IARegion getRegion()
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
public int describeContents()
describeContents
in interface Parcelable