ae开发之地图操作

ae开发之地图操作

ID:1195894

大小:35.00 KB

页数:6页

时间:2017-11-08

ae开发之地图操作_第1页
ae开发之地图操作_第2页
ae开发之地图操作_第3页
ae开发之地图操作_第4页
ae开发之地图操作_第5页
资源描述:

《ae开发之地图操作》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库

1、usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingESRI.ArcGIS.Carto;usingESRI.ArcGIS.Geometry;usingESRI.ArcGIS.Display;usingESRI.ArcGIS.Controls;namespaceGISExercise{classOperateGeomap{//定义鼠标与控件交互式操作的公共方法publicvoidOperateGeomaP1(AxMapControlaxMapControl1,IMapControl

2、Events2_OnMouseDownEvente,stringstrOperType1){switch(strOperType1){//用鼠标拖曳确定地图显示范围case"LKXS":{axMapControl1.MousePointer=esriControlsMousePointer.esriPointerCrosshair;//改变鼠标样式axMapControl1.Extent=axMapControl1.TrackRectangle();//将地图控件显示范围设置为当前拖曳的矩形区域axMapControl1.ActiveView.PartialRefresh(esriViewD

3、rawPhase.esriViewGeography,null,null);//刷新地图break;}//移动地图、地图漫游case"DTMY":{axMapControl1.Pan();break;}//绘制点case"HZD":{IMappMap;IActiveViewpActiveView;pMap=axMapControl1.Map;pActiveView=pMapasIActiveView;//新建点对象IPointpPt;pPt=newPointClass();pPt.PutCoords(e.mapX,e.mapY);//产生一个Market元素IMarkerElementpMa

4、rkerElement;pMarkerElement=newMarkerElementClass();//产生修饰Marker元素的SymbolISimpleMarkerSymbolpMarkerSymbol;pMarkerSymbol=newSimpleMarkerSymbolClass();//设置符号颜色IRgbColorpColor;pColor=newRgbColorClass();pColor.Red=150;pColor.Blue=200;pColor.Green=250;pMarkerSymbol.Color=pColor;//用户动态设定//设置符号大小pMarkerSym

5、bol.Size=10;//设置符号类型pMarkerSymbol.Style=esriSimpleMarkerStyle.esriSMSDiamond;//点符号也由用户动态选择IElementpElement;pElement=pMarkerElementasIElement;//得到Element的接口对象,用于设置元素的GeometrypElement.Geometry=pPt;pMarkerElement.Symbol=pMarkerSymbol;IGraphicsContainerpGraphicsContainer;pGraphicsContainer=pMapasIGraph

6、icsContainer;//将元素添加到Map中pGraphicsContainer.AddElement(pMarkerElementasIElement,0);pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics,null,null);break;}//绘制线case"HZX":{IMappMap;IActiveViewpActiveView;pMap=axMapControl1.Map;pActiveView=pMapasIActiveView;IPolylinepPolyline;pPolyline=axMapC

7、ontrol1.TrackLine()asIPolyline;//产生一个SimpleLineSymbol符号ISimpleLineSymbolpSimpleLineSym;pSimpleLineSym=newSimpleLineSymbolClass();pSimpleLineSym.Style=esriSimpleLineStyle.esriSLSSolid;//需要用户动态选择IRgbColorpCol

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。