Map Compass Scope
A MapCompassScope provides a scope for adding Compass ornament.
Functions
Link copied to clipboard
fun Compass(modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(4.dp), alignment: Alignment = Alignment.TopEnd, fadeWhenFacingNorth: Boolean = true, resetToNorthUponClick: Boolean = true, content: @Composable () -> Unit = {
Image(
painter = painterResource(id = R.drawable.mapbox_compass_icon),
contentDescription = "Mapbox Compass"
)
})
Add a Compass ornament to the map, the direction of the compass will follow the map camera's bearing, when the compass is clicked, the map camera's bearing will be reset to face north.