AnsweredAssumed Answered

Change label field for ArcGISDynamicMapServiceLayer

Question asked by GareySmiley on Aug 4, 2017
Latest reply on Aug 7, 2017 by rscheitlin

Trying to change the field used for a label in a lay with in a ArcGISDynamicMapServiceLayer layer. Here's what I tried.


var json = {
,"size": 8

// create instance of LabelClass
var labelClass = new LabelClass(json);

var layerDrawingOptions = [];
var layerDrawingOption = new esri.layers.LayerDrawingOptions();

var renderer = response.renderer;

layerDrawingOption.renderer = renderer;

layerDrawingOption.showLabels = true;
layerDrawingOption.labelingInfo = labelClass;

// Sets the opacity (transparency) of the layer.
// Values range from 0.0 to 1.0, where 0.0 is 100% transparent and 1.0 has no transparency.
layerDrawingOption.transparency = transparency;


layerDrawingOptions[1] = layerDrawingOption;


Any ideas would be appreciated.