GeoLeaf Core API - v3.19.0
    Preparing search index...
    • The origin rule's verdict for one URL, as the preparation will render it — for an interface that must say BEFORE the download that a basemap will be skipped, and why.

      Reads the profile's declarations (modules.offline.dataOrigins) and the page's URL, like _keepPrefetchable does. A tile URL TEMPLATE is judged on the concrete tile the preparation would request — {s} read as a, like the tile calculator: judging the template as written would compare https://{s}.tile… to a declared https://a.tile….

      ⚠️ It judges ONE url. A vector basemap is judged twice by the preparation — its style, then the tiles, glyphs and sprite the style names, which may live on other origins: a favourable verdict on the style URL does not promise every resource behind it.

      Parameters

      • url: string

        A resource URL, a tile URL template, or a style URL.

      Returns PrefetchVerdict

      The verdict; reason says why on a refusal.

      const verdict = prefetchVerdictOf("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png");
      if (!verdict.allowed) console.warn(`${verdict.origin}: ${verdict.reason}`);