Hello, I have COGs with integer values, and I'd like to be able to assign colors to value ranges, e.g.: 0-200 - blue, 200-400 - green, etc., but the only renderer that seems to work is the automatically assigned stretch-renderer. I've tried uniqueValueRenderer, which the API reference suggests is my only option without statistics files, but the entire raster shows up as black. Could I possibly get a working example or something? Thanks.
The way I tried it (supposed to make entire raster cyan, but it shows up as black):
Spoilerconst uvr = new UniqueValueRenderer({
field: "Raster.ServicePixelValue",
uniqueValueInfos: []
});
for(let i = 0; i < max; i++){
const uniqueValue = new UniqueValueInfo({
value:i,
symbol: {
type: "simple-fill",
color: "#00ffff"
}
})
uvr.uniqueValueInfos.push(uniqueValue);
};
const layer = new ImageryTileLayer({
bandIds: [1],
interpolation: "nearest",
renderer: uvr
});