RouteTracker

constructor(routeResult: RouteResult, routeIndex: Int, skipCoincidentStops: Boolean)

Creates a route tracker using a specific route from a route result with an option to specify treating coincident stops as a single destination. The new route tracker will have a navigation mode of NavigationMode.Driving. An exception is thrown if the Route is not found or if it lacks Route.stops and Route.directionManeuvers.

Since

200.1.0

Parameters

routeResult

A RouteResult generated from route task solve. The RouteResult must contain at least one Route (with Route.stops and Route.directionManeuvers).

routeIndex

Zero-based index into the array of RouteResult.routes, selecting a Route to track. The selected Route must contain Route.stops and Route.directionManeuvers.

skipCoincidentStops

True if coincident stops (multiple stops in a row at the same location) should be treated as a single destination, false otherwise. When true, if there are multiple stops in a row at the same network location, the new voice guidance event will fire a single time and calling RouteTracker.switchToNextDestination will skip over the other coincident stops, setting the state to the next relevant direction maneuver. If false, each stop will be treated as a unique destination. If your route does not have coincident stops this parameter will have no effect.


constructor(routeResult: RouteResult, routeIndex: Int, skipCoincidentStops: Boolean, navigationMode: NavigationMode)

Creates a RouteTracker from a specified route in a route result, an option for handling coincident stops, and a navigation mode. The default navigation mode is NavigationMode.Driving. An exception is thrown if the Route is not found or if it lacks Route.stops and Route.directionManeuvers.

Since

300.0.0

Parameters

routeResult

A RouteResult generated from route task solve. The RouteResult must contain at least one Route (with Route.stops and Route.directionManeuvers).

routeIndex

Zero-based index into the array of RouteResult.routes, selecting a Route to track. The selected Route must contain Route.stops and Route.directionManeuvers.

skipCoincidentStops

True if coincident stops (multiple stops in a row at the same location) should be treated as a single destination, false otherwise. When true, if there are multiple stops in a row at the same network location, the new voice guidance event will fire a single time and calling RouteTracker.switchToNextDestination will skip over the other coincident stops, setting the state to the next relevant direction maneuver. If false, each stop will be treated as a unique destination. If your route does not have coincident stops this parameter will have no effect.

navigationMode

The navigation mode to use for the route tracking. This determines how the route is followed and how navigation events are triggered.