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

    Interface BootOptions

    Options a caller hands to GeoLeaf.boot(), forwarded whole to the boot sequence.

    config and configUrl answer the same question — where does the configuration come from? — at two levels: an object already held in memory, or an explicit URL. Both are optional; with neither, the boot falls back to a path derived from the host page, which is the historical behaviour and is unchanged.

    ⚠️ No index signature on purpose. AppNamespace below carries one, and it masks any misspelt member: startApp would accept { confgUrl } without a word. Declaring every option explicitly is what makes a typo a compile error rather than a silent no-op.

    interface BootOptions {
        config?: Record<string, unknown>;
        configUrl?: string;
        profile?: string;
        beforeBoot?: (
            context: { config: Readonly<Record<string, unknown>> },
        ) => void | Promise<void>;
        onPerformanceMetrics?: (
            metrics: {
                timeToMapReadyMs: number | null;
                timeToAppReadyMs: number | null;
                startupTotalMs: number | null;
                capturedAt: string;
            },
        ) => void;
        watchdogMs?: number;
        maplibregl?: __module;
    }
    Index
    config?: Record<string, unknown>

    A configuration object handed over in memory: no request is emitted to fetch one. Wins over configUrl.

    ⚠️ Its data.activeProfile is the LAST word on the profile, not the first: a profile the user picked with the profile switcher on the same origin, stored in the browser, wins over it. To decide the profile, pass BootOptions.profile.

    ⚠️ An empty object {} is a VALID inline configuration, exactly as for GeoLeaf.loadConfig — the two bootstrap paths never diverge on the same value.

    configUrl?: string

    An explicit URL to fetch the configuration from. Used when config is absent.

    profile?: string

    The profile to boot. Wins over the profile the user picked with the profile switcher (stored in the browser for the whole origin) and over the configuration's data.activeProfile. Without it, the stored choice wins over data.activeProfile.

    Letters, digits, _ and -, at most 50 characters: any other value is refused with a warning in the console, and the boot goes on as if it were absent.

    GeoLeaf.mount("map", { configUrl: "/geoleaf/config.json", profile: "field" });
    
    beforeBoot?: (
        context: { config: Readonly<Record<string, unknown>> },
    ) => void | Promise<void>

    Runs after the configuration and the profile load, before the map. Throwing aborts the boot. This is where a host overrides a value that the profile declares, with GeoLeaf.Config.set (e.g. ui.language). No module has read the configuration yet.

    onPerformanceMetrics?: (
        metrics: {
            timeToMapReadyMs: number | null;
            timeToAppReadyMs: number | null;
            startupTotalMs: number | null;
            capturedAt: string;
        },
    ) => void

    Receives startup metrics once geoleaf:app:ready has fired.

    watchdogMs?: number

    Milliseconds without a reveal before the boot is reported as stalled: a PROVISIONAL geoleaf:boot:failed (reason: "timeout") and a « Reload » screen, which a late reveal removes. Default 45 000; 0 disables it. Paused while beforeBoot runs.

    maplibregl?: __module

    The MapLibre GL JS engine — the module namespace an import * as maplibregl from "maplibre-gl" returns. MapLibre 6 no longer sets globalThis.maplibregl: this option is how the engine reaches the core, which installs it on the global at the start of the boot, where every reader looks for it. A different engine already there is replaced, with a warning. Without the option, the global is read as before; with neither, the boot fails with reason: "engine" when it builds the map.