AnsweredAssumed Answered

Labels work in WAB DE but not in deployed site

Question asked by kenbuja Champion on Nov 7, 2017
Latest reply on Nov 8, 2017 by gkatsamb

I want to show labels for a Feature Layer (this._layerSPGrid) that I've added to the map. I use this code to add them

 

    var label = new TextSymbol();
    label.color.setColor(new Color('black'));
    label.font.setSize('8pt');
    label.font.setFamily("arial");
    var json = {
      labelExpressionInfo: { value: '{' + this._fieldPriority + '}' }
    }
    var labelClass = new LabelClass(json);
    labelClass.symbol = label;
    this._layerSPGrid.setLabelingInfo([labelClass]);

This works in the app running in Developer Edition. However, when I deploy the app to my server, the labels don't show up. I've stepped through the debugger and it hits all the lines without throwing any errors.

 

Any ideas why the labels don't show on the server?

Outcomes