animateCamera

fun animateCamera(cameraUpdate: CameraUpdate, durationMs: Int = 250, listener: CancelableCallback? = null)(source)

Animates the camera to a new position.

Stops any ongoing animation and commits any pending pan offsets before starting. The animation runs on the main thread and triggers redraws at ~60fps.

Parameters

cameraUpdate

The camera update to animate to

durationMs

Duration of the animation in milliseconds (default 250ms)

listener

Optional listener for animation completion callbacks