LayerOpacityStore

class LayerOpacityStore(mapPrefs: MapPrefs, dispatchers: CoroutineDispatchers)(source)

The user's per-layer opacity, for every layer either engine can draw.

Its own store rather than a field on MapLayersManager: built-in raster overlays are not imported layers and that class knows nothing about them, but both need the same setting and both flavours read it. Keys are documented on MapPrefs.layerOpacity.

Constructors

Link copied to clipboard
constructor(mapPrefs: MapPrefs, dispatchers: CoroutineDispatchers)

Properties

Link copied to clipboard
val opacity: StateFlow<Map<String, Float>>

Functions

Link copied to clipboard
fun setOpacity(key: String, opacity: Float)

Sets one layer's opacity; LAYER_OPACITY_OPAQUE removes its entry rather than storing the default.