Package-level declarations

Types

Link copied to clipboard

How updateCamera updates camera bearing.

Link copied to clipboard
sealed interface HeadingTrackingStatus

Current state of device-heading collection managed by rememberLocationState.

Link copied to clipboard

The measurements that triggered a LocationTrackingEffect callback.

Link copied to clipboard
Link copied to clipboard
class LocationPuckColors(val dotFillColorCurrentLocation: Color = Color.Companion.Blue, val dotFillColorOldLocation: Color = Color.Companion.Gray, val dotStrokeColor: Color = Color.Companion.White, val shadowColor: Color = Color.Companion.Black, val accuracyStrokeColor: Color = Color.Companion.Blue, val accuracyFillColor: Color = accuracyStrokeColor.copy(alpha = 0.3f), val bearingColor: Color = Color.Companion.Red)

Colors for LocationPuck

Link copied to clipboard
class LocationPuckSizes(val dotRadius: Dp = 6.dp, val dotStrokeWidth: Dp = 3.dp, val shadowSize: Dp = 3.dp, val shadowOffset: DpOffset = DpOffset(0.dp, 1.dp), val shadowBlur: Float = 1.0f, val accuracyStrokeWidth: Dp = 1.dp, val bearingSize: Dp = dotRadius)

Sizing parameters for LocationPuck

Link copied to clipboard

Lifecycle-aware state for foreground location and heading tracking.

Link copied to clipboard
sealed interface LocationTrackingStatus

Current state of the foreground location updates managed by rememberLocationState.

Functions

Link copied to clipboard
fun LocationPuck(idPrefix: String, locationState: LocationState, oldLocationThreshold: Duration = 30.seconds, accuracyThreshold: Length = 50.meters, colors: LocationPuckColors = LocationPuckColors(), sizes: LocationPuckSizes = LocationPuckSizes(), onClick: LocationClickHandler? = null, onLongClick: LocationClickHandler? = null)

Adds multiple layers to form a location puck from lifecycle-aware locationState.

fun LocationPuck(idPrefix: String, location: LocationMeasurement?, measurementMark: TimeMark? = null, bearing: Bearing? = location?.course, bearingAccuracy: Rotation? = defaultBearingAccuracy(location, bearing), oldLocationThreshold: Duration = 30.seconds, accuracyThreshold: Length = 50.meters, colors: LocationPuckColors = LocationPuckColors(), sizes: LocationPuckSizes = LocationPuckSizes(), onClick: LocationClickHandler? = null, onLongClick: LocationClickHandler? = null)

Adds multiple layers to form a location puck.

Link copied to clipboard
fun LocationTrackingEffect(locationState: LocationState, enabled: Boolean = true, trackBearing: Boolean = true, onLocationChange: suspend LocationChangeScope.() -> Unit)

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

Link copied to clipboard

Returns the most accurate bearing measurement available.

Link copied to clipboard

Returns the estimated error of mostAccurateBearing, or null when unknown.

Link copied to clipboard

Creates and remembers the default heading provider for the current platform.

Creates and remembers the default heading provider for the current platform.

Creates and remembers the default heading provider for the current platform.

Creates and remembers the default heading provider for the current platform.

Creates and remembers the default heading provider for the current platform.

Link copied to clipboard

Creates and remembers the default location provider for the current platform.

Creates and remembers the default location provider for the current platform.

Creates and remembers the default location provider for the current platform.

Creates and remembers the default location provider for the current platform.

Creates and remembers the default location provider for the current platform.

Link copied to clipboard
fun rememberLocationState(provider: LocationProvider = rememberDefaultLocationProvider(), request: LocationRequest = LocationRequest(), headingProvider: HeadingProvider = NoHeadingProvider, headingRequest: HeadingRequest = HeadingRequest(), enabled: Boolean = true, lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, minActiveState: Lifecycle.State = Lifecycle.State.STARTED): LocationState

Remembers foreground location and heading state.

Link copied to clipboard

Creates and remembers the platform SystemSettingsLauncher.

Link copied to clipboard
suspend fun LocationChangeScope.updateCamera(mapState: MapState, animationDuration: Duration? = 300.milliseconds, updateBearing: BearingUpdate = BearingUpdate.TRACK_AUTOMATIC)

Convenience method for keeping mapState in sync with the location change that triggered this LocationTrackingEffect callback.