Skip to content

Commit

Permalink
fix: using rememberMarkerState instead of MarkerState (#1768)
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoso authored Aug 27, 2024
1 parent cb53eb4 commit 6007cc8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import com.google.maps.android.compose.rememberCameraPositionState
fun AddAMap() {
// [START maps_android_compose_add_a_map]
val singapore = LatLng(1.35, 103.87)
val singaporeState = rememberMarkerState(position = singapore)
val cameraPositionState = rememberCameraPositionState {
position = CameraPosition.fromLatLngZoom(singapore, 10f)
}
Expand All @@ -47,7 +48,7 @@ fun AddAMap() {
cameraPositionState = cameraPositionState
) {
Marker(
state = MarkerState(position = singapore),
state = MarkerState(position = singaporeState),
title = "Singapore",
snippet = "Marker in Singapore"
)
Expand Down

0 comments on commit 6007cc8

Please sign in to comment.