Skip to content

Commit ff65770

Browse files
author
sds100
committed
fix: tapping POI on the map moves the center to it
Signed-off-by: sds100 <developer.sds100@gmail.com>
1 parent 7d84b3c commit ff65770

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

app/src/main/java/com/mapcode/map/MapScreen.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,14 @@ fun Map(
426426
ANIMATE_CAMERA_UPDATE_DURATION_MS
427427
)
428428
}
429+
},
430+
onPOIClick = { poi ->
431+
scope.launch {
432+
cameraPositionState.animate(
433+
CameraUpdateFactory.newLatLng(poi.latLng),
434+
ANIMATE_CAMERA_UPDATE_DURATION_MS
435+
)
436+
}
429437
}
430438
)
431439
}

0 commit comments

Comments
 (0)