MapLibre Compose API Reference
Toggle table of contents
0.11.1
common
Platform filter
common
Switch theme
Search in API
MapLibre Compose API Reference
maplibre-compose-material3
/
org.maplibre.compose.material3
/
DisappearingCompassButton
Disappearing
Compass
Button
@
Composable
fun
DisappearingCompassButton
(
cameraState
:
CameraState
,
modifier
:
Modifier
=
Modifier
,
onClick
:
(
)
->
Unit
=
{}
,
colors
:
ButtonColors
=
ButtonDefaults.elevatedButtonColors()
,
contentDescription
:
String
=
stringResource(Res.string.compass)
,
size
:
Dp
=
48.dp
,
contentPadding
:
PaddingValues
=
PaddingValues(size / 6)
,
shape
:
Shape
=
CircleShape
,
needlePainter
:
Painter
=
painterResource(Res.drawable.compass_needle)
,
visibilityDuration
:
Duration
=
1.seconds
,
enterTransition
:
EnterTransition
=
fadeIn()
,
exitTransition
:
ExitTransition
=
fadeOut()
,
getHomePosition
:
(
CameraPosition
)
->
CameraPosition
=
{ it.copy(bearing = 0.0, tilt = 0.0) }
,
slop
:
Double
=
0.5
)
(
source
)