SDK JS
    Preparing search index...

    Interface PrepareMapLibreOptions

    Options for prepareMapLibre.

    interface PrepareMapLibreOptions {
        onUnresolved?: "throw" | "warn";
        workerUrl?: string;
    }
    Index

    Properties

    onUnresolved?: "throw" | "warn"

    What to do when no worker URL can be resolved. Defaults to 'warn': maplibre's own import.meta.url resolution is correct for native-ESM/CDN loading and for most production bundles, so a failed probe is not proof of breakage. Use 'throw' to fail setup hard instead.

    workerUrl?: string

    Explicit worker URL, for bundlers whose layout cannot be derived. With Vite: import workerUrl from 'maplibre-gl/dist/maplibre-gl-worker.mjs?url'. Supplying this skips all probing.