setNavigationRoutes

fun setNavigationRoutes(newRoutes: List<NavigationRoute>): RouteCalloutData

Sets the routes that will be operated on.

Parameters

newRoutes

one or more routes. The first route in the collection will be considered the primary route and any additional routes will be alternate routes.


fun setNavigationRoutes(newRoutes: List<NavigationRoute>, alternativeRoutesMetadata: List<AlternativeRouteMetadata>): RouteCalloutData

Sets the routes that will be operated on.

Parameters

newRoutes

one or more routes. The first route in the collection will be considered the primary route and any additional routes will be alternate routes.

alternativeRoutesMetadata

if available, helps MapboxRouteCalloutApi find the deviation point to extract different geometry segment the callout should be attaching to. See MapboxNavigation.getAlternativeMetadataFor.