ViewpointPersistence

Enum class representing the different types of viewpoint persistence on a composable MapView.

Viewpoint persistence determines how the viewpoint of a MapView is saved and restored across activity or process recreation, for example, when the device is rotated or when the app is sent to the background and then brought back to the foreground.

Note that a MutableState of ViewpointPersistence can not be used with remember, because it will not be able to restore the state across process recreation. Instead, use MutableState of Viewpoint inside of rememberSaveable or within a ViewModel. Note that this class implements Parcelable so it can be used with rememberSaveable without any need for a custom Saver.

Since

200.4.0

Inheritors

Types

Link copied to clipboard

The viewpoint is persisted by its bounding geometry.

Link copied to clipboard

The viewpoint is persisted by its center and scale.

Link copied to clipboard

The viewpoint is not persisted.

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)