I've got something weird in my legend. It is showing "others" as a category when there is no such attribute in my field. I don't know where it comes from or how to get rid of it. The only values in my attribute field (OfficialQH) are 0 and 1, integers. The layer is symbolizing correctly and as I would expect, I just need to get "others" off my legend.
var qhRenderer = {
type: "unique-value",
field: "OfficialQH",
defaultSymbol: {type: "simple-fill"},
uniqueValueInfos: [{
value: 0,
symbol: {
type: "simple-fill",
color: [225, 225, 225],
outline: {
color: "black",
width: 1
}
},
label: "Not Quail Habitat"
},
{
value: 1,
symbol: {
type: "simple-fill",
color: "green",
outline: {
color: "black",
width: 1
}
},
label: "Quail Habitat"
}]
};
var featureLayer = new FeatureLayer({
url: "https://www.quailcount.org/nbcigis/rest/services/HbMonitoringTest/Patches/MapServer/0",
outFields: ["*"],
popupTemplate: popupBox,
renderer: qhRenderer
});
map.add(featureLayer);
var legend = new Legend({
view: view,
layerInfos: [{
layer: featureLayer,
title: "Quail Habitat Status"
}]
});