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?


With version 4.3 there is not yet support for labeling in 2D. Labeling is only supported in 3D SceneViews so far.

See the "Known Limitations" in https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelsVisible

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.