VectorLayerDescriptor

Marker for layer descriptors that map to Mapbox vector style layers (fill, line, circle, symbol, heatmap). Implementations add sourceLayer (MVT layer name, or null for GeoJSON) and an optional feature filter.

The type parameter P is the paint type serialized via VectorLayerPaint.asStyleJSON when the layer is added.

See also

Inheritors

Properties

Link copied to clipboard
abstract var filter: Expression?
Link copied to clipboard
abstract var id: String

Stable layer id (Mapbox style layer id and MapsGL registry key).

Link copied to clipboard
abstract 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
abstract var maskLayerId: String?

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

Link copied to clipboard
abstract var maskLayerIds: List<String>

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

Link copied to clipboard
abstract var paint: P

Type-specific paint/layout.

Link copied to clipboard
abstract var source: String

Id of a registered source (SourceDescriptor.id).

Link copied to clipboard
abstract var sourceLayer: String?
Link copied to clipboard

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

Link copied to clipboard
abstract 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
abstract 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
abstract val type: LayerType

Discriminator matching LayerType.

Link copied to clipboard
abstract 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
abstract fun off(eventName: String)
Link copied to clipboard
abstract fun on(eventName: String, callback: (Any?) -> Unit)
Link copied to clipboard
abstract fun trigger(eventName: String, data: Any? = null)