GeoLeaf Core API - v3.19.0
    Preparing search index...
    • Pulls the entities of every selected layer that declares a source.

      Never throws and never fails the download: pullLayer returns a report rather than raising, and a layer whose source is down must not undo the megabytes of tiles that were just cached. What it does instead is say so, one line per layer.

      ⚠️ Sequential, deliberately. Each pull writes one IndexedDB transaction per source page; running several layers at once would interleave those transactions on the same store for no wall-clock gain worth the contention, and would make the progress signal — which names one layer at a time — unreadable.

      Each pull is bounded by the download zone when one was drawn — see zoneBbox above.

      Parameters

      • profileId: string

        Profile being downloaded.

      • selection: SelectionLike | null | undefined

        The saved selection: its layer whitelist (absent means every layer) and its download zone (absent means no extent). null when nothing was saved.

      • Optionalsignal: AbortSignal

        Cooperative abort, forwarded to each pull.

      Returns Promise<CacheProfilePulledLayer[]>

      One report per layer attempted; [] when the profile declares no source.

      const pulled = await pullDeclaredLayers("tourism", selection);
      console.info(`${pulled.filter((p) => !p.refused).length} couche(s) rapatriée(s)`);