public class IALocation
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
IALocation.Builder
Builder to configure
IALocation . |
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<IALocation> |
CREATOR |
static java.lang.String |
EXTRA_FLOOR_CERTAINTY
Key used when storing floor level information under
Location.getExtras() . |
static java.lang.String |
EXTRA_FLOOR_LEVEL
Key used when storing floor level information under
Location.getExtras() . |
static java.lang.String |
EXTRA_REGION
Key used when storing region information under
Location.getExtras() . |
Modifier | Constructor and Description |
---|---|
protected |
IALocation(android.os.Parcel in)
Do not use this constructor directly.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
static IALocation |
from(android.content.Intent intent)
Extracts an
IALocation from the extras of an Intent or null if not
present. |
static IALocation |
from(android.location.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 the floor plan information associated with this location as an
IARegion . |
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() |
android.location.Location |
toLocation()
Returns a platform location representing the same coordinate location as
this
instance. |
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final java.lang.String EXTRA_REGION
Location.getExtras()
.toLocation()
,
Constant Field Valuespublic static final java.lang.String EXTRA_FLOOR_LEVEL
Location.getExtras()
.toLocation()
,
Constant Field Valuespublic static final java.lang.String EXTRA_FLOOR_CERTAINTY
Location.getExtras()
.toLocation()
,
Constant Field Valuespublic static final android.os.Parcelable.Creator<IALocation> CREATOR
protected IALocation(android.os.Parcel in)
public IALocation.Builder newBuilder()
IALocation.Builder
pre-populated with values from this location
.public static IALocation from(android.location.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(android.content.Intent intent)
IALocation
from the extras of an Intent
or null
if not
present. Use this utility method for received Intents after requesting location updates with
IALocationManager.requestLocationUpdates(IALocationRequest, PendingIntent)
. The
location is stored in the extra Bundle
a byte array
with the
IALocationManager.EXTRA_LOCATION
key.intent
- Intent
to extract the IALocation
from. Can be null.IALocation
or null
public android.location.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()
IAFloorPlan
that this location is on. The floor levels of the IAFloorPlan
s are defined in the
mapping phase.
Returns floor level or 0
if no floor plan information is available at this location.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()
IARegion
.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
public int describeContents()
describeContents
in interface android.os.Parcelable