CameraPosition

class CameraPosition @JvmOverloads constructor(target: LatLng, zoom: Float, bearing: Float = 0.0f) : Parcelable(source)

Represents the camera position for a map.

Defines where the camera is positioned (target location), how close the camera is to the earth's surface (zoom level) and which way is up on the screen (bearing).

Parcelable, e.g. for a android.os.Bundle or rememberSaveable.

Parameters

target

The location that the camera is pointing at

zoom

The zoom level, ranging from 2.0 (world view) to 19.0 (street level)

bearing

The direction at the top of the screen, in degrees clockwise from north, e.g. 90 for east up; normalized to 0 (inclusive) to 360 (exclusive)

Throws

if zoom is outside the valid range or bearing is not finite

Constructors

Link copied to clipboard
constructor(target: LatLng, zoom: Float, bearing: Float = 0.0f)

Types

Link copied to clipboard
class Builder

Builds a CameraPosition step by step, as in the Maps SDK, e.g. CameraPosition.builder().target(latLng).zoom(15f).bearing(90f).build().

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The direction at the top of the screen, in degrees clockwise from north, 0 to 360.

Link copied to clipboard

The location that the camera is pointing at.

Link copied to clipboard

The zoom level, ranging from 2.0 (world view) to 19.0 (street level).

Functions

Link copied to clipboard
operator fun component1(): LatLng
Link copied to clipboard
operator fun component2(): Float
Link copied to clipboard
operator fun component3(): Float
Link copied to clipboard
fun copy(target: LatLng = this.target, zoom: Float = this.zoom, bearing: Float = this.bearing): CameraPosition
Link copied to clipboard
open override fun describeContents(): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun writeToParcel(parcel: Parcel, flags: Int)