setCamera

Changes the map view by any combination of center, zoom, bearing, and pitch, without an animated transition. The map will retain its current values for any details not passed via the camera options argument. It is not guaranteed that the provided CameraOptions will be set, the map may apply constraints resulting in a different CameraState.

Parameters

cameraOptions

New camera options

abstract fun setCamera(cameraOptions: CameraOptions)

Sets the map view with the free camera options.

FreeCameraOptions provides more direct access to the underlying camera entity. For backwards compatibility the state set using this API must be representable with CameraOptions as well. Parameters are clamped to a valid range or discarded as invalid if the conversion to the pitch and bearing presentation is ambiguous. For example orientation can be invalid if it leads to the camera being upside down or the quaternion has zero length.

Parameters

freeCameraOptions

The free camera options to set.

abstract fun setCamera(freeCameraOptions: FreeCameraOptions)