SDK JS
    Preparing search index...
    • Make maplibregl ready to use with this SDK, whatever the major version and bundler. Idempotent, and a no-op on maplibre-gl v5 (its worker is inlined).

      Parameters

      Returns Promise<void>

      Error when the v6 worker cannot be resolved and onUnresolved is 'throw' (the default).

      await prepareMapLibre(maplibregl);
      const map = new maplibregl.Map({ container: 'map', style });