Skip to content

This sample shows how to add an instance of WCSLayer to a map. The WCSLayer contains data from LANDFIRE about fires in the contiguous United States (CONUS).

The RasterStretchRenderer is applied to the layer to change the data visualization.

// Create raster-stretch renderer using three standard deviations and multipart color ramps.
const renderer = {
type: "raster-stretch",
stretchType: "standard-deviation",
customStatistics: [{ min: -3, max: 37, avg: 1, stddev: 1 }],
numberOfStandardDeviations: 3,
colorRamp: {
type: "multipart",
colorRamps: [
{ fromColor: [0, 0, 255], toColor: [0, 255, 255] },
{ fromColor: [0, 255, 255], toColor: [255, 255, 0] },
{ fromColor: [255, 255, 0], toColor: [255, 0, 0] },
],
},
};