当需要控制图层的可见性时,可以使用
IMapDescription mapdescription = webMap.MapDescription;
webMap.ManageLifetime(mapdescription);
ILayerDescriptions layerdec = mapdescription.LayerDescriptions;
for(int i=0;i < mapdescription.LayerDescriptions.Count; i++)
{
ILayerDescription onelayerdesc = layerdec.get_Element(i);
onelayerdesc.Visible = true;
}