RoadLabelSurfaceLayer

class RoadLabelSurfaceLayer(carContext: CarContext, 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

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

Functions

children
Link copied to clipboard
open override fun children(): List<CarScene2d>
This allows you to create children listeners.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
onAttached
Link copied to clipboard
open override fun onAttached(mapboxCarMapSurface: MapboxCarMapSurface)
onDetached
Link copied to clipboard
open override fun onDetached(mapboxCarMapSurface: MapboxCarMapSurface)
onVisibleAreaChanged
Link copied to clipboard
open override fun onVisibleAreaChanged(visibleArea: Rect, edgeInsets: EdgeInsets)
surfaceDimensions
Link copied to clipboard
fun surfaceDimensions(): Pair<Int, Int>?
toString
Link copied to clipboard
open fun toString(): String

Properties

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