From b067a9cd95b0bc7d4279b92f3cf4aec4b155ab6e Mon Sep 17 00:00:00 2001 From: Darryl Bayliss Date: Fri, 21 Jul 2023 19:19:45 +0100 Subject: [PATCH 1/2] Update README.md Make readme documentation for Scalebar composable clearer. --- README.md | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 26acf217..28194a07 100644 --- a/README.md +++ b/README.md @@ -285,19 +285,31 @@ The [ScaleBarActivity](app/src/main/java/com/google/maps/android/compose/ScaleBa Both versions of this widget leverage the `CameraPositionState` in `maps-compose` and therefore are very simple to configure with their defaults: ```kotlin -ScaleBar( - modifier = Modifier +Box(Modifier.fillMaxSize()) { + + GoogleMap( + modifier = Modifier.fillMaxSize(), + cameraPositionState = cameraPositionState + ) { + // ... your map composables ... + } + + ScaleBar( + modifier = Modifier .padding(top = 5.dp, end = 15.dp) .align(Alignment.TopEnd), - cameraPositionState = cameraPositionState -) + cameraPositionState = cameraPositionState + ) -DisappearingScaleBar( - modifier = Modifier + // OR + + DisappearingScaleBar( + modifier = Modifier .padding(top = 5.dp, end = 15.dp) .align(Alignment.TopStart), - cameraPositionState = cameraPositionState -) + cameraPositionState = cameraPositionState + ) +} ``` The colors of the text, line, and shadow are also all configurable (e.g., based on `isSystemInDarkTheme()` on a dark map). Similarly, the `DisappearingScaleBar` animations can be configured. From d9603890da608c73d10ae1f0bafe5da4b019f49c Mon Sep 17 00:00:00 2001 From: Darryl Bayliss Date: Fri, 21 Jul 2023 20:17:25 +0100 Subject: [PATCH 2/2] chore: Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 28194a07..9fbb4e36 100644 --- a/README.md +++ b/README.md @@ -309,7 +309,7 @@ Box(Modifier.fillMaxSize()) { .align(Alignment.TopStart), cameraPositionState = cameraPositionState ) -} +} ``` The colors of the text, line, and shadow are also all configurable (e.g., based on `isSystemInDarkTheme()` on a dark map). Similarly, the `DisappearingScaleBar` animations can be configured.