chore(Snippet): Fix usage of setting the camera's position. (#890)

Change-Id: I8fab433fbc3e53bab86e5a2be221286fb695129e
This commit is contained in:
Chris Arriola 2022-03-01 16:28:30 -08:00 committed by GitHub
parent 84c8089b3f
commit 3f6f0fff87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,11 +23,12 @@ import java.util.Properties
fun AddAMap() {
// [START maps_android_compose_add_a_map]
val singapore = LatLng(1.35, 103.87)
val cameraPositionState = rememberCameraPositionState {
position = CameraPosition.fromLatLngZoom(singapore, 10f)
}
GoogleMap(
modifier = Modifier.fillMaxSize(),
googleMapOptionsFactory = {
GoogleMapOptions().camera(CameraPosition.fromLatLngZoom(singapore, 11f))
}
cameraPositionState = cameraPositionState
) {
Marker(
position = singapore,