ArcGISDynamicMapServiceLayer

1611
0
05-13-2016 01:48 PM
StevenBloxham
New Contributor

In a ArcGISDynamicMapServiceLayer layer there is way to hide labels but it doesn't seem to be working correctly.  I set the LayerDrawingOptions.ShowLabels to false and it still shows the labels on the map. 

Code:

ArcGISDynamicMapServiceLayer layer = Map.layers[0];

DynamicLayerInfoCollection layerInfos = layer.CreateDynamicInfosFromlayerInfos();

layer.DrawingOptions = new LayerDrawingOptionsCollections();  //why is this null to start with?

foreach(DynamicLayerInfo layerInfo in layerInfos)

{

     LayerDrawingOptions options = new LayerDrawingOptions();

     option.LayerID = layerInfo.ID;

     option.ShowLabels = false;

     layer.LayerDrawingOptions.add(option);

}

0 Kudos
0 Replies