setNavigationRouteLines

fun setNavigationRouteLines(newRoutes: List<NavigationRouteLine>, consumer: MapboxNavigationConsumer<Expected<RouteLineError, RouteSetValue>>)

Sets the routes that will be operated on.

This can be a long running task with long routes. There is a cancel method which will cancel the background tasks.

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.

consumer

a method that consumes the result of the operation.


fun setNavigationRouteLines(    newRoutes: List<NavigationRouteLine>,     alternativeRoutesMetadata: List<AlternativeRouteMetadata>,     consumer: MapboxNavigationConsumer<Expected<RouteLineError, RouteSetValue>>)

Sets the routes that will be operated on.

This can be a long running task with long routes. There is a cancel method which will cancel the background tasks.

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, the update will hide the portions of the alternative routes until the deviation point with the primary route. See MapboxNavigation.getAlternativeMetadataFor.

consumer

a method that consumes the result of the operation.