Class TrackingStatus
- java.lang.Object
-
- com.esri.arcgisruntime.navigation.TrackingStatus
-
public final class TrackingStatus extends java.lang.Object
Contains information about route tracker status.Subscribe to
RouteTracker.TrackingStatusChangedListener
for getting all updates.- Since:
- 100.6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TrackingStatus.Distance
Defines tracking distance.static class
TrackingStatus.Progress
Defines tracking progress (passed and remaining geometries, remaining time and distance).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getApproachingFinalDestination()
Returns true if the nextStop
(or stops) are the final destination in the route.int
getCurrentManeuverIndex()
Gets the current maneuver index.TrackingStatus.Progress
getDestinationProgress()
Gets the tracking progress until next destination (stop).DestinationStatus
getDestinationStatus()
Gets the destination status.LocationDataSource.Location
getDisplayLocation()
Gets the display location.LocationDataSource.Location
getLocationOnRoute()
Gets the location on route.TrackingStatus.Progress
getManeuverProgress()
Gets the tracking progress along current maneuver.int
getRemainingDestinationCount()
Gets the remaining destination count.TrackingStatus.Progress
getRouteProgress()
Gets the tracking progress along entire route.RouteResult
getRouteResult()
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.boolean
isOnRoute()
Gets boolean indicating whether or not the current location is on the route.boolean
isRouteCalculating()
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()
=true
then this will be an adjusted location (snapped to route) and bearing (smoothed). - If current location
isOnRoute()
=false
then 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:
true
if 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:
true
if 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()
=true
this will be the same as thegetDisplayLocation()
. - If current status is
isOnRoute()
=false
this 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
RouteResult
can be different than theRouteResult
originally 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()
= true
this will return a list with multiple index values. When there are no coincident stops or theRouteTracker.getSkipCoincidentStops() = false
this 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
-
-