primaryRouteIndex

val primaryRouteIndex: Int

Parameters

primaryRouteIndex

Use routesList when you want to pass routes to other Navigation SDK components, for example start active guidance calling MapboxNavigation.setNavigationRoutes or display a route using route line API. The majority of the Navigation SDK's API accepts routes in this format.

Use originalRoutesList and primaryRouteIndex if you want to display routes as a list on UI. In this case routes' order shouldn't change on UI when users pick different routes as primary. MapboxNavigation.changeRoutesPreviewPrimaryRoute is designed to select a new primary route without changing the order of the originalRoutesList.