Skip to main content

Type Alias: RasterTileLayerProps<DataT>

RasterTileLayerProps<DataT> = CompositeLayerProps & Pick<TileLayerProps<DataT>, "debounceTime" | "maxCacheByteSize" | "maxCacheSize" | "maxRequests" | "maxZoom" | "minZoom" | "onTileError" | "onTileLoad" | "onTileUnload" | "onViewportLoad" | "refinementStrategy" | "tileSize" | "zoomOffset"> & object

Defined in: packages/deck.gl-raster/src/raster-tile-layer/raster-tile-layer.ts:62

Props for RasterTileLayer.

Type Declaration​

debug?​

optional debug?: boolean

Show triangulation mesh + tile outlines.

Default​

false

debugOpacity?​

optional debugOpacity?: number

Opacity of the debug mesh overlay (0–1).

Default​

0.5

extent?​

optional extent?: number[] | null

Only load tiles that overlap this bounding box, given as [minLng, minLat, maxLng, maxLat] in WGS84 degrees.

Tiles are always limited to the tileset descriptor's bounds; this narrows them further, e.g. to load only part of a global TileMatrixSet such as WebMercatorQuad.

getTileData?​

optional getTileData?: (tile, options) => Promise<DataT>

Load data for one tile. Runs once per (x, y, z); the resulting DataT is cached by the underlying TileLayer.

Subclasses may supply this via state by overriding _getTileDataCallback().

Parameters​

tile​

TileLoadProps

options​

GetTileDataOptions

Returns​

Promise<DataT>

maxError?​

optional maxError?: number

Maximum reprojection error for mesh refinement: how far a tile's mesh may draw a point from where it belongs on the map, in output pixels (one input pixel's size on the map, normally at the center of the meshed area). Lower values create denser meshes.

Default​

0.125

renderTile?​

optional renderTile?: (data) => RenderTileResult | null

Turn cached tile data into a render result (image and/or shader pipeline). Called on every render; does not re-fetch.

To invalidate the inner TileLayer's rendered sub-layers when a dependency changes (e.g. a colormap choice), pass updateTriggers: { renderTile: [dep1, dep2] } on the layer props.

Subclasses may supply this via state by overriding _renderTileCallback().

Parameters​

data​

DataT

Returns​

RenderTileResult | null

signal?​

optional signal?: AbortSignal

AbortSignal applied to every tile fetch, composed with TileLayer's per-tile signal.

tilesetDescriptor?​

optional tilesetDescriptor?: RasterTilesetDescriptor

Tile pyramid + CRS projection descriptor.

Subclasses may supply this via state by overriding the protected _tilesetDescriptor() method.

zRange?​

optional zRange?: [number, number] | null

Lowest and highest elevation, in meters, of the surface the raster is drawn on, such as the terrain under a COG draped with deck.gl's TerrainExtension.

Tiles are selected for the volume between these heights instead of for the ground at sea level, so tiles the terrain lifts into view still load. This only changes which tiles load; it doesn't move the raster. Ignored in GlobeView.

A deck.gl TerrainLayer's tiles report their elevations: in its onTileLoad, each tile's mesh has a header.boundingBox, which is also how TerrainLayer sets its own zRange. The cog-terrain example widens this range as terrain tiles load.

Default​

null

Type Parameters​

DataT​

DataT extends MinimalTileData = MinimalTileData