MapboxCarMapObserver

interface MapboxCarMapObserver

Many downstream services will not work until the surface has been created and the map has loaded. This interface allows you to create custom Mapbox experiences for the car.

Functions

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

Called when a MapboxCarMapSurface has been loaded. You can assume there will only be a single surface at a time.

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

Called when a MapboxCarMapSurface has been detached from this observer. Some examples that can cause this to detach are:

onVisibleAreaChanged
Link copied to clipboard
open fun onVisibleAreaChanged(visibleArea: Rect, edgeInsets: EdgeInsets)

Called when the car library updates the visible regions for the surface. For example, this is triggered when the action buttons come in and out of visibility. You can assume this will be called after onAttached.