MapLayersViewModel

Imported map layers and per-layer opacity; both live in app singletons, so every instance sees the same state.

Constructors

Link copied to clipboard
constructor(manager: MapLayersManager, opacityStore: LayerOpacityStore)

Properties

Link copied to clipboard
val layerOpacity: StateFlow<Map<String, Float>>
Link copied to clipboard
val mapLayers: StateFlow<List<MapLayerItem>>

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
fun addGeoJsonLayer(name: String, geoJson: String)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard
suspend fun readLayerBytes(layer: MapLayerItem): ByteArray?
Link copied to clipboard
fun refreshMapLayer(layerId: String)
Link copied to clipboard
fun removeMapLayer(layerId: String)
Link copied to clipboard
fun setOpacity(key: String, opacity: Float)
Link copied to clipboard