LayerMaskLayerConfig

data class LayerMaskLayerConfig(val id: String, val maskId: String? = null, val overrides: (WeatherConfiguration) -> Unit? = null, val maskFilter: Expression? = null)

One entry in LayerMaskSpec.layers: either an existing map layer id or a weather layer code used to auto-create a mask layer.

When id matches an existing layer, that layer’s geometry is used as a stencil mask as-is. When it does not exist but matches a com.xweather.mapsgl.weather.LayerCode (by com.xweather.mapsgl.weather.LayerCode.value or enum name), com.xweather.mapsgl.map.MapController.addWeatherLayer creates a helper mask layer (default id "${id}::mask", or maskId if set) with optional overrides.

See also

Constructors

Link copied to clipboard
constructor(id: String, maskId: String? = null, overrides: (WeatherConfiguration) -> Unit? = null, maskFilter: Expression? = null)

Properties

Link copied to clipboard
val id: String

Existing layer id or weather product id / enum name for auto-creation.

Link copied to clipboard
val maskFilter: Expression? = null

Optional Mapbox-style filter applied to the auto-created weather mask layer’s vector descriptor, and used (with maskId null) to derive a unique default maskId suffix.

Link copied to clipboard
val maskId: String? = null

Stable id for the auto-created mask layer; defaults to "${id}::mask" plus a short hash suffix when maskFilter is set (JS parity: unique ids per filter without an explicit maskId).

Link copied to clipboard

Applied to the com.xweather.mapsgl.weather.WeatherConfiguration when a mask layer is auto-created (for example stroke width on road masks).