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

    Factory manager for multi-map support.

    ⚠️ It holds NO registry of its own, and that is the point. It used to keep a mapInstances map alongside the one Core already owns, filled only by its own createMap() with the very IMapAdapter that Core.getMap() returns — a mirror, not a second source of truth. Core.destroy() purged one of the two, so GeoLeaf.getMap() and GeoLeaf.Core.getMap() could disagree — measured once.

    The fix is subtraction: every accessor delegates, so there is nothing left to keep in sync. Measured before removing it — no production caller ever reached GeoLeaf.createMap() (boot uses its own local createMap in app/boot-modules/core-map-lifecycle.ts), so the mirror was never even populated: GeoLeaf.getMap() returned null for every live map. This is a simplification that happens to restore two published members, not a leak being patched.

    Index
    isReady: boolean
    stats: { mapsCreated: number; errors: number }
    getModule: IModuleAccessFn | null
    • Returns a map instance by id, read from the Core registry.

      Parameters

      • targetId: string

        Target element id.

      Returns {} | null

      The registered IMapAdapter, or null when there is none (or when the manager has not been initialised yet).

    • Returns every live map instance, read from the Core registry.

      Returns {}[]

      The registered adapters, in registration order; [] when there is none (or when the manager has not been initialised yet).

    • Destroys a map instance by id.

      ⚠️ It now DESTROYS, where it used to drop a mirror entry and leave the real map running — that discrepancy was half of the measured disagreement. No production caller reached it (measured 14/08/2026: definition and unit tests only), so nothing depended on the old, weaker meaning.

      Parameters

      • targetId: string

        Target element id.

      Returns boolean

      true when an instance was found and destroyed, false otherwise.

    • Returns the manager statistics.

      activeInstances counts what Core holds — this manager counts nothing of its own. ⚠️ It is NOT on the GeoLeaf.getHealth() path: that one reads APIController.healthStatus and never calls in here (measured 14/08/2026, against a roadmap note claiming the opposite).

      Returns {
          mapsCreated: number;
          errors: number;
          activeInstances: number;
          isReady: boolean;
      }

    • Resets the manager.

      Resets ITS OWN state only — counters and module access. It does not destroy live maps, and never did: it used to clear a mirror, which left every real map running.

      Returns void