Skip to content
LoidoltTheme 0.11.1
Svelte 5

Component

DeckOverlay

deck.gl layers drawn on the map, for data too large or too 3D for MapLibre alone.

import { DeckOverlay } from '@loidolt/theme-maps';

Example

Focus the map to move it: arrow keys pan, plus and minus zoom, Shift with the arrows rotates and tilts.

Notes

  • deck.gl is an optional peer. Register it once with setDeckLoader(() => import('@deck.gl/mapbox')); until then the overlay draws nothing and calls onUnavailable.
  • Drawn on its own canvas over the map by default. interleaved puts deck.gl layers among the map’s own, but needs a deck.gl release that supports your MapLibre major — deck.gl 9.4 does not yet support MapLibre 6.

Props

Generated from the component source, so it cannot drift from the implementation.

DeckOverlay props
PropTypeDefaultNotes
layers required unknown[]—deck.gl layers, built by you (new ScatterplotLayer({…})). Replace the array to update.
interleaved booleanfalseDraw deck.gl layers in among the map's own, sharing its depth, rather than on a canvas above it. Off by default: interleaving reaches into MapLibre's renderer, so it needs a deck.gl release that supports your MapLibre major (deck.gl 9.4 does not yet support MapLibre 6's).
onUnavailable () => void—deck.gl could not be loaded: nothing is drawn. Register it with setDeckLoader.
overlayProps Record<string, unknown>{}Anything else MapboxOverlay takes — getTooltip, pickingRadius, effects…