SymbolLayerDescriptor

data class SymbolLayerDescriptor(var id: String, var source: String, var sourceLayer: String? = null, var paint: GridLayerPaint = GridLayerPaint( icon = IconPaint(), text = emptyList() ), var filter: Expression? = null) : VectorLayerDescriptor<GridLayerPaint> , LayerEventEmitter

Descriptor for a Mapbox symbol layer built from GridLayerPaint: icons, text labels, and optional fill/stroke driven by the same paint model used for gridded symbol products.

Use after the backing source is registered (com.xweather.mapsgl.map.MapController.addSource). Typical sources are vector tiles with a named sourceLayer; GeoJSON point/line data can use null on sourceLayer when the style does not target a specific MVT layer.

paint combines IconPaint, optional FillPaint/StrokePaint for halos or data-driven RGB fields, and a list of com.xweather.mapsgl.style.TextPaint entries for labels. filter limits features.

See also

Constructors

Link copied to clipboard
constructor(id: String, source: String, sourceLayer: String? = null, paint: GridLayerPaint = GridLayerPaint( icon = IconPaint(), text = emptyList() ), filter: Expression? = null)

Properties

Link copied to clipboard
open override var filter: Expression?

Optional Mapbox filter.

Link copied to clipboard
open override var id: String

Unique layer id.

Link copied to clipboard
open override var paint: GridLayerPaint

Icon, text, and optional fill/stroke configuration.

Link copied to clipboard
open override var source: String

Vector or GeoJSON source id.

Link copied to clipboard
open override var sourceLayer: String?

MVT layer name, or null for GeoJSON when applicable.

Link copied to clipboard
open override val type: LayerType

Functions

Link copied to clipboard
open override fun off(eventName: String)
Link copied to clipboard
open override fun on(eventName: String, callback: (Any?) -> Unit)
Link copied to clipboard
open override fun trigger(eventName: String, data: Any?)