Class TrackingStatus
- java.lang.Object
-
- com.esri.arcgisruntime.navigation.TrackingStatus
-
public final class TrackingStatus extends java.lang.ObjectContains information about route tracker status.Subscribe to
RouteTracker.TrackingStatusChangedListenerfor getting all updates.- Since:
- 100.6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTrackingStatus.DistanceDefines tracking distance.static classTrackingStatus.ProgressDefines tracking progress (passed and remaining geometries, remaining time and distance).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetApproachingFinalDestination()Returns true if the nextStop(or stops) are the final destination in the route.intgetCurrentManeuverIndex()Gets the current maneuver index.TrackingStatus.ProgressgetDestinationProgress()Gets the tracking progress until next destination (stop).DestinationStatusgetDestinationStatus()Gets the destination status.LocationDataSource.LocationgetDisplayLocation()Gets the display location.LocationDataSource.LocationgetLocationOnRoute()Gets the location on route.TrackingStatus.ProgressgetManeuverProgress()Gets the tracking progress along current maneuver.intgetRemainingDestinationCount()Gets the remaining destination count.TrackingStatus.ProgressgetRouteProgress()Gets the tracking progress along entire route.RouteResultgetRouteResult()Gets the route result presently being used by route tracker.java.util.List<java.lang.Integer>getStopIndexesAtNextDestination()Gets theRoute.getStops()index values relating to the upcoming destination/arrival.booleanisOnRoute()Gets boolean indicating whether or not the current location is on the route.booleanisRouteCalculating()Gets boolean indicating whether the route is currently being calculated.
-
-
-
Method Detail
-
getApproachingFinalDestination
public boolean getApproachingFinalDestination()
Returns true if the nextStop(or stops) are the final destination in the route. If there are coincident stops at the end theRouteTracker.getSkipCoincidentStops()value determines if they are treated as single destination or not.- Returns:
- returns true if the next
Stop(or stops) are the final destination in the route - Since:
- 100.9.0
-
getCurrentManeuverIndex
public int getCurrentManeuverIndex()
Gets the current maneuver index.The index of current maneuver in
Route.getDirectionManeuvers().- Returns:
- the current maneuver index
- Since:
- 100.6.0
-
getDestinationProgress
public TrackingStatus.Progress getDestinationProgress()
Gets the tracking progress until next destination (stop).- Returns:
- the tracking progress until next destination (stop)
- Since:
- 100.6.0
-
getDestinationStatus
public DestinationStatus getDestinationStatus()
Gets the destination status.- Returns:
- the destination status
- Since:
- 100.6.0
-
getDisplayLocation
public LocationDataSource.Location getDisplayLocation()
Gets the display location.This location should be used for displaying current position on a map.
- If current location
isOnRoute()=truethen this will be an adjusted location (snapped to route) and bearing (smoothed). - If current location
isOnRoute()=falsethen this will be the passed in GPS location, but with an adjusted bearing (smoothed).
- Returns:
- the display location
- Since:
- 100.6.0
- If current location
-
isOnRoute
public boolean isOnRoute()
Gets boolean indicating whether or not the current location is on the route.- Returns:
trueif the current location is on the route,false- otherwise- Since:
- 100.6.0
-
isRouteCalculating
public boolean isRouteCalculating()
Gets boolean indicating whether the route is currently being calculated.For getting event about route calculating start subscribe to
RouteTracker.RerouteStartedListener.- Returns:
trueif the route calculating is started,false- otherwise- Since:
- 100.6.0
-
getLocationOnRoute
public LocationDataSource.Location getLocationOnRoute()
Gets the location on route.Snapped to route location of last GPS location passed in to
RouteTracker.trackLocationAsync(LocationDataSource.Location).- If current status is
isOnRoute()=truethis will be the same as thegetDisplayLocation(). - If current status is
isOnRoute()=falsethis value is not updated and last location that was on the route will be returned.
- Returns:
- the location on route
- Since:
- 100.6.0
- If current status is
-
getManeuverProgress
public TrackingStatus.Progress getManeuverProgress()
Gets the tracking progress along current maneuver.- Returns:
- the tracking progress along current maneuver
- Since:
- 100.6.0
-
getRemainingDestinationCount
public int getRemainingDestinationCount()
Gets the remaining destination count.The number of (routed) stops yet to be visited. This value does not include waypoints, unlocated/unrouted locations. Calling
RouteTracker.switchToNextDestinationAsync()will decrease value.- Returns:
- the remaining destination count
- Since:
- 100.6.0
-
getRouteProgress
public TrackingStatus.Progress getRouteProgress()
Gets the tracking progress along entire route.- Returns:
- the tracking progress along entire route
- Since:
- 100.6.0
-
getRouteResult
public RouteResult getRouteResult()
Gets the route result presently being used by route tracker.If rerouting happened during tracking, this
RouteResultcan be different than theRouteResultoriginally set in theRouteTracker. For getting new route result from event addRouteTracker.addRerouteCompletedListener(RouteTracker.RerouteCompletedListener).- Returns:
- the route result presently being used by route tracker
- Since:
- 100.6.0
-
getStopIndexesAtNextDestination
public java.util.List<java.lang.Integer> getStopIndexesAtNextDestination()
Gets theRoute.getStops()index values relating to the upcoming destination/arrival.If there are coincident stops and the
RouteTracker.getSkipCoincidentStops()= truethis will return a list with multiple index values. When there are no coincident stops or theRouteTracker.getSkipCoincidentStops() = falsethis will return a list with just a single index value. This list can be used to relate a destination/arrival to the stops in theRoute.getStops()array.- Returns:
- the
Route.getStops()index values relating to the upcoming destination/arrival - Since:
- 100.9.0
-
-