I would like to label features from a Multipoint FeatureLayer in ArcGIS JavaScript API 4x. Is this possible? I can't get it to work.
Here is what I've tried:
let url = [my multipoint service layer url]
var layer = new FeatureLayer({
url: url,
opacity: 0.9,
renderer: {
type: "simple", //autocasts
symbol: {
type: "simple-marker", //autocasts
size: 3,
color: "white",
},
},
title: "Site Labels",
labelingInfo : {
labelExpressionInfo: {expression: "$feature.[myfield]"},
symbol: {
type: "text",
color: "black",
haloSize: 1,
haloColor: "white"
}
},
});
var map = new Map({
basemap: "topo",
layers: [layer]
});Basically, the same way you would label a simple point layer. For a point layer this will work. No labels appear for a multipoint layer. Can't find anything online besides the statement: Currently a feature can only have one label. If a feature satisfies the where condition of multiple LabelClasses, then only the label corresponding to the first matching LabelClass is displayed.
Which might mean that with multipoint point layers we're out of luck?