DisappearingScaleBar
fun DisappearingScaleBar(modifier: Modifier = Modifier, width: Dp = defaultWidth, height: Dp = defaultHeight, cameraPositionState: CameraPositionState, textColor: Color = DarkGray, lineColor: Color = DarkGray, shadowColor: Color = Color.White, visibilityDurationMillis: Int, enterTransition: EnterTransition = fadeIn(), exitTransition: ExitTransition = fadeOut())
An animated scale bar that appears when the zoom level of the map changes, and then disappears after visibilityDurationMillis. This composable wraps ScaleBar with visibility animations.
Parameters
modifier
Modifier to be applied to the composable.
width
The width of the composable.
height
The height of the composable.
cameraPositionState
The state of the camera position, used to calculate the scale.
textColor
The color of the text on the scale bar.
lineColor
The color of the lines on the scale bar.
shadowColor
The color of the shadow behind the text and lines.
visibilityDurationMillis
The duration in milliseconds that the scale bar will be visible.
enterTransition
The animation to use when the scale bar appears.
exitTransition
The animation to use when the scale bar disappears.