Having an issue with my ArcGIS map where only the default symbol is rendering when I add a ClassBreaksRenderer
to my GeoJSONLayer
.
// Color Logic
const low = {
type: "simple-fill",
color: "#fc8d59",
style: "solid",
outline: {
width: 0.2,
color: [255, 255, 255, 0.5],
},
};
const medium = {
type: "simple-fill",
color: "#99d594",
style: "solid",
outline: {
width: 0.2,
color: [255, 255, 255, 0.5],
},
};
const high = {
type: "simple-fill",
color: "#0d2644",
style: "solid",
outline: {
width: 0.2,
color: [255, 255, 255, 0.5],
},
};
let renderer = new ClassBreaksRenderer({
field: "sum_aqi_mean",
defaultSymbol: {
type: "simple-fill",
color: "black",
style: "backward-diagonal",
outline: {
width: 0.5,
color: [50, 50, 50, 0.6],
},
},
classBreakInfos: [
{
minValue: 0,
maxValue: 1,
symbol: low,
label: "Low",
},
{
minValue: 1,
maxValue: 2,
symbol: medium,
label: "Medium",
},
{
minValue: 2,
maxValue: 3,
symbol: high,
label: "High",
},
],
});
const blob = new Blob([JSON.stringify(layers)], {
type: "application/json",
});
const url = URL.createObjectURL(blob);
const geo = new GeoJSONLayer({
url: url,
renderer: renderer,
popupTemplate: template,
});
Encountering an issue where my map only displays the default symbol as shown in this screenshot Map only renders default symbol. The value displayed in the popup is based on the polygon's sum_aqi_mean
value.
Can someone help me troubleshoot this problem?