RoutesPreview
Parameters
previewed routes ordered in way specific for mapbox navigation: primary, alternative1, alternative2.
alternative metadata for valid alternatives from routesList. AlternativeRouteMetadata.alternativeId is always 0 in preview.
original routes list which doesn't change order no matter which primary route is selected.
index of primary route from the originalRoutesList.
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.