onRouteAlternativeRequestFinished
abstract fun onRouteAlternativeRequestFinished( routeProgress: RouteProgress, alternatives: List<NavigationRoute>, routerOrigin: RouterOrigin)
Content copied to clipboard
Invoked when on-demand alternative routes request finishes.
The alternatives list always represent all available, up-to-date, alternatives for the current route.
The alternatives are not automatically added to MapboxNavigation, you need to add them manually to trigger RoutesObserver. The result will also be delivered to NavigationRouteAlternativesObserver, we recommend you to filter and set routes there.
Parameters
routeProgress
the current route's progress.
alternatives
list of alternative routes, can be empty.
routerOrigin
reports the source of all the new alternative routes in the list. If there are no new routes, reports the source that returned the latest additions.