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]
});
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.
ESRI Canada got back to me. They've logged a bug (BUG-000137586 Labels for Multipoints Fail to Render in Javascript API 4.18) for this. Just in case anyone else comes across same issue.
It looks like it’s in product plan now… hope it comes soon and will fix this one as well: https://support.esri.com/en-us/bug/labels-on-multipoint-layers-do-not-display-in-the-new-m-bug-00013...
Thanks for getting this issue logged. We currently do not support Multipoint geometries by design, but this issue will help drive the enhancement request.
Any idea when this will be fixed? As this also affects the new Map Viewer in AGOL, my layer doesn't get labelled... Thx!
Any idea when this will be fixed? ESRI JS API 4.24 still not working.
message: "Unable to create labels for Feature Layer, esriGeometryMultipoint is not supported"
name: "mapview-labeling:unsupported-geometry-type"
Hi @Noah-Sager ,
some of the related issues logged are "not addressed", "known limit"... Could you give some priority to this issue? It is rather important for us, as converting multipoints to single points is not an option (we have a related table to the feature and this would disturb the data integrity...)
And one "in product plan" since more than 3 years... https://support.esri.com/en-us/bug/multipoint-labels-fail-to-render-in-an-arcgis-api-for-j-bug-00013...
And one "under consideration" since more than 3 years... https://support.esri.com/en-us/bug/there-are-problems-with-adding-or-submitting-multipoint-bug-00014...
Thanks
Is there somewhere that this lack of support for Multipoint in the ArcGIS JavaScript API is stated? If that is indeed the case I think you should clarify in the documentation. There is a Multipoint geometry class and certainly no mention any support limitations for labelling or otherwise there. The closest I've seen is a Technical Article for ArcGIS Online that refers to lack of support for Multipoint in the context of editing.
I would have thought this would have been fixed by now (12/3/2021) since we just had a new release of AGOL. I will also submit a bug from our organization.
Oh my giggles. I can't believe this, but yet I can. This is a huge issue for my organization. Support all your geometries ESRI!