setCameraMode

Sets the camera mode, which determines how the map camera will track the rendered location.

When camera is transitioning to a new mode, it will reject inputs like .zoomWhileTracking or .tiltWhileTracking. Use OnLocationCameraTransitionListener to listen for the transition state.

Parameters

cameraMode

one of the modes found in CameraMode

transitionListener

callback that's going to be invoked when the transition animation finishes

fun setCameraMode(cameraMode: CameraMode, transitionListener: OnLocationCameraTransitionListener?)

Sets the camera mode, which determines how the map camera will track the rendered location.

When camera is transitioning to a new mode, it will reject inputs like .zoomWhileTracking or .tiltWhileTracking. Use OnLocationCameraTransitionListener to listen for the transition state.

Set values of zoom, bearing and pitch that the camera will transition to. If null is passed to any of those, current value will be used for that parameter instead. If the camera is already tracking, provided values are ignored.

Parameters

bearing

target bearing, set to null to use current camera position

cameraMode

one of the modes found in CameraMode

pitch

target pitch, set to null to use current camera position

transitionDuration

duration of the transition in milliseconds

transitionListener

callback that's going to be invoked when the transition animation finishes

zoom

target zoom, set to null to use current camera position

fun setCameraMode(cameraMode: CameraMode, transitionDuration: Long, zoom: Double?, bearing: Double?, pitch: Double?, transitionListener: OnLocationCameraTransitionListener?)