I am trying to add a label to a featureLayer using LabelClass. The field I wish to display as a label called mun_name is of type "short" and is linked to a domain. The documentation states that setting useCodedValues to True will make the API use the domain names for labelling instead of the actual numbers (codes) stored in the field, but it still showing numbers on the map.
This is the code:
const mun = new FeatureLayer({
url: `${API_URL}/rest/services/public/All/MapServer/0`,
outFields: ["*"],
labelingInfo: {
labelExpressionInfo: {
expression: "$feature.mun_name",
},
symbol: {
type: "text",
symbolLayers: [
{
type: "text",
material: { color: "black" },
halo: {
color: "yellow",
size: 0.4,
},
size: 14,
},
],
},
useCodedValues: true,
}
})
Ps: The domain values work nicely when displaying that field in the layer's popup. The problem appears only when trying to use that field as a label using LabelClass. I also tried setting useCodedValues to both True, False and removing it.