前几天为了在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);

浙公网安备 33010602011771号