Innovate the future

Find the passion of life...
  首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

ArcGIS Server开发——控制图层是否可见

Posted on 2005-05-11 09:08  BPM  阅读(2329)  评论(4)    收藏  举报

   当需要控制图层的可见性时,可以使用
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;
}