happycatherin  
前几天为了在9.2中动态添加一个图层,看了N多的资料,后来发现在HELP中有一个很好的sample,如果大家是初次开发的话,我觉得很有必要先阅读一下,help,在.net 9.2中web控件和9.0的不太一样,如果大家只是看了explore arcgis server会发现一点头绪也没有,在9.2中如何来获得一个.context
下列方法通过控件mapResourceManger来获得Imap,和serverContext

   ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal gisresource = (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal)MapResourceManager1.GetResource(0);
        IServerContext mapContext = gisresource.ServerContextInfo.ServerContext;
        IMapServerObjects mso = (IMapServerObjects)gisresource.MapServer;
        IMap map = mso.get_Map(gisresource.DataFrame);
posted on 2007-09-01 20:40  catherin  阅读(347)  评论(0)    收藏  举报