主要使用了AE中的IAGSServerOject接口及IMapServer接口。
Private void GetServerTest_Click(object sender, EventArgs e)
        {
         //获得服务对象名称

IAGSServerObjectName pServerObjectName =GetMapServer("http://services.arcgisonline.com/ArcGIS/services", "ESRI_Imagery_World_2D", false);
            IName pName = (IName)pServerObjectName;
       //访问地图服务
            IAGSServerObject pServerObject = (IAGSServerObject)pName.Open();
            IMapServer pMapServer = (IMapServer)pServerObject;
          
            ESRI.ArcGIS.Carto.IMapServerLayer pMapServerLayer = new ESRI.ArcGIS.Carto.MapServerLayerClass();
            //连接地图服务

pMapServerLayer.ServerConnect(pServerObjectName, pMapServer.DefaultMapName);
            //添加数据图层

axMapControl1.AddLayer(pMapServerLayer as ILayer);

axMapControl1.Refresh();
        }

public IAGSServerObjectName GetMapServer(string pHostOrUrl, string pServiceName, bool pIsLAN)
        {

//设置连接属性
            IPropertySet pPropertySet = new PropertySetClass();
            if (pIsLAN)
                pPropertySet.SetProperty("machine", pHostOrUrl);
            else
                pPropertySet.SetProperty("url", pHostOrUrl);

//打开连接

IAGSServerConnectionFactory pFactory = new AGSServerConnectionFactory();
            //Type factoryType = Type.GetTypeFromProgID(
            //    "esriGISClient.AGSServerConnectionFactory");
            //IAGSServerConnectionFactory agsFactory = (IAGSServerConnectionFactory)
            //    Activator.CreateInstance(factoryType);
            IAGSServerConnection pConnection = pFactory.Open(pPropertySet, 0);

//Get the image server.
            IAGSEnumServerObjectName pServerObjectNames = pConnection.ServerObjectNames;
            pServerObjectNames.Reset();
            IAGSServerObjectName ServerObjectName = pServerObjectNames.Next();
            while (ServerObjectName != null)
            {
                if ((ServerObjectName.Name.ToLower() == pServiceName.ToLower()) &&
                    (ServerObjectName.Type == "MapServer") )
                {
                    
                    break;
                }
                ServerObjectName = pServerObjectNames.Next();
            }

//返回对象
            return ServerObjectName;
        }
VS2008+AE9.3下编译通过

http://blog.sina.com.cn/s/blog_5d25ac4e0100yncl.html

C#中winform下利用ArcEngine调用ArcGIS Server发布的服务 AE9.3的更多相关文章

  1. C#中winform下利用ArcEngine调用ArcGIS Server发布的服务 AE 10

    开发环境:vs2010 + AE 10 测试 public Form1() { ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engi ...

  2. OpenLayers调用arcgis server发布的地图服务

    有两种方式可以调用arcgis server发布的地图服务,一种是rest,一种是wms.  地图的投影为900913,arcgis server为10.0版本,地图服务的空间参考为3857.   与 ...

  3. OpenLayers调用ArcGIS Server发布的WFS服务

    OpenLayers调用ArcGIS Server发布的WFS服务 原创: 蔡建良 2013-08-20 一. 开发环境 1) Openlayers2.13+arcgis server9.3 2) W ...

  4. ArcGis server发布地图服务

    ArcGIS server发布服务: 首先修改地图文档属性中的关联默认数据库 最后使用分享将地图服务发布到server上,是地图服务可以使用: 注意一定要勾选 Feature Access选项 fea ...

  5. 移动端调用ArcGIS Server 10.1服务

    1.最好用mdb数据源,不要用shp文件作为数据源,一是属性字段长度超过5个字符会被截断,二是中文会变成乱码. 2.mxd的layer的坐标系要是WGS1984(4362),不然属性查询不出来.

  6. Arcgis api for javascript学习笔记 - 不改变默认端口(6080)情况下,外网访问Arcgis Server 发布的接口

    Arcgis Server发布的地图服务地址默认端口号是6080,假设本机上只对80端口做了外网映射,在IIS中部署了一个网站绑定了80端口,那么网站中某个页面通过arcgis api for js ...

  7. ArcGIS API for JavaScript(2)-ArcGIS Server发布要素图层服务

    1.前言 上一篇该系列的文章我们主要讲了一下基础Web地图搭建,这篇我们主要讲一下ArcGIS Server发布服务,并且如何调用服务.将自己的数据加载到Web地图当中来,实现Web端浏览数据. 2. ...

  8. windows 7 下安装 IIS 和 ArcGis Server 9.3 遇到的问题及解决方法

    windows 7 下安装 IIS 和 ArcGis Server 9.3 遇到的问题及解决方法 分类: ArcGIS server 计算机2012-07-31 14:17 631人阅读 评论(0)  ...

  9. arcgis engine 调用arcgis server服务

    首先需要添加两个引用: using ESRI.ArcGIS.GISClient;using ESRI.ArcGIS.DataSourcesRaster; /// <summary> /// ...

随机推荐

  1. 383-基于kintex UltraScale XCKU040的双路QSFP+光纤PCIe 卡

    一.板卡概述 本板卡系我司自主研发,基于Xilinx UltraScale Kintex系列FPGA  XCKU040-FFVA1156-2-I架构,支持PCIE Gen3 x8模式的高速信号处理板卡 ...

  2. 实现MD5算法

    using System; using System.Text; using System.Security.Cryptography; namespace Common { /// <summ ...

  3. LeNet-5模型的keras实现

    import keras from keras.models import Sequential from keras.layers import Input,Dense,Activation,Con ...

  4. 18Bootstrap

    1 概念 一个前端开发的框架,Bootstrap,来自 Twitter,是目前很受欢迎的前端框架.Bootstrap 是基于 HTML.CSS.JavaScript 的,它简洁灵活,使得 Web 开发 ...

  5. Spring Boot JPA - Querydsl

    https://lufficc.com/blog/spring-boot-jpa-querydsl

  6. Python修炼之路-数据类型

    Python编程之列表 列表是一个使用一对中括号"[   ]" 括起来的有序的集合,可以通过索引访问列表元素,也可以增加和删除元素. 列表的索引:第一个元素索引为0,最后一个元素索 ...

  7. CentOS源码编译安装MySQL 5.5.15

    CentOS源码编译安装MySQL 5.5.15   文章目录 [隐藏] 安装编译工具 下载源码 安装cmake和bison 编译安装MySQL 一些相关设置 安装编译工具 yum install g ...

  8. day_05 运算符 if和while的使用

    运算符: 1)算术运算符 + - * / %(取余) //(地板除,取整)**(幂运算) ,返回一个值 2)比较运算符 3) > >= < <= ==(比较值是否相等) !=( ...

  9. 《Spring源码深度解析》一

    Spring整体架构 1.1 Spring整体架构 1.1.1 Core Container: 模块:Core.Beans.Context和Expression Language Core:框架的基础 ...

  10. 实战build-react(一)

    https://www.jianshu.com/p/34468f13263c(copy)  目录结构 一.安装 npm install -g create-react-app 二.创建react应用 ...