spatial-monorepo / pmtiles/src / SWOptions
Interface: SWOptions
Defined in: packages/pmtiles/src/index.ts:110
Options for registerSpatialServiceWorker.
Properties
buildingIds?
optionalbuildingIds?:string[]
Defined in: packages/pmtiles/src/index.ts:115
Building IDs to pre-cache on Service Worker install. Each ID is treated as the base URL of a .pmtiles archive.
maxCacheBytes?
optionalmaxCacheBytes?:number
Defined in: packages/pmtiles/src/index.ts:121
Maximum total bytes to keep in the tile cache. When exceeded the least-recently-used entries are evicted. 0 (default) means unlimited.
onUpdate?
optionalonUpdate?: () =>void
Defined in: packages/pmtiles/src/index.ts:136
Called when the Service Worker has an available update. Use this to prompt the user to reload for offline support.
Returns
void
scope?
optionalscope?:string
Defined in: packages/pmtiles/src/index.ts:131
Service Worker registration scope.
Default
'/'swUrl?
optionalswUrl?:string
Defined in: packages/pmtiles/src/index.ts:126
URL of the compiled Service Worker script.
Default
'/spatial-sw.js'