Package es.situm.sdk.model.navigation
Class NavigationProgress
- java.lang.Object
-
- es.situm.sdk.model.navigation.NavigationProgress
-
- All Implemented Interfaces:
android.os.Parcelable
public class NavigationProgress extends Object implements android.os.Parcelable
Provide information of the progress of a user while following a route.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NavigationProgress.Builder
NavigationProgress
builder static inner class.
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<NavigationProgress>
CREATOR
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
describeContents()
boolean
equals(Object o)
Location
getClosestLocationInRoute()
Returns the closest location in the route from the user location provided toNavigationManager.updateWithLocation(Location)
.Point
getClosestPointInRoute()
Deprecated.Indication
getCurrentIndication()
Returns the current indicationdouble
getDistanceToClosestPointInRoute()
Returns the distance between the real user location (provided toNavigationManager.updateWithLocation(Location)
) and the closest route location (getClosestLocationInRoute()
).double
getDistanceToEndStep()
Returns the distance to the end this stepdouble
getDistanceToGoal()
Returns the distance fromgetClosestLocationInRoute()
to route's goal point.Indication
getNextIndication()
Returns the next indication.List<Point>
getPoints()
Returns remaining list of ordered points of the route.RouteStep
getRouteStep()
Returns the route step/edge/fragment closest to the user, where thegetClosestLocationInRoute()
is.List<RouteSegment>
getSegments()
Return list of ordered points split by floor, each list contains points from one floor, but can have multiple lists of the same floor.double
getTimeToEndStep()
Returns the estimated time to go fromgetClosestLocationInRoute()
to the end ofgetRouteStep()
, considering a speed of 1 meter/seconddouble
getTimeToGoal()
Returns the estimated time to go fromgetClosestLocationInRoute()
to the goal/end of route, considering a speed of 1 meter/secondint
hashCode()
String
toString()
void
writeToParcel(android.os.Parcel dest, int flags)
-
-
-
Field Detail
-
CREATOR
public static final android.os.Parcelable.Creator<NavigationProgress> CREATOR
-
-
Method Detail
-
getRouteStep
@NonNull public RouteStep getRouteStep()
Returns the route step/edge/fragment closest to the user, where thegetClosestLocationInRoute()
is.- Returns:
RouteStep
. Default isRouteStep.EMPTY
.
-
getClosestPointInRoute
@NonNull public Point getClosestPointInRoute()
Deprecated.Returns the route point closest to the user location provided toNavigationManager.updateWithLocation(Location)
. For route navigation, we assume this as the user location.
-
getClosestLocationInRoute
public Location getClosestLocationInRoute()
Returns the closest location in the route from the user location provided toNavigationManager.updateWithLocation(Location)
. For route navigation, we assume this as the user location.- Returns:
Location
-
getDistanceToClosestPointInRoute
public double getDistanceToClosestPointInRoute()
Returns the distance between the real user location (provided toNavigationManager.updateWithLocation(Location)
) and the closest route location (getClosestLocationInRoute()
).- Returns:
- double. Default is 0.
-
getDistanceToGoal
public double getDistanceToGoal()
Returns the distance fromgetClosestLocationInRoute()
to route's goal point.- Returns:
- double. Default is 0.
-
getCurrentIndication
@NonNull public Indication getCurrentIndication()
Returns the current indication
-
getNextIndication
@NonNull public Indication getNextIndication()
Returns the next indication. If this is the last indication it will returnIndication.EMPTY
-
getDistanceToEndStep
public double getDistanceToEndStep()
Returns the distance to the end this step
-
getTimeToGoal
public double getTimeToGoal()
Returns the estimated time to go fromgetClosestLocationInRoute()
to the goal/end of route, considering a speed of 1 meter/second- Returns:
- double. Default is 0.
-
getTimeToEndStep
public double getTimeToEndStep()
Returns the estimated time to go fromgetClosestLocationInRoute()
to the end ofgetRouteStep()
, considering a speed of 1 meter/second- Returns:
- double. Default is 0.
-
getPoints
@NonNull public List<Point> getPoints()
Returns remaining list of ordered points of the route. If you want the points to display them in a map usegetSegments()
- Returns:
- non-empty list of points
-
getSegments
@NonNull public List<RouteSegment> getSegments()
Return list of ordered points split by floor, each list contains points from one floor, but can have multiple lists of the same floor. Use this method to display segments in a map, each list should be a polyline.For example, if there is no path to go to the other side of the same floor and you need to go up one floor and then go down again to the original floor, this method will return one segment on the current floor, one segment on the upper floor and one more segment in the current floor.
Drawing example: if you want to draw all the points of a floor, you should draw a polyline for each list that contains the floor you want to show.
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-
-