Fill Layer Descriptor
data class FillLayerDescriptor(var id: String, var source: String, var sourceLayer: String? = null, var paint: FillLayerPaint = FillLayerPaint(
fill = FillPaint(),
stroke = StrokePaint()
), var filter: Expression? = null) : VectorLayerDescriptor<FillLayerPaint> , LayerEventEmitter
Descriptor for a Mapbox fill layer: polygon features filled with optional outline, backed by a vector or GeoJSON source.
Add the source with com.xweather.mapsgl.map.MapController.addSource, then register this descriptor via com.xweather.mapsgl.map.MapController.addLayer. Renders as a VectorTileLayer using Mapbox’s native fill layer.
For vector tiles, set sourceLayer to the MVT layer containing polygons. For GeoJSON, use null on sourceLayer so the whole collection is used. filter restricts which features participate.
See also
Constructors
Link copied to clipboard
constructor(id: String, source: String, sourceLayer: String? = null, paint: FillLayerPaint = FillLayerPaint(
fill = FillPaint(),
stroke = StrokePaint()
), filter: Expression? = null)