Csaba Kozák
07/29/2021, 6:09 PMMapView.
I am trying to move the camera as the user is sliding up a bottom sheet.
The problem is that if i change the camera position according to the offset with GoogleMap.moveCamera(), the maps moves really laggy.
Calling GoogleMap.setPadding() is smooth though. Can anyone help me with this? Thanks in advance!Csaba Kozák
07/29/2021, 6:20 PMcoroutineScope.launch {
val googleMap = mapView.awaitMap()
val target = googleMap.cameraPosition.target
// mapBottomPadding is changing due to bottom sheet offset
googleMap.setPadding(0, mapTopPadding, 0, mapBottomPadding)
googleMap.moveCamera(CameraUpdateFactory.newLatLng(target))
}