@mapvx/web-js 4.0.1-dev.1 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.d.ts +1 -0
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js +5 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/logger/sentry.js +1 -1
- package/dist/es/map/generated/maplibreWorkerSource.d.ts +11 -0
- package/dist/es/map/generated/maplibreWorkerSource.d.ts.map +1 -0
- package/dist/es/map/generated/maplibreWorkerSource.js +14 -0
- package/dist/es/map/generated/maplibreWorkerSource.js.map +1 -0
- package/dist/es/map/installMapLibreWorker.d.ts +87 -0
- package/dist/es/map/installMapLibreWorker.d.ts.map +1 -0
- package/dist/es/map/installMapLibreWorker.js +134 -0
- package/dist/es/map/installMapLibreWorker.js.map +1 -0
- package/dist/es/map/map.d.ts.map +1 -1
- package/dist/es/map/map.js +10 -0
- package/dist/es/map/map.js.map +1 -1
- package/dist/umd/index.js +170 -4
- package/dist/umd/index.js.map +1 -1
- package/package.json +12 -7
package/README.md
CHANGED
|
@@ -46,6 +46,17 @@ so inlining it is what keeps a CommonJS entrypoint possible at all. One conseque
|
|
|
46
46
|
loading both the ESM and CJS entrypoints in the same process gives you two independent MapLibre
|
|
47
47
|
instances. Pick one — for anything modern, that is ESM.
|
|
48
48
|
|
|
49
|
+
### Map worker
|
|
50
|
+
|
|
51
|
+
MapLibre renders tiles on a web worker. The SDK carries that worker inside its own bundle and
|
|
52
|
+
registers it as a `blob:` URL when your first map is created, so there is nothing to copy, host or
|
|
53
|
+
configure, whatever bundler you use and whatever path your app is served from.
|
|
54
|
+
|
|
55
|
+
The one case that needs action is a Content-Security-Policy that forbids `blob:` workers — the map
|
|
56
|
+
stays empty and the browser console reports a CSP violation. Add `worker-src blob:` to your policy,
|
|
57
|
+
or host the worker yourself with `setMapLibreWorkerUrl()`. See
|
|
58
|
+
[Install Package](https://mapvx.github.io/sdk-web/installing) for the details.
|
|
59
|
+
|
|
49
60
|
## Quick Start
|
|
50
61
|
|
|
51
62
|
```typescript
|