getAlternativeMetadataFor
If the provided navigationRoute is an alternative route in the current session, this function will return the associated route metadata.
This function is guaranteed to return a valid result (if available) only after the navigationRoute has been processed by MapboxNavigation and returned via RoutesObserver or NavigationRouteAlternativesObserver. To process the routes, call MapboxNavigation.setNavigationRoutes.
Whenever RoutesObserver or NavigationRouteAlternativesObserver fires, the previously obtained metadata becomes invalid.
This function returns null
for primary route in the current session.
If the provided navigationRoutes are alternative routes in the current session, this function will return the associated with those route metadata.
This function is guaranteed to return a valid result (if available) only after the navigationRoutes have been processed by MapboxNavigation and returned via RoutesObserver or NavigationRouteAlternativesObserver. To process the routes, call MapboxNavigation.setNavigationRoutes.
Whenever RoutesObserver or NavigationRouteAlternativesObserver fires, the previously obtained metadata becomes invalid.
This function doesn't return anything for primary route in the current session.