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

    Variable styleDocumentStoreConst

    styleDocumentStore: Map<string, unknown> = ...

    Style DOCUMENTS pre-seeded from a profile bundle, keyed like styleCache ("profileId:layerId:styleId"), holding the RAW document — not the loaded envelope.

    🛑 Two stores, and the distinction is load-bearing. styleCache holds what loadAndValidateStyle RETURNS: an envelope with labelConfig, a derived id and metadata. This one holds what a fetch would have RECEIVED. A raw document put into styleCache would satisfy every consumer that only reads styleData, and break the legend generator, which reads styleData.id — the exact defect _ensureStyleId exists to prevent. So the seeded path runs the same envelope chain as the fetched one; it does not shortcut it.