Package es.situm.sdk.model.location
Class Location
- java.lang.Object
 - 
- es.situm.sdk.model.location.Location
 
 
- 
- All Implemented Interfaces:
 android.os.Parcelable,BuildingResource,FloorResource
public class Location extends Object implements FloorResource, android.os.Parcelable
A location. It can be indoor or outdoor, checkisIndoor()andisOutdoor(). A valid indoor location has floorIdentifier and cartesianCoordinate. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLocation.Builderstatic classLocation.QualityThe quality of the location/bearing. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdescribeContents()booleanequals(Object o)floatgetAccuracy()Return the accuracy radius (in meters)AnglegetBearing()Return the bearing (in degrees) with respect to the Earth North.Location.QualitygetBearingQuality()Return the quality of the cartesian bearing.StringgetBuildingIdentifier()Only used in indoor.AnglegetCartesianBearing()Only used in indoor.CartesianCoordinategetCartesianCoordinate()Only used in indoor.CoordinategetCoordinate()Return the coordinate of the locationMap<String,String>getCustomFields()Returns map of custom fields, indexed by their name.StringgetDeviceId()Returns the device identifier that has generated the locationStringgetFloorIdentifier()Only used in indoor.PointgetPosition()Return the position of the location.StringgetProvider()Location.QualitygetQuality()Only used in indoor.longgetTime()Return the timestamp of the location.booleanhasBearing()Return true if the location has bearing and the bearing quality isLocation.Quality.HIGH, false otherwise.booleanhasCartesianBearing()Only used in indoor.inthashCode()booleanisIndoor()Return true if the location is indoorbooleanisOutdoor()Return true if the location is outdoorStringtoString()voidwriteToParcel(android.os.Parcel dest, int flags) 
 - 
 
- 
- 
Field Detail
- 
CREATOR
public static final android.os.Parcelable.Creator<Location> CREATOR
 
 - 
 
- 
Method Detail
- 
getPosition
public Point getPosition()
Return the position of the location. Only needed if you neede access to the internalPointobject. It's better to use directlygetCoordinate(),getCartesianCoordinate(), etc. on theLocationobject 
- 
isIndoor
public boolean isIndoor()
Return true if the location is indoor- See Also:
 isOutdoor()
 
- 
getDeviceId
public String getDeviceId()
Returns the device identifier that has generated the location 
- 
isOutdoor
public boolean isOutdoor()
Return true if the location is outdoor- See Also:
 isIndoor()
 
- 
getCoordinate
public Coordinate getCoordinate()
Return the coordinate of the location 
- 
getCartesianCoordinate
public CartesianCoordinate getCartesianCoordinate()
Only used in indoor. Return the cartesian coordinate in the corresponding floor of the building image. 
- 
getBuildingIdentifier
public String getBuildingIdentifier()
Only used in indoor. Return the building identifier.- Specified by:
 getBuildingIdentifierin interfaceBuildingResource
 
- 
getFloorIdentifier
public String getFloorIdentifier()
Only used in indoor. Return the floor identifier.- Specified by:
 getFloorIdentifierin interfaceFloorResource
 
- 
getQuality
public Location.Quality getQuality()
Only used in indoor. Return an indicative of quality calculated with accuracy and building size. 
- 
getTime
public long getTime()
Return the timestamp of the location. 
- 
getAccuracy
public float getAccuracy()
Return the accuracy radius (in meters) 
- 
hasCartesianBearing
public boolean hasCartesianBearing()
Only used in indoor. Return true if the location has cartesian bearing and the bearing quality isLocation.Quality.HIGH, false otherwise.- See Also:
 getCartesianBearing(),getBearingQuality()
 
- 
getCartesianBearing
public Angle getCartesianBearing()
Only used in indoor. Return the bearing with respect to the building, being 0 the west-east axis. IfhasCartesianBearing()is false the bearing returned couldn't be reliable. You can get the bearing quality withgetBearingQuality() 
- 
hasBearing
public boolean hasBearing()
Return true if the location has bearing and the bearing quality isLocation.Quality.HIGH, false otherwise.- See Also:
 getBearing(),getBearingQuality()
 
- 
getBearing
public Angle getBearing()
Return the bearing (in degrees) with respect to the Earth North. IfhasBearing()is false it will return a default Angle 
- 
getProvider
public String getProvider()
 
- 
getBearingQuality
public Location.Quality getBearingQuality()
Return the quality of the cartesian bearing. It's recommended to use the value of the bearing only if the quality isLocation.Quality.HIGH. If the quality isLocation.Quality.LOWthe bearing is not reliable. If the location is outdoor and the bearing is set the quality will beLocation.Quality.HIGH 
- 
getCustomFields
public Map<String,String> getCustomFields()
Returns map of custom fields, indexed by their name. 
- 
describeContents
public int describeContents()
- Specified by:
 describeContentsin interfaceandroid.os.Parcelable
 
- 
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)- Specified by:
 writeToParcelin interfaceandroid.os.Parcelable
 
 - 
 
 -