Type Alias: MosaicLayerProps<MosaicT, DataT>
MosaicLayerProps<
MosaicT,DataT> =CompositeLayerProps&Pick<TileLayerProps,"debounceTime"|"extent"|"maxCacheByteSize"|"maxCacheSize"|"maxRequests"|"maxZoom"|"minZoom"> &object
Defined in: packages/deck.gl-geotiff/src/mosaic-layer/mosaic-layer.ts:15
Type Declaration
getSource?
optionalgetSource?: (source,opts) =>Promise<DataT>
Fetch data for this source.
Parameters
source
MosaicT
opts
signal?
Returns
Promise<DataT>
onSourceError?
optionalonSourceError?: (source,info) =>void
Called when fetching a source's data fails.
Parameters
source
MosaicT
info
error
Returns
void
onSourceLoad?
optionalonSourceLoad?: (source,info) =>void
Called after a source's data has loaded successfully. data is the
value returned by getSource, or undefined when no getSource was
supplied.
Parameters
source
MosaicT
info
data?
DataT
Returns
void
onSourceUnload?
optionalonSourceUnload?: (source,info) =>void
Called when a source is evicted from the tile cache.
Parameters
source
MosaicT
info
data?
DataT
Returns
void
onViewportLoad?
optionalonViewportLoad?: (entries) =>void
Called when all sources currently in the viewport have finished loading.
Parameters
entries
object[]
Returns
void
renderSource
renderSource: (
source,opts) =>Layer|LayersList|null
Render a source
Parameters
source
MosaicT
opts
data?
DataT
signal?
Returns
Layer | LayersList | null
sources
sources:
MosaicT[]
List of mosaic sources to render.
The mosaic updates reactively when this prop is replaced with a new
array reference. Mutating the array in place will not trigger an
update — pass a fresh array (e.g. [...sources, newItem]) to add or
remove items.
Tile cache reuse depends on stable tile IDs. By default, each source's
tile ID is derived from its position in this array (see
MosaicSource.id), so:
- Appending items preserves all existing rendered tiles.
- Reordering or removing items from the middle of the array invalidates the cache slots of shifted items, causing them to re-fetch.
Supply an explicit id per source if you need cache stability across
arbitrary mutations of sources.
Type Parameters
MosaicT
MosaicT extends MosaicSource = MosaicSource
DataT
DataT = any