setCenter

fun setCenter(center: LatLng, animated: Boolean = false)

Repositions the camera to target a given LatLng. Short-hand method for moveCamera(CameraUpdate(target)).

Parameters

center

The new position the camera should target

animated

If true, uses easeCamera instead (default: false)


fun setCenter(center: LatLng, animated: Boolean = false, callback: OnCameraDidChange? = null)

Repositions the camera to target a given LatLng. Short-hand method for moveCamera(CameraUpdate(target)).

Parameters

center

The new position the camera should target

animated

If true, uses easeCamera instead (default: false)

callback

An optional callback to be notified from the main thread when the animation stops. The callback will be called with one parameter of type CameraCallbackStatus indicating if the animation was complete or canceled.