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

    A basemap definition as handled at runtime by the basemaps module.

    Extends the canonical BasemapConfig contract with fields the module reads but which are not part of the public config surface (they originate from provider presets and profile overrides):

    • apiKey / apiKeyRequired: tile API-key injection (see normalizeTilesArray).
    • options: legacy provider option bag (attribution, maxZoom).
    • top-level demUrl / demEncoding / demMaxZoom: hillshade DEM shortcuts accepted alongside the nested hillshade.* form.

    All extra fields are optional, so every BasemapConfig is assignable here.

    interface BasemapDefinition {
        apiKey?: string;
        apiKeyRequired?: boolean;
        options?: {
            attribution?: string;
            maxZoom?: number;
            [key: string]: unknown;
        };
        demUrl?: string;
        demEncoding?: "terrarium"
        | "mapbox";
        demMaxZoom?: number;
        id?: string;
        label?: string;
        type?: string;
        url?: string;
        fallbackUrl?: string;
        attribution?: string;
        minZoom?: number;
        maxZoom?: number;
        style?: string;
        subdomains?: string | string[];
        tiles?: string[];
        tileSize?: number;
        defaultBasemap?: boolean;
        offline?: boolean;
        offlineBounds?: {
            north: number;
            south: number;
            east: number;
            west: number;
        };
        cacheMinZoom?: number;
        cacheMaxZoom?: number;
        terrain?: TerrainConfig;
        imageSource?: ImageSourceConfig;
        hillshade?: HillshadeConfig;
        wmts?: WmtsConfig;
        wms?: WmsConfig;
    }

    Hierarchy (View Summary)

    Index

    Properties

    apiKey?: string

    Tile-service API key substituted into any {apikey} placeholder.

    apiKeyRequired?: boolean

    When true, the basemap is disabled if apiKey is missing (avoids silent 403).

    options?: { attribution?: string; maxZoom?: number; [key: string]: unknown }

    Legacy provider option bag carrying attribution / maxZoom.

    demUrl?: string

    Top-level DEM tile URL (hillshade shortcut for hillshade.demUrl).

    demEncoding?: "terrarium" | "mapbox"

    Top-level DEM encoding (hillshade shortcut for hillshade.demEncoding).

    demMaxZoom?: number

    Top-level DEM max zoom (hillshade shortcut for hillshade.demMaxZoom).

    id?: string

    Unique basemap key (mirrors the record key).

    label?: string

    Display label shown in the basemap switcher.

    type?: string

    Basemap rendering type.

    • "tile" / "raster": XYZ raster tiles (default when url or tiles are set).
    • "maplibre": MapLibre GL vector style (requires style).
    • "image": Static georeferenced image overlay (requires imageSource).
    • "hillshade": Hillshade terrain shading (requires hillshade.demUrl).
    • "wmts": WMTS tile service via GetCapabilities (requires wmts.getCapabilitiesUrl).
    • "wms": WMS tile service (requires wms.url and wms.layers).
    url?: string

    Tile URL template, e.g. "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png".

    fallbackUrl?: string

    Fallback tile URL when MapLibre GL is unavailable.

    attribution?: string

    Map attribution string (HTML allowed).

    minZoom?: number

    Minimum zoom level.

    maxZoom?: number

    Maximum zoom level.

    style?: string

    MapLibre GL style URL (only for type: 'maplibre').

    subdomains?: string | string[]

    Tile subdomains, e.g. "abc" or ["a", "b", "c"].

    tiles?: string[]

    Explicit tiles array for MapLibre raster sources (overrides {s} subdomain template).

    tileSize?: number

    Tile size in pixels. Default 256.

    defaultBasemap?: boolean

    When true, this basemap is active on startup.

    offline?: boolean

    When true, this basemap supports offline tile caching.

    offlineBounds?: { north: number; south: number; east: number; west: number }

    Geographic bounds for offline caching.

    cacheMinZoom?: number

    Minimum zoom level to cache offline.

    cacheMaxZoom?: number

    Maximum zoom level to cache offline.

    terrain?: TerrainConfig

    3D terrain / raster-dem configuration for this basemap.

    imageSource?: ImageSourceConfig

    Static image overlay configuration. Required when type: "image".

    hillshade?: HillshadeConfig

    Hillshade terrain-shading configuration. Required when type: "hillshade".

    wmts?: WmtsConfig

    WMTS service configuration. Required when type: "wmts".

    wms?: WmsConfig

    WMS service configuration. Required when type: "wms".