ESRI.ArcGIS.ADF.Web.UI.WebControls.Map mapctrl = (ESRI.ArcGIS.ADF.Web.UI.WebControls.Map) args.Control;
       
        // Get MapFunctionality from the control...
        MapFunctionality mapfunc = (MapFunctionality) mapctrl.GetFunctionality(mapctrl.MapResourceManagerInstance.ResourceItems.Count - 1);
        MapResourceLocal mapres = (MapResourceLocal) mapfunc.MapResource;
        IServerContext sc = mapres.ServerContextInfo.ServerContext;
        IMapServer map = mapres.MapServer;

        IMapServerObjects mapobj = (IMapServerObjects) map;
        IMap fgmap = mapobj.get_Map(map.DefaultMapName);
        IFeatureLayer fl = (IFeatureLayer) fgmap.get_Layer(0);
        IFeatureClass fc = fl.FeatureClass;

posted on 2011-01-04 12:57  醉意人间  阅读(423)  评论(0编辑  收藏  举报