switchToAlternativeRoute

fun switchToAlternativeRoute(alternativeRoute: NavigationRoute, callback: RoutesSetCallback? = null)

Switches MapboxNavigation to alternative route, i.e. the selected alternative become primary route, while primary route becomes alternative. Limitation: switch to alternative route could be performed only when getTripSessionState is TripSessionState.STARTED and after at lest one RouteProgress was emitted after the latest routes update.

Parameters

alternativeRoute

is an alternative route the navigation should switch to. It should be present among getNavigationRoutes and should not be the same as primary route.

callback

notifies about result.