ScaleBar
fun ScaleBar(modifier: Modifier = Modifier, width: Dp = defaultWidth, height: Dp = defaultHeight, cameraPositionState: CameraPositionState, textColor: Color = DarkGray, lineColor: Color = DarkGray, shadowColor: Color = Color.White)
A scale bar composable that shows the current scale of the map in feet and meters when zoomed in to the map, changing to miles and kilometers, respectively, when zooming out.
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.