Optional ReadonlyattributionOverride the displayed attribution (default: the stacked services' own copyrightText).
Optional ReadonlyauthRequest authorizer for tile + metadata requests across the whole stack
(secured ArcGIS ImageServers). Superseded by a global configureEsriAuth().
Optional ReadonlycacheOptional in-memory decoded-tile cache, keyed by entry count (default off).
Budget note: on the bitmap path an entry holds the raw RGBA grid —
~(tileSize+1)²·4 bytes (~264 KB at 256 px), larger than the old
compressed-PNG entries. Size maxEntries accordingly.
Optional ReadonlycameraMinimum camera height above the rendered terrain, metres (default 2): the
camera can never end a camera update under the DEM. Enforced on every
gesture/animation via acquireCameraFloor while the stack has terrain
attached; released when the stack empties or the controller is removed. Pass
false to disable, or a number to change the margin.
Optional ReadonlyencodingDEM re-encoding (default 'terrarium').
Optional ReadonlyexaggerationTerrain vertical exaggeration, unitless multiplier (default 1).
Optional ReadonlygestureSuppress MapLibre's terrain gesture-end camera snap-back while the stack has
terrain attached (default true). On gesture end MapLibre reconciles the
frozen gesture elevation against a fresh DEM sample; at a tilt that slides the
centre by Δe·tan(pitch), which reads as the view jumping backward. The fix
is applied automatically via
preventTerrainGestureSnap and released when the stack empties or the
controller is removed. Pass false to keep stock behavior.
Optional ReadonlyidSource id prefix (default 'esri-terrain'); a sequence suffix is appended per rebuild.
ReadonlymaplibreglThe caller's maplibre-gl namespace — injected so this package never imports maplibre-gl.
Optional ReadonlynodataHow to fill pixels no layer covers; see NodataPolicy. Defaults to zero-fill (sea level).
Optional ReadonlyonCalled if terrain decode degrades — today: the decode worker pool could not be
spawned (cross-origin CDN bundle, or a CSP without worker-src blob:) and DEM tiles
fall back to the main thread. Terrain still renders, much more slowly; without a
handler this is only a one-time console.warn.
Optional ReadonlyoutputProtocol payload format (default 'bitmap'): hand MapLibre a ready
ImageBitmap — skipping both our PNG encode and MapLibre's main-thread
PNG decode — with automatic per-realm fallback to 'png' where
createImageBitmap is unavailable. Pass 'png' to force the fallback.
Optional ReadonlypoolDecode worker pool size (default ~hardwareConcurrency−1, capped at 4).
Optional ReadonlyrequestStatic fetch options for tile + metadata requests (e.g. auth headers).
Optional ReadonlyschemeProtocol scheme registered via addProtocol (default 'esri-dem').
Optional ReadonlyspawnOverride worker creation (CDN/CSP escape hatch).
Optional ReadonlytileTerrain LOD tuning for horizon/behind-camera continuity at high pitch
(re-applied on every stack change; see TileLodParams). Defaults to a
modest continuity setting (DEFAULT_TILE_LOD); pass false to keep
MapLibre's defaults. Complement with the maxTileCacheZoomLevels
map-constructor option for gap-free pan-back.
Optional Readonlyusefalse decodes on the main thread instead of a worker pool (default worker pool).
Optional Readonlywasmturbo-lerc wasm init (bytes/url) forwarded to the decode workers — for the
cross-origin CDN fallback; see @bitruvius/geo-core's BitruviusConfig.wasmBaseUrl.
Options for createEsriTerrain.