Package com.mapsindoors.mapssdk
Class MPPositionResult
- java.lang.Object
-
- com.mapsindoors.mapssdk.MPPositionResult
-
- All Implemented Interfaces:
PositionResult
public class MPPositionResult extends java.lang.Object implements PositionResult
-
-
Constructor Summary
Constructors Constructor Description MPPositionResult()
MPPositionResult(Point point)
MPPositionResult(Point point, float accuracy)
MPPositionResult(Point point, float accuracy, float bearing)
MPPositionResult(Point point, float accuracy, float bearing, int floor)
MPPositionResult(Point point, float accuracy, int floor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getAccuracy()
Get the estimated horizontal accuracy of this location, radial, in metersandroid.location.Location
getAndroidLocation()
ALocation
with the original data, if availablefloat
getBearing()
Get the bearing, in degreesint
getFloor()
Gets the floor (floor index)Point
getPoint()
Gets the position, as aPoint
PositionProvider
getProvider()
Gets the position provider that created this position resultboolean
hasAccuracy()
Checks if horizontal accuracy is availableboolean
hasBearing()
Checks if bearing is availableboolean
hasFloor()
Checks if floor info is availablevoid
setAccuracy(float accuracy)
Set the estimated horizontal accuracy of this location, radial, in metersvoid
setAndroidLocation(android.location.Location location)
Sets theLocation
origin ofvoid
setBearing(float bearing)
Set the bearing, in degreesvoid
setFloor(int floor)
Sets the floorvoid
setProvider(PositionProvider provider)
java.lang.String
toString()
-
-
-
Constructor Detail
-
MPPositionResult
public MPPositionResult()
-
MPPositionResult
public MPPositionResult(@NonNull Point point)
-
MPPositionResult
public MPPositionResult(@NonNull Point point, float accuracy)
-
MPPositionResult
public MPPositionResult(@NonNull Point point, float accuracy, float bearing)
-
MPPositionResult
public MPPositionResult(@NonNull Point point, float accuracy, float bearing, int floor)
-
MPPositionResult
public MPPositionResult(@NonNull Point point, float accuracy, int floor)
-
-
Method Detail
-
getPoint
@Nullable public Point getPoint()
Gets the position, as aPoint
- Specified by:
getPoint
in interfacePositionResult
- Returns:
- A
Point
-
hasFloor
public boolean hasFloor()
Checks if floor info is availableIf true, the value returned by
getFloor()
will be a valid one- Specified by:
hasFloor
in interfacePositionResult
- Returns:
-
getFloor
public int getFloor()
Gets the floor (floor index)The value returned is only valid if
true
is returned when callinghasFloor()
- Specified by:
getFloor
in interfacePositionResult
- Returns:
-
setFloor
public void setFloor(int floor)
Sets the floor- Specified by:
setFloor
in interfacePositionResult
- Parameters:
floor
-
-
hasBearing
public boolean hasBearing()
Checks if bearing is available- Specified by:
hasBearing
in interfacePositionResult
- Returns:
-
getBearing
public float getBearing()
Get the bearing, in degrees- Specified by:
getBearing
in interfacePositionResult
- Returns:
-
setBearing
public void setBearing(float bearing)
Set the bearing, in degrees- Specified by:
setBearing
in interfacePositionResult
- Parameters:
bearing
-
-
hasAccuracy
public boolean hasAccuracy()
Checks if horizontal accuracy is available- Specified by:
hasAccuracy
in interfacePositionResult
- Returns:
-
getAccuracy
public float getAccuracy()
Get the estimated horizontal accuracy of this location, radial, in meters- Specified by:
getAccuracy
in interfacePositionResult
- Returns:
-
setAccuracy
public void setAccuracy(float accuracy)
Set the estimated horizontal accuracy of this location, radial, in meters- Specified by:
setAccuracy
in interfacePositionResult
- Parameters:
accuracy
-
-
getProvider
@Nullable public PositionProvider getProvider()
Gets the position provider that created this position result- Specified by:
getProvider
in interfacePositionResult
- Returns:
-
setProvider
public void setProvider(@Nullable PositionProvider provider)
- Specified by:
setProvider
in interfacePositionResult
-
getAndroidLocation
@Nullable public android.location.Location getAndroidLocation()
ALocation
with the original data, if available- Specified by:
getAndroidLocation
in interfacePositionResult
- Returns:
- A
Location
ornull
-
setAndroidLocation
public void setAndroidLocation(@Nullable android.location.Location location)
Sets theLocation
origin of- Specified by:
setAndroidLocation
in interfacePositionResult
- Parameters:
location
- ALocation
ornull
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-