CarNavigationCamera

class CarNavigationCamera(    initialCarCameraMode: CarCameraMode,     alternativeCarCameraMode: CarCameraMode?,     carRoutesProvider: CarRoutesProvider = NavigationCarRoutesProvider(),     initialCameraOptions: CameraOptions? = CameraOptions.Builder() .zoom(DEFAULT_INITIAL_ZOOM) .build()) : MapboxCarMapObserver

Integrates the Android Auto MapboxCarMapSurface with the NavigationCamera.

Parameters

initialCarCameraMode

defines the initial CarCameraMode

alternativeCarCameraMode

is an optional toggle CarCameraMode

carRoutesProvider

provides routes that can adjust the camera view port

initialCameraOptions

set camera options when the camera is attached

Constructors

Link copied to clipboard
fun CarNavigationCamera(    initialCarCameraMode: CarCameraMode,     alternativeCarCameraMode: CarCameraMode?,     carRoutesProvider: CarRoutesProvider = NavigationCarRoutesProvider(),     initialCameraOptions: CameraOptions? = CameraOptions.Builder() .zoom(DEFAULT_INITIAL_ZOOM) .build())

Functions

Link copied to clipboard
fun followingZoomUpdatesAllowed(): Boolean

Indicates whether the following camera is configured to recalculate and update the zoom level.

Link copied to clipboard
open override fun onAttached(mapboxCarMapSurface: MapboxCarMapSurface)
Link copied to clipboard
open override fun onDetached(mapboxCarMapSurface: MapboxCarMapSurface)
Link copied to clipboard
open fun onStableAreaChanged(@NonNull p0: Rect, @NonNull p1: EdgeInsets)
Link copied to clipboard
open override fun onVisibleAreaChanged(visibleArea: Rect, edgeInsets: EdgeInsets)
Link copied to clipboard
fun updateCameraMode(carCameraMode: CarCameraMode)
Link copied to clipboard
fun zoomInAction()

Function dedicated to zoom in map action buttons.

Link copied to clipboard
fun zoomOutAction()

Function dedicated to zoom in map action buttons.

Link copied to clipboard
fun zoomUpdatesAllowed(allowed: Boolean)

If true the camera may recalculate and update the zoom level. If false the feature is disabled.

Properties

Link copied to clipboard
val gestureHandler: DefaultMapboxCarMapGestureHandler

Connect the gesture handler to the map with MapboxCarMap.setGestureHandler.

Link copied to clipboard
val nextCameraMode: StateFlow<CarCameraMode?>

Allow you to observe what the next camera mode will be. The navigation camera lets you toggle between the initialCarCameraMode and alternativeCarCameraMode.