Hi,
I am trying to control the layer visibility of a map service in code behind. I thought this would be simple, but I am having a hard time getting this done. I can get a hold of the service from my Map Control, called map, using map.Layers[0] for example. This contains an array of LayerInfo. If I loop on this array, for any of the LayerInfo, there is no settable visibility property. The LayerInfo only has a DefaultVisibility property which is a boolean indicating the layer's default visibility. I also tried looking in the MapLegend control without success. Is there an easy way to do this that I have not found yet?
Thanks,
Paul