I wonder if it is possible to use the labels renderers defined in a .mxd published as a Map Service (Feature Access enabled) for a FeatureLayer with the javascript API v4.3 just like it works with the geometry renderer?
I define a featureLayer like this:
var organismesLayer = new FeatureLayer({
url: "https://infogeo.education.gouv.qc.ca/arcgis/rest/services/SandBox_Maxime/GDUNO/MapServer/1",
labelsVisible: true
});
In the map, I see the layer style is the same than in the .mxd, but the labels are not visible. Do I have to define the LabelClass manually in the javascript code?
Is there a way to get the label renderers from the Map Service?
Solved! Go to Solution.
Maxime.
Have you seen this limitation?
Known Limitations
There is no support for labeling in 2D. Labeling is only supported in 3D
Maxime,
Have you seen this sample?
MapImageLayer - label sublayer features | ArcGIS API for JavaScript 4.3
Hi Robert,
You example is using a MapImageLayer, but I am asking about a FeatureLayer. And I see in the example that they creating the LabelClass used as label renderers instead of getting it from the service.
Maxime.
Have you seen this limitation?
Known Limitations
There is no support for labeling in 2D. Labeling is only supported in 3D
Oh! That's right. I think I'll go back to v.3.20 then
Thank you very much !