Skip to main content

Tile imagery on terrain

Shared draping for imagery, DEM coloring, order and opacity

Common raster tile layers and derived hillshade/color-relief tiles now combine with the DEM bound by setTerrain. They draw on loaded real triangles in layer order and blend opacity once. moveLayer, visibility, opacity and exaggeration update actual pixels.

map.addLayer({ id: 'imagery', type: 'raster', source: 'imagery' });
map.setTerrain({ source: 'dem', exaggeration: 1 });
await map.sqs.flush({ render: true });

Existing texture-count/64 MiB imagery and terrain geometry budgets apply. Outside DEM coverage or in nodata holes, imagery retains its lower fallback plane. Terrain coordinate/elevation queries still report actual surface data or missing data; fallback pixels are not elevation. Default hillshade may be transparent on flat areas, preserving imagery underneath.

Registered image/video/canvas convex quads also drape; independent URL basemap raster styles and building/symbol draping remain limited; candidate validation rejects unsupported combinations before mutation. Browser example reset now releases terrain, removes common layers/sources, restores zero pitch and then changes projection.

The complete HTML example exposes all data paths, four buttons, handlers and attribution. It uses generated DEM and solid imagery, not real-world map data. Replace URLs and display your provider's required copyright. Native, browser main thread/Worker and desktop share this path; local software-GPU results do not replace phone or external hardware acceptance.

The web workbench also supports local single-band DEMs as a 3D surface. The top visible DEM shapes the ground, missing values remain absent, and workspace and engine task Worker restoration are supported. SeeLocal DEM 3D surface.