LineLayerDescriptor

data class LineLayerDescriptor(var id: String, var source: String, var sourceLayer: String? = null, var paint: LineLayerPaint = LineLayerPaint( stroke = StrokePaint() ), var filter: Expression? = null) : VectorLayerDescriptor<LineLayerPaint> , LayerEventEmitter

Descriptor for a Mapbox line layer: line strings and polygon rings stroked from vector or GeoJSON geometry.

Workflow matches other VectorLayerDescriptor types: com.xweather.mapsgl.map.MapController.addSource then com.xweather.mapsgl.map.MapController.addLayer. Implemented as a VectorTileLayer over Mapbox’s line layer.

Set sourceLayer for MVT sources; use null for GeoJSON. paint controls color, width, opacity, and join/cap via LineLayerPaint → Mapbox line-* paint properties.

See also

Constructors

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

Properties

Link copied to clipboard
open override var filter: Expression?

Optional feature filter.

Link copied to clipboard
open override var id: String

Unique layer id.

Link copied to clipboard
open override var paint: LineLayerPaint

Line stroke styling.

Link copied to clipboard
open override var source: String

Existing source id (vector or GeoJSON).

Link copied to clipboard
open override var sourceLayer: String?

MVT layer name, or null for GeoJSON.

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