CarRouteLineRenderer
constructor(options: CarRouteLineRendererOptions, carRoutesProvider: CarRoutesProvider, onRouteClick: (NavigationRoute) -> Unit?)
Creates a renderer that also reports the route the driver taps on the map.
Taps reach the map only through a gesture handler that forwards onClick, such as DefaultMapboxCarMapGestureHandler. A custom MapboxCarMapGestureHandler has to extend it or forward onClick itself.
Parameters
options
customizes the route line and maneuver arrow rendering components, see CarRouteLineRendererOptions.
carRoutesProvider
provides the routes to draw.
onRouteClick
invoked with the route the driver tapped on the map, or null to not listen for taps.
constructor(options: CarRouteLineRendererOptions = CarRouteLineRendererOptions.Builder()
.build(), carRoutesProvider: CarRoutesProvider = NavigationCarRoutesProvider())
Parameters
options
customizes the route line and maneuver arrow rendering components, see CarRouteLineRendererOptions.
carRoutesProvider
provides the routes to draw.