SymbolLayerDescriptor

data class SymbolLayerDescriptor(var id: String, var source: String, var sourceLayer: String? = null, var paint: SymbolLayerPaint = SymbolLayerPaint( icon = IconPaint(), text = emptyList() ), var filter: Expression? = null, var stencilOnly: Boolean = false, var useGlRendering: Boolean = true, var timing: LayerTiming? = null, var maskLayerIds: List<String> = emptyList(), var maskLayerId: String? = null, var layerMask: LayerMaskSpec? = null, var stencilLayerMask: StencilLayerMaskSpec? = null) : VectorLayerDescriptor<SymbolLayerPaint> , LayerEventEmitter

Descriptor for a Mapbox symbol layer using SymbolLayerPaint: icons, text labels, and optional fill/stroke.

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.

For gridded encoded products (spacing, SamplePaint, etc.), use GridLayerDescriptor with GridLayerPaint instead—this type stays Mapbox-style-only so paint is not confused with grid sidecar fields.

See also

Constructors

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

Builds a symbol descriptor from a GridLayerPaint, the paint type this descriptor took through 1.6.0 before SymbolLayerPaint split the symbol-only fields out of it.

constructor(id: String, source: String, sourceLayer: String? = null, paint: SymbolLayerPaint = SymbolLayerPaint( icon = IconPaint(), text = emptyList() ), filter: Expression? = null, stencilOnly: Boolean = false, useGlRendering: Boolean = true, timing: LayerTiming? = null, maskLayerIds: List<String> = emptyList(), maskLayerId: String? = null, layerMask: LayerMaskSpec? = null, stencilLayerMask: StencilLayerMaskSpec? = 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 layerMask: LayerMaskSpec?

JS-style mask shorthand (mask: { layerIds: [...] }). Resolved to stencilLayerMask when stencilLayerMask is unset. Apple's maskConfiguration maps here / to stencilLayerMask.

Link copied to clipboard
open override var maskLayerId: String?

Single mask layer id shorthand. Lowest precedence among mask fields.

Link copied to clipboard
open override var maskLayerIds: List<String>

List of mask layer ids (JS mask.layerIds). Lower precedence than layerMask.

Link copied to clipboard
open override var paint: SymbolLayerPaint

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

Advanced custom stencil mask. Takes precedence over layerMask / maskLayerIds / maskLayerId.

Link copied to clipboard
open override var stencilOnly: Boolean

When true, MapsGL does not register a Mapbox fill / line / circle / symbol / heatmap style layer. The com.xweather.mapsgl.layers.tile.VectorTileLayer still exists for tile/GeoJSON consumers, MVT fetch (e.g. com.xweather.mapsgl.map.mapbox.GlStencilCustomMaskCoordinator), and GLES stencil mesh build in com.xweather.mapsgl.renderers.TileLayerRenderer — only screen drawing via Mapbox paint is skipped.

Link copied to clipboard
open override var timing: LayerTiming?

Optional per-layer timing (Apple timing). When non-null, com.xweather.mapsgl.map.MapController.addLayer copies these fields onto the created com.xweather.mapsgl.layers.tile.TileLayer.timing. Null keeps the layer's existing defaults (time-series sources may still enable interval mode).

Link copied to clipboard
open override val type: LayerType

Discriminator matching LayerType.

Link copied to clipboard
open override var useGlRendering: Boolean

When true, eligible fill/line/circle/symbol layers draw via MapsGL GLES instead of Mapbox style layers. MVT sources use com.xweather.mapsgl.renderers.VectorFillLayerRenderer / com.xweather.mapsgl.renderers.VectorLineLayerRenderer / etc. GeoJSON fill, line, circle, symbol, and heatmap layers also support GLES when this flag is set.

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?)