rememberTrafficState

fun rememberTrafficState(showTrafficFlow: Boolean = true, showTrafficIncidents: Boolean = true): TrafficState

Remembers and returns the TrafficState. The same state is returned as long as all parameter values are the same. If any parameter value changes, a new state instance is returned.

Important: Use named parameters to avoid ambiguous method calls due to API changes.

Parameters

showTrafficFlow

If true, show all traffic flow.

showTrafficIncidents

If true, show all traffic incidents.