Animate camera while zooming to a user.

This commit is contained in:
Onuray Sahin 2022-07-20 15:57:56 +03:00
parent 372ff9ff97
commit 0f3e4046e1

View file

@ -28,10 +28,12 @@ fun MapboxMap?.zoomToLocation(locationData: LocationData, preserveCurrentZoomLev
} else {
INITIAL_MAP_ZOOM_IN_PREVIEW
}
this?.cameraPosition = CameraPosition.Builder()
.target(LatLng(locationData.latitude, locationData.longitude))
.zoom(zoomLevel)
.build()
this?.easeCamera {
CameraPosition.Builder()
.target(LatLng(locationData.latitude, locationData.longitude))
.zoom(zoomLevel)
.build()
}
}
fun MapboxMap?.zoomToBounds(latLngBounds: LatLngBounds) {