OptionalloadLoad complete resource bytes, or null for a missing resource (HTTP 404). Other failures must reject.
OptionalwasmPrecompiled WASM (required on Cloudflare Workers). Defaults to the bundled asset in browsers.
OptionalcacheDecoded resources (tiles and their layer geometry, sprites, glyphs) are kept inside the
renderer and reused by later renders; the first render ttlMs or more after they started
being kept drops them. 0 disables reuse, Infinity never expires. Default: 5 minutes.
With 0, a render also drops each layer bucket once drawn, which lowers its peak memory
(e.g. on Cloudflare Workers, whose 128 MB includes WASM memory, which never shrinks).
Fetched bytes are not cached: rely on the HTTP cache, or cache in loadResource.
OptionalttlMs?: numberMilliseconds; 0 or Infinity included. Default: 300 000 (5 minutes).
Options of
MapRenderer.init.