MapboxRouteCalloutApi

class MapboxRouteCalloutApi(apiOptions: MapboxRouteCalloutApiOptions = MapboxRouteCalloutApiOptions.Builder().build())

Responsible for generating route line annotation data which can be rendered on the map to visualize a callout representing the duration of the route (total ETA or relative diff with the primary route). The callout is calculated based on the routes and the data returned should be rendered on the map using the MapboxRouteCalloutView class. Generally this class should be called once new route (or set of routes) is available

The two principal classes for the route callouts are the MapboxRouteCalloutApi and the MapboxRouteCalloutView.

Like the route line components the MapboxRouteCalloutApi consumes data from the Navigation SDK, specifically the NavigationRoute, and produces data for rendering on the map by the MapboxRouteCalloutView.

Parameters

apiOptions

used for determining the appearance and/or behavior of the route callouts

Constructors

Link copied to clipboard
fun MapboxRouteCalloutApi(apiOptions: MapboxRouteCalloutApiOptions = MapboxRouteCalloutApiOptions.Builder().build())

Functions

Link copied to clipboard
fun setNavigationRoutes(newRoutes: List<NavigationRoute>): RouteCalloutResult
fun setNavigationRoutes(newRoutes: List<NavigationRoute>, alternativeRoutesMetadata: List<AlternativeRouteMetadata>): RouteCalloutResult

Sets the routes that will be operated on.

Link copied to clipboard
fun updateOptions(options: MapboxRouteCalloutApiOptions): RouteCalloutResult

Update a subset of route callout options.

Properties

Link copied to clipboard
val options: MapboxRouteCalloutApiOptions