The underlying maplibregl.Map.
The adapter's layer registry.
GeoLeaf layer id.
The GeoJSON about to be written — a whole collection, or the features a diff adds.
Optionaloptions: GeoLeafLayerOptions
The options the layer was created with.
The sub-layer families added; empty when the layer already drew what it receives.
Gives a GeoJSON layer the sub-layers of a geometry it is about to receive and has none for, and returns the families added.
🛑 A layer's sub-layers were decided once, from its first batch: a layer created with points had nothing to draw a polygon with, so a polygon written to it later was stored, listed in the table, counted by the filter — and never drawn. The decision is still made at creation; it is now COMPLETED when the data shows a family the layer does not draw.
Each new sub-layer is built by the builders of a creation, from the options the layer was created with, and inserted where a creation would have drawn it: below the sub-layers of this layer that come after it in the stack, else right above the layer's own top. It takes the layer's current visibility and the zoom range its sub-layers carry now.
⚠️ What this does NOT replay, and the caller owns: a style set since the creation, and the filters the layer carries — both are per-adapter state (
MaplibreAdapter.updateLayerData).⚠️ Two layers are left as they are. A vector-tile layer, which is not built here. And a CLUSTERED layer: its source indexes points alone, so a sub-layer for lines or polygons would have nothing to draw.