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

    Basemap (tile or vector) configuration entry. Used as values in GeoLeafConfig.basemaps record.

    interface BasemapConfig {
        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

    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".