Optional ReadonlyremoveRemoves every feature. Mutually exclusive in practice with the fields below.
Optional ReadonlyremoveIds of features to remove.
Optional ReadonlyaddWhole features to add.
Optional ReadonlyupdateIn-place changes to features already present.
A change to a layer's features, expressed as what MOVED rather than as the resulting collection — the input of IMapAdapter.applyDataDiff.
Applied in the order
removeAll→remove→add→update. The order is part of the contract, not an implementation detail: it is what lets a single diff express an id change (removethe old,addthe new) and what makes anupdateon a feature added by the same diff meaningful.🛑 Every feature named here must carry a UNIQUE, RESOLVABLE id — an engine addresses a feature by id and by nothing else. A diff naming a feature the layer cannot identify is not an error the caller will be told about; it is a feature silently skipped. Deciding eligibility BEFORE building a diff is therefore the caller's job, and
GeoJSONCoreis where that decision lives.⚠️ Declared here rather than imported from the engine, deliberately. A type-only import of MapLibre's own diff type is permitted by the lint rules (
allowTypeImports), so this is not a rule being obeyed — it is ADR-01 one level up.IMapAdapteris the seam that makes the engine replaceable; typing one of its parameters with an engine type would make the SHAPE of the seam depend on that engine's.d.ts, and would oblige any second adapter to satisfy MapLibre's type. The translation belongs in the adapter, which is the only place that knows an engine at all.