CarNavigationInfoProvider

class CarNavigationInfoProvider : MapboxCarMapObserver

Provides the NavigationTemplate.NavigationInfo and TravelEstimate populated with Mapbox navigation data. This can be used with a Screen that shows a NavigationTemplate.

See also

for an example.

Constructors

Link copied to clipboard
constructor()

Public constructor and the internal constructor is for unit testing.

Properties

Link copied to clipboard

Contains data that helps populate the NavigationTemplate with navigation data.

Functions

Link copied to clipboard

Helper function to allow you to hook up the provider to a screen. The screen will be invalidated when the data changes, and you can populate the NavigationTemplate with the navigation info inside Screen.onGetTemplate.

Link copied to clipboard
open override fun onAttached(mapboxCarMapSurface: MapboxCarMapSurface)

MapboxCarMapSurface is attached

Link copied to clipboard
open override fun onDetached(mapboxCarMapSurface: MapboxCarMapSurface)

MapboxCarMapSurface is detached

Link copied to clipboard
open fun onStableAreaChanged(@NonNull p0: Rect, @NonNull p1: EdgeInsets)
Link copied to clipboard
open fun onVisibleAreaChanged(@NonNull p0: Rect, @NonNull p1: EdgeInsets)
Link copied to clipboard

When you have a NavigationTemplate.Builder, you can set the navigation info and travel estimate