Data Properties
Data properties common for all layers.
image
imageType: TextureData, required
Data type can be either Uint8 (Uint8Array, Uint8ClampedArray) or Float32 (Float32Array).
Data length must be width * height * bandsCount.
Supported bands count is 1, 2 or 4. See imageType and Data Sources.
For multi-band data, the expected format is that the band values are interleaved by pixel. For example, for vector data with u, v values, the expected format is [u1, v1, u2, v2, ...]. This is also known as BIP format.
This is the format expected by the library, after decoding the image from the original file format. Decode the original file format either with loadTextureData or yourself.

image2
image2Type: TextureData, optional
The subsequent data image. Used if imageWeight > 0.
See image for details.
imageSmoothing
imageSmoothingType: number, optional
Default: 0 (no smoothing)
Smoothing applied to the data. Increasing the smoothing is useful in case of rendering artifacts with low resolution data or if high detail is undesired. Maximal smoothing is unlimited.
imageInterpolation
imageInterpolationType: ImageInterpolation, values: NEAREST, LINEAR, CUBIC, optional
Default: CUBIC
NEAREST disables any interpolation, renders the data for a particular lng/lat location from the nearest available pixel. Raster layer is pixelizated.
LINEAR interpolates the data for a particular lng/lat location from four pixels using a linear interpolation. Provides a balance between smoothness and performance.
CUBIC interpolates the data for a particular lng/lat location from sixteen pixels using a cubic interpolation. Provides the best smoothness. Required for Contour layer with byte data format.
imageWeight
imageWeightType: number 0-1, optional
Default: 0
Interpolation weight between image and image2.
imageType
imageTypeType: ImageType, values: SCALAR, VECTOR, optional
Default: SCALAR (for layers that support both scalar and vector data), VECTOR (for layers that support vector data only)
Image type, scalar or vector.
imageUnscale
imageUnscaleType: ImageUnscale, optional
Default: null (no unscaling)
Original data value bounds, used to unscale the data if the original data are scaled (quantized).
Supported if the data type is Uint8.
imageMinValue
imageMinValueType: number, optional
Default: null (no limit)
Minimal value limit to render the data.
The value must be in the same units as the data image.
imageMaxValue
imageMaxValueType: number, optional
Default: null (no limit)
Maximal value limit to render the data.
The value must be in the same units as the data image.
bounds
boundsType: bounding box of minX, minY, maxX, maxY [number, number, number, number], required
Original data bounding box.
Recommended value is [-180, -90, 180, 90] for a global image.
minZoom
minZoomType: number 0-20, optional
Default: null (no limit)
Minimal zoom limit to render the layer.
maxZoom
maxZoomType: number 0-20, optional
Default: 10 (ContourLayer), 15 (ParticleLayer), null (other layers, no limit)
Maximal zoom limit to render the layer.
It's possible to override a lower default value to a higher value, but rendering artifacts may occur in high zoom levels due to a low precision.
Last updated