CameraState

The state of the camera of the map view.

See also

Properties

Link copied to clipboard

The camera data of the map view. The data contains the camera position and whether the camera is stable. This value is backed by MutableState. Returns null when map is not ready yet.

Link copied to clipboard

Identifies the position tracking mode of the camera.

Functions

Link copied to clipboard
suspend fun animateCamera(cameraOptions: CameraOptions, animationDuration: Duration = DEFAULT_ANIMATION_DURATION)

Moves the camera according to the given cameraOptions and animates the transition.

suspend fun animateCamera(factory: CameraOptionsFactory.() -> CameraOptions, animationDuration: Duration = DEFAULT_ANIMATION_DURATION)

Moves the camera according to the CameraOptions created by factory and animates the transition.

Link copied to clipboard
fun moveCamera(cameraOptions: CameraOptions)

Immediately moves the camera according to the given cameraOptions.

Immediately moves the camera according to the CameraOptions created by factory.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun zoomToAllMarkers(zoom: Double = 12.0, padding: Dp = 0.dp)

Zooms to all markers added via Marker or Markers Composables. If this results in focusing on a single marker, the specified zoom level is used. Nothing happens if no markers are visible.

Link copied to clipboard
fun zoomToAllRoutes(padding: Dp = 0.dp)

Updates camera view to fit all route points with additional padding.

Link copied to clipboard
fun zoomToMarkers(markersIds: List<MarkerId> = emptyList(), zoom: Double = 12.0, padding: Dp = 0.dp)

Zooms to the markers identified by markersIds. If this results in focusing on a single marker, the specified zoom level is used. Nothing happens if no markers are identified.