Select to view content in your preferred language

ArcGISDynamicMapServiceLayer

1665
0
05-13-2016 01:48 PM
StevenBloxham
Deactivated User

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