Equivalent to a MapLibre layer specification (one of circle, line, fill,
symbol, heatmap, …) with source and id removed, and an optional beforeID
for ordering. The variant is preserved by type, so variant-specific properties
(filter, layout, paint, …) keep their narrow types.
id is auto-generated as ${sourceID}-layer-${layerIndex} when omitted. Provide
an explicit ID when you want to refer to the layer from outside the module
(e.g. to remove it via applyConfig), or when the layer set is expected to
change at runtime and you want a stable identity that is independent of array order.
beforeID is the ID of an existing map layer the new layer should be inserted
before — see MapLibre's addLayer.
Specification for a single custom layer attached to a CustomGeoJSONSourceSpec.
Equivalent to a MapLibre layer specification (one of
circle,line,fill,symbol,heatmap, …) withsourceandidremoved, and an optionalbeforeIDfor ordering. The variant is preserved bytype, so variant-specific properties (filter,layout,paint, …) keep their narrow types.idis auto-generated as${sourceID}-layer-${layerIndex}when omitted. Provide an explicit ID when you want to refer to the layer from outside the module (e.g. to remove it via applyConfig), or when the layer set is expected to change at runtime and you want a stable identity that is independent of array order.beforeIDis the ID of an existing map layer the new layer should be inserted before — see MapLibre'saddLayer.