RoutesPreview

Parameters

routesList
  • previewed routes ordered in way specific for mapbox navigation: primary, alternative1, alternative2.

alternativesMetadata
  • alternative metadata for valid alternatives from routesList.

originalRoutesList
  • original routes list which doesn't change order no matter which primary route is selected.

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.

Properties

Link copied to clipboard

Primary route used for preview

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Regenerate whenever a change is made

Link copied to clipboard
open override fun hashCode(): Int

Regenerate whenever a change is made

Link copied to clipboard
open override fun toString(): String

Regenerate whenever a change is made