Skip to content

Commit

Permalink
chore: added test for DisappearingScaleBar
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoso committed Dec 10, 2024
1 parent dfd11ba commit 451fac7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.compose.ui.unit.dp
import com.google.android.gms.maps.model.CameraPosition
import com.google.android.gms.maps.model.LatLng
import com.google.maps.android.compose.theme.MapsComposeSampleTheme
import com.google.maps.android.compose.widgets.DisappearingScaleBar
import com.google.maps.android.compose.widgets.ScaleBar


Expand All @@ -34,4 +35,26 @@ class ScaleBarTest() {
)
}
}

@Preview
@Composable
fun PreviewDisappearingScaleBar() {
val cameraPositionState = remember {
CameraPositionState(
position = CameraPosition(
LatLng(48.137154, 11.576124), // Example coordinates: Munich, Germany
12f,
0f,
0f
)
)
}

MapsComposeSampleTheme {
DisappearingScaleBar(
modifier = Modifier.padding(end = 4.dp),
cameraPositionState = cameraPositionState
)
}
}
}

0 comments on commit 451fac7

Please sign in to comment.