setWorkerModuleUrl
setWorkerModuleUrl(
url):boolean
Defined in: packages/core/src/renderer/maplibre-interop.ts:111
Point maplibre-gl 6+ at its worker module — the bundler setup MapLibre requires (see withWorkerUrlHint) — without forking on version.
Applies only when the running maplibre-gl is 6 or later, url is given,
and nobody set a worker URL yet (a host’s own setWorkerUrl call wins).
Before v6 it is a no-op: the v4/v5 bundle carries its worker inline, and
their setWorkerUrl expects a classic-script URL, not this module.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
url | string | undefined | the bundler’s URL for maplibre-gl/dist/maplibre-gl-worker.mjs (Vite: import url from "maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url") |
Returns
Section titled “Returns”boolean
whether the URL was applied