Interface RendererLayerFragmentExperimental

One MapLibre layer fragment compiled from a renderer. paint/layout values are plain MapLibre style JSON (expressions included) that map.addLayer accepts verbatim; the caller owns layer ids and source wiring.

interface RendererLayerFragment {
    filter?: unknown;
    layout: Record<string, unknown>;
    paint: Record<string, unknown>;
    role:
        | "symbolizer"
        | "clusters"
        | "cluster-count"
        | "unclustered";
    type: string;
}

Properties

filter?: unknown

Optional MapLibre filter expression the fragment requires.

layout: Record<string, unknown>
paint: Record<string, unknown>
role:
    | "symbolizer"
    | "clusters"
    | "cluster-count"
    | "unclustered"

Which part of the renderer this fragment draws. Single-layer renderers emit one "symbolizer" fragment; the cluster renderer emits "clusters", "cluster-count", and "unclustered" fragments.

type: string

MapLibre layer type (circle, line, fill, heatmap, symbol).