The config block
The config block contains configuration options for a given visualization.
These are the fields that each config block can contain:
aggregation
Mandatory for H3 visualizations. How points are aggregated within each cell: "count", "sum", "mean", "min", or "max". "sum" and "mean" also require numericAttribute.
band
Optional. Used in raster numeric visualizations. The raster band that we’ll use to get the data from (1-indexed).
baseBinLevel
Used in H3 visualizations. The H3 cell resolution (0–15). Country-scale ≈ 3–4, city-scale ≈ 6–7.
binMode
Used in H3 visualizations. "fixed" (same cell size at all zooms), "low"/"medium"/"high" (zoom-adaptive), or "auto".
categoricalAttribute
Mandatory for vector categorical visualizations. The attribute that contains the categorical values that will be used. (Raster categorical layers classify raw pixel values instead and omit this field.)
categories
Mandatory for a categorical visualization. Either an explicit array of category values, or a shortcut: {"type": "top", "count": N} for the N most common values, {"type": "bottom", "count": N} for the N least common, or {"type": "all"} (raster) for every unique pixel value.
labelAttribute
Optional. Defines which dataset attribute or attributes to use for labeling. If multiple values are provided, the first available one will be used.
method
Optional. Used in multiband raster numeric visualizations. Maps a spectral index (NDVI/NDMI/NDWI) to its band assignments. See Raster visualizations.
noData
Optional. Used in raster visualizations. A value or array of values that won’t be shown (e.g. [-9999] for voids, [0] for no-data).
numericAttribute
Mandatory for a numeric visualization. The attribute that contains the numeric values used.
otherOrder
Optional. Used in categorical visualizations. It can be set to either “below” or “above” to make features that do not match any of the defined categories render below or above the other ones. The default position is “below”.
outOfRangeValues
Optional. Used in raster numeric visualizations. "color" clamps out-of-range pixels to the nearest class color; "hide" makes them transparent.
rasterResampling
Optional. Used in raster numeric (and tinted hillshade) visualizations — not valid for categorical rasters, which always resample nearest. "nearest" preserves exact pixel values; "linear" smoothly interpolates (use for continuous imagery/elevation). Set it explicitly rather than relying on a default.
showOther
Optional. Used in categorical visualizations. If set to true it shows all features that do not match any defined category and adds an extra entry as the last item in the legend.
steps
Mandatory for a numeric visualization. Either an explicit array of break points, or a classification shortcut such as {"type": "jenks", "count": 5} or {"type": "continuous"}.
Examples
config is always an object. The examples below show the config block in isolation.
Last updated
Was this helpful?