rememberGeoJsonSourceState

inline fun rememberGeoJsonSourceState(key: String? = null, sourceId: String = remember { generateRandomSourceId("geojson") }, crossinline init: GeoJsonSourceState.() -> Unit = {}): GeoJsonSourceState

Create and rememberSaveable a GeoJsonSourceState using GeoJsonSourceState.Saver. init will be called when the GeoJsonSourceState is first created to configure its initial state.

Note: Saving large inlined GeoJsonData has performance impact, consider using remember or other way to retain the data.

Parameters

key

An optional key to be used as a key for the saved value. If not provided we use the automatically generated by the Compose runtime which is unique for the every exact code location in the composition tree.

sourceId

The optional sourceId for the source state, by default, a random source ID will be used.

init

A function initialise this GeoJsonSourceState.