GeoLeaf Core API - v3.19.0
    Preparing search index...

    Ephemeral GPU-side feature-state (sync badge, hover, selection). Applied via map.setFeatureState() and therefore requiring promoteId on the source.

    A durable flag must ALSO be baked on the feature property (see patchFeature). That has always been the rule; what changed with R6 is the reason it matters.

    ⚠️ This said "it is cleared by any source data rebuild (setData/updateLayerData)", and that is no longer true of every write. A whole-collection write still clears it. A UNIT mutation now reaches the engine as a diff (IMapAdapter.applyDataDiff), which updates features in place and leaves feature-state standing. The two writes therefore no longer agree on this, and the difference is observable.

    The consequence to know before relying on it: the sync badge paints coalesce(feature-state.syncStatus, properties._syncStatus) — feature-state wins. While every write cleared it, the baked property was effectively authoritative; it no longer is. Nothing in this repo sets that feature-state today (the only caller of setFeatureState is this public passthrough), so no shipped behaviour changes — which is precisely why no clearing was added: it would guard a caller that does not exist and cost an engine call per mutation. An integrator who does set it must now clear it themselves, and this paragraph is the notice.

    interface LayerFeatureState {
        syncStatus?: string;
        hover?: boolean;
        selected?: boolean;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown
    Index
    syncStatus?: string

    "pending" → sync badge stroke; "synced"/absent → cleared.

    hover?: boolean

    Hover halo.

    selected?: boolean

    Selection halo.