update

open fun update(update: NavigationCameraUpdate)

Animate the camera to a new location defined within CameraUpdate passed to the NavigationCameraUpdate using a transition animation that evokes powered flight.If the camera is in a tracking mode, this animation is going to be ignored, or break the tracking,based on the CameraUpdateMode.

See also

com.mapbox.navigation.ui.camera.CameraUpdateMode

for how this update interacts with the current tracking

Parameters

update

the change that should be applied to the camera.

open fun update(update: NavigationCameraUpdate, durationMs: Int)

Animate the camera to a new location defined within CameraUpdate passed to the NavigationCameraUpdate using a transition animation that evokes powered flight.The animation will last a specified amount of time given in milliseconds. If the camera is in a tracking mode,this animation is going to be ignored, or break the tracking, based on the CameraUpdateMode.

See also

com.mapbox.navigation.ui.camera.CameraUpdateMode

for how this update interacts with the current tracking

Parameters

update

the change that should be applied to the camera.

durationMs

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

open fun update(update: NavigationCameraUpdate, durationMs: Int, callback: MapboxMap.CancelableCallback)

Animate the camera to a new location defined within CameraUpdate passed to the NavigationCameraUpdate using a transition animation that evokes powered flight. The animation willlast a specified amount of time given in milliseconds. A callback can be used to be notified when animatingthe camera stops. During the animation, a call to getCameraPosition returns an intermediatelocation of the camera in flight. If the camera is in a tracking mode,this animation is going to be ignored, or break the tracking, based on the CameraUpdateMode.

See also

com.mapbox.navigation.ui.camera.CameraUpdateMode

for how this update interacts with the current tracking

Parameters

update

the change that should be applied to the camera.

durationMs

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

callback

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