mirror of
https://github.com/googlemaps/android-samples.git
synced 2025-12-08 18:02:20 +00:00
chore(Snippet): Fix usage of setting the camera's position. (#890)
Change-Id: I8fab433fbc3e53bab86e5a2be221286fb695129e
This commit is contained in:
parent
84c8089b3f
commit
3f6f0fff87
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user