ArcGIS Explorer 9.3 二次开发---开发程序2

4.与后台交互

explorer提供了webservice方式交互,在vs项目Web References下右键添加web引用,填入webservice路径;

try
{
                BusinessConnection.businessService bs = new BusinessConnection.businessService();//BusinessConnection是引用名
                string result = bs.getAreaName(id);//调用方法

                DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Area));//对于class Area的序列化对象
                MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(result));

                Area area = (Area)serializer.ReadObject(ms);//得到返回

}catch{

}

 

5.加载图标

            ESRI.ArcGISExplorer.Geometry.Point point = new ESRI.ArcGISExplorer.Geometry.Point(x,y);//图标坐标
            Graphic graphic = new Graphic(point);
            graphic.Symbol = Symbol.CreateMarker("c:\\xxx.png");//图标路径
            ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Graphics.Add(graphic);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值