GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Expands a {s} subdomain URL template into an array of explicit tile URLs suitable for MapLibre raster sources.

      Rules:

      • If definition.tiles is a non-empty array → returned as-is (highest priority), then {apikey} placeholders are resolved using definition.apiKey.
      • If definition.url starts with pmtiles:// → returned as single-element array (no expansion).
      • If definition.url contains {s} → expanded using definition.subdomains (string "abc" or array ["a","b","c"]; defaults to ["a","b","c"]).
      • If definition.url is present without {s} → returned as single-element array.
      • Otherwise → empty array.

      API key injection:

      • If any resolved URL contains {apikey} and definition.apiKey is provided, {apikey} is replaced with the key value for all URLs.
      • If apiKey is absent and definition.apiKeyRequired is true, a warning is emitted and an empty array is returned (basemap disabled).
      • If apiKey is absent and apiKeyRequired is not set (optional key, e.g. Stadia), the {apikey} placeholder and its query param are stripped — the URL remains valid for unauthenticated access.

      Parameters

      Returns string[]

      Array of resolved tile URL strings.