setTrafficIncidentsEnabled

abstract fun setTrafficIncidentsEnabled(enabled: Boolean)

Enables or disables visualization of on-route traffic incidents.

This function can be called at any moment of the NavigationVisualization lifecycle. For example, if it is called when no traffic incidents are available (e.g., before displaying a route plan), the new visibility status (either enabled or disabled) is saved and applied later when traffic incidents are available. If it is called when traffic incidents are available (e.g., during the route planning phase or a navigation session), the new status takes effect immediately on the traffic incidents.

Parameters

enabled

If traffic incidents visualization is enabled or not.