Skip to content

spatial-monorepo


spatial-monorepo / pmtiles/src / registerSpatialSW

Variable: registerSpatialSW

const registerSpatialSW: (options) => Promise<void> = registerSpatialServiceWorker

Defined in: packages/pmtiles/src/index.ts:190

Backward-compatibility alias for registerSpatialServiceWorker (PRD F61).

Registers the Spatial Service Worker that intercepts PMTiles range requests and caches them in the Cache API for offline use.

PRD F61 — registerSpatialServiceWorker.

Parameters

options?

SWOptions = {}

Returns

Promise<void>

Example

ts
await registerSpatialServiceWorker({
  buildingIds: ['https://tiles.example.com/building-a'],
  maxCacheBytes: 200 * 1024 * 1024, // 200 MB
});

Released under commercial licensing.