AnsweredAssumed Answered

ArcGISDynamicMapServiceLayer

Question asked by sbloxham1028@hotmail.com on May 13, 2016

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);

}

Outcomes