10楼#
发布于:2004-08-16 15:16
下面的代码可以参考一下。
The following example is a code excerpt that shows how to change the fine-grained ArcObjects (by adding a new group layer), and apply these changes to the MapServer object using RefreshServerObjects. It assumes that you are developing an ArcGIS Server application using a ServerContext, and already have a valid ServerContext, MapServer and MapDescription object. Dim pServerContext as IServerContext Dim pMapServer as IMapServer Dim pMapDesc as IMapDescription 'Access fine-grained ArcObjects Dim pMapServerObj As IMapServerObjects Set pMapServerObj = pMapServer Dim strMapName as string strMapName = pMapServer.DefaultMapName Dim pMap As IMap Set pMap = pMapServerObj.Map(strMapName) 'Add new group layer to map Dim pGroupLayer As IGrouplayer Set pGroupLayer = pServerContext.CreateObject("esriCarto.GroupLayer") pGroupLayer.Name = "New Group Layer" pMap.AddLayer pGroupLayer 'Apply changes to MapServer object pMapServerObj.RefreshServerObjects 'Get updated MapServerInfo and MapDescription Dim pMapServerInfo as IMapServerInfo Set pMapServerInfo = pMapServer.GetServerInfo(strMapName) Set pMapDesc = pMapServerInfo.DefaultMapDescription [此贴子已经被作者于2004-8-16 15:21:00编辑过]
|
|
|
11楼#
发布于:2004-08-14 20:22
<P>请大家支持一下。。。给顶下啊。。说点自己的看法也行啊。。。</P><P>我看了半天IGROUPLAYER接口就是不明白怎么做。。请大吓帮忙看看。该怎么用?</P><img src="images/post/smile/dvbbs/em02.gif" />
|
|
上一页
下一页