CameraPosition

@Stable
data class CameraPosition(    val bearing: Double = 0.0,     val target: Position = Position(0.0, 0.0),     val tilt: Double = 0.0,     val zoom: Double = 1.0,     val padding: PaddingValues = PaddingValues(0.dp))(source)

Defines how the camera is oriented towards the map.

Parameters

bearing

Direction that the camera is pointing in, in degrees clockwise from north.

target

Target position to align with the center of the screen, i.e. where the camera is pointing at.

tilt

The camera angle, in degrees, from the nadir (directly down). A value in the range of [0 .. 60]

zoom

Zoom level at target. A value in the range of [0 .. 25.5]

padding

By default, the camera points at the center of the screen, i.e. it also rotates and tilts around that point. By specifying a padding, this center point can be altered, for example if you want to display a bottom sheet above the lower part of the map, focussing on a POI in the upper part of the map.

Constructors

Link copied to clipboard
constructor(    bearing: Double = 0.0,     target: Position = Position(0.0, 0.0),     tilt: Double = 0.0,     zoom: Double = 1.0,     padding: PaddingValues = PaddingValues(0.dp))

Properties

Link copied to clipboard
val bearing: Double = 0.0
Link copied to clipboard
val padding: PaddingValues
Link copied to clipboard
Link copied to clipboard
val tilt: Double = 0.0
Link copied to clipboard
val zoom: Double = 1.0