animateCamera

Animate the camera to a new location defined within CameraUpdate using a transition animation that evokes powered flight. The animation will last the default amount of time. During the animation, a call to getCameraPosition returns an intermediate location of the camera in flight.

Parameters

update

The change that should be applied to the camera.

See also

for a set of updates.


Animate the camera to a new location defined within CameraUpdate using a transition animation that evokes powered flight. The animation will last the default amount of time. A callback can be used to be notified when animating the camera stops. During the animation, a call to getCameraPosition returns an intermediate location of the camera in flight.

Parameters

update

The change that should be applied to the camera.

callback

The callback to invoke from the main thread when the animation stops. If the animation completes normally, onFinish() is called; otherwise, onCancel() is called. Do not update or animate the camera from within onCancel().

See also

for a set of updates.


fun animateCamera(@NonNull update: CameraUpdate, durationMs: Int)

Animate the camera to a new location defined within CameraUpdate using a transition animation that evokes powered flight. The animation will last a specified amount of time given in milliseconds. During the animation, a call to getCameraPosition returns an intermediate location of the camera in flight.

Parameters

update

The change that should be applied to the camera.

durationMs

The duration of the animation in milliseconds. This must be strictly positive, otherwise an IllegalArgumentException will be thrown.

See also

for a set of updates.


Animate the camera to a new location defined within CameraUpdate using a transition animation that evokes powered flight. The animation will last a specified amount of time given in milliseconds. A callback can be used to be notified when animating the camera stops. During the animation, a call to getCameraPosition returns an intermediate location of the camera in flight.

Parameters

update

The change that should be applied to the camera.

durationMs

The duration of the animation in milliseconds. This must be strictly positive, otherwise an IllegalArgumentException will be thrown.

callback

An optional callback to be notified from the main thread when the animation stops. If the animation stops due to its natural completion, the callback will be notified with onFinish(). If the animation stops due to interruption by a later camera movement or a user gesture, onCancel() will be called. Do not update or animate the camera from within onCancel(). If a callback isn't required, leave it as null.

See also

for a set of updates.