SymbolLayerDescriptor

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.

Kept so SymbolLayerDescriptor(id, source, sourceLayer, GridLayerPaint(...), filter) still compiles. The shared fields carry over as they are; GridLayerPaint.grid and GridLayerPaint.sample have no symbol equivalent and are dropped, which is what the layer did with them anyway — a Mapbox symbol layer never sampled an encoded field.

Reading paint back returns a SymbolLayerPaint; that return type is the one part of this change no shim can hide. Prefer passing a SymbolLayerPaint directly in new code.


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)