惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
C
Check Point Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
博客园 - 司徒正美
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
V
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
罗磊的独立博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
O
OpenAI News
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
I
InfoQ
D
Docker
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
博客园 - Franky
B
Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
D
DataBreaches.Net

博客园 - 漫步人生

c# 使用GetOleDbSchemaTable获取access数据库结构 xp上vs2010+IE8无法调试脚本 iis 上部署asp.net程序出错排查 windows2008的共享 使用sqlite绿色部署问题 在vs中使用正则表达式 - 漫步人生 事件不应该有返回值 ae的com对象在dotnet中的释放问题 adf for dotnet中servercontext的释放 修改Windows中ASPNET账户的密码 arcgis 编辑时独占mdb - 漫步人生 adf for dotnet中动态给ArcGis Server服务添加图层 js中在不知道属性名时获取属性对象 html文档中的name属性 ie中js a光标位置 adf中UpdatePanel刷新地图 windows局域网内以arcgis server local的方式连接arcserver服务器 c#与 如何调试 C#与C/C++的互操作
ae显示arcserver的地图服务
漫步人生 · 2011-09-16 · via 博客园 - 漫步人生

acmap可以直接显示arcserver上的地图服务,那ae也应该是可以的。

方法就是创建一个IAGSServerConnection,该接口的ServerObjectNames能获取serverobject的名称,其中就包括Service的名称。可以将IName转换为IMapServer对象,最后创建一个IMapServerLayer来显示。

            IAGSServerConnectionFactory connFac = new AGSServerConnectionFactoryClass();
            IPropertySet propertySet = new PropertySetClass();
            propertySet.SetProperty("machine", serverName);
            //propertySet.SetProperty("url", serverName);
            IAGSServerConnection conn = connFac.Open(propertySet, 0);
            IAGSEnumServerObjectName names = conn.ServerObjectNames;
            IAGSServerObjectName serviceObjName = null;
            IAGSServerObjectName temObjName = null;
            names.Reset();
            while ((temObjName = names.Next()) != null)
            {
                if (temObjName.Name == serviceName)
                { serviceObjName = temObjName; break; }
            }
            IMapServer mapServer = ((IName)serviceObjName).Open() as IMapServer;
            IMapServerLayer layer = new MapServerLayerClass();
            layer.ServerConnect(serviceObjName, mapServer.DefaultMapName);