RoutesPreview

class RoutesPreview

Parameters

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

alternativesMetadata
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.

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

Properties

Link copied to clipboard
val alternativesMetadata: List<AlternativeRouteMetadata>
Link copied to clipboard
val originalRoutesList: List<NavigationRoute>
Link copied to clipboard
val primaryRoute: NavigationRoute

Primary route used for preview

Link copied to clipboard
val primaryRouteIndex: Int
Link copied to clipboard
val routesList: List<NavigationRoute>