ScaleBar
A scale bar composable that shows the current scale of the map in feet, meters or feet and meters when zoomed in to the map, changing to miles and kilometers, respectively, when zooming out.
This is org.maplibre.compose.overlay.ScaleBar with its colors and typography taken from the Material 3 theme.
Parameters
how many meters are displayed in one device independent pixel (dp), i.e. the scale. See Viewport.metersPerDpAtTarget
the Modifier to be applied to this layout node
which measures to show on the scale bar. The default follows the system settings, or otherwise the user's locale.
scale bar and text color.
halo for better visibility when displayed on top of the map
scale bar and text halo width
scale bar width
the text style. The text size is the deciding factor how large the scale bar is is displayed.
horizontal alignment of the scale bar and text