RoadLabelSurfaceLayer

class RoadLabelSurfaceLayer(val carContext: CarContext, val mapboxNavigation: MapboxNavigation) : CarSurfaceLayer

This will show the current road name at the bottom center of the screen.

In your Screen, create an instance of this class and enable by registering it to the MapboxCarMap.registerObserver. Disable by removing the listener with MapboxCarMap.unregisterObserver.

Constructors

Link copied to clipboard
fun RoadLabelSurfaceLayer(carContext: CarContext, mapboxNavigation: MapboxNavigation)

Functions

Link copied to clipboard
open override fun children(): List<CarScene2d>

This allows you to create children listeners. Children are notified after the parent.

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 override fun onVisibleAreaChanged(visibleArea: Rect, edgeInsets: EdgeInsets)
Link copied to clipboard
fun surfaceDimensions(): Pair<Int, Int>?

Properties

Link copied to clipboard
val carContext: CarContext
Link copied to clipboard
val edgeInsets: EdgeInsets? = null
Link copied to clipboard
val mapboxNavigation: MapboxNavigation
Link copied to clipboard
val visibleArea: Rect? = null