LocationTrackingEffect

fun LocationTrackingEffect(locationState: UserLocationState, enabled: Boolean = true, trackBearing: Boolean = true, precision: Double = 1.0E-5, onLocationChange: suspend LocationChangeScope.() -> Unit)(source)

A form of LaunchedEffect that is specialized for tracking user location.

onLocationChange will be called, whenever the UserLocationState changes according to the given parameters. Only Locations whose position latitude or longitude changes by at least precision compared to the previous location will result in a call to onLocationChange. If trackBearing is true, the bearing must change by at least precision as well (or change between null/non-null).

If enabled is false onLocationChange will never be called and location is not monitored, i.e. the LocationProvider may stop requesting location updates from the platform.