闫磊关于鹰眼的制作
来源:互联网 发布:淘宝怎么选择菜鸟驿站 编辑:程序博客网 时间:2024/04/29 20:12
C#制作鹰眼全过程(带注释)
axMapControl1是主控件
要看清楚事件响应
2.绘制鹰眼矩形框
axMapControl1是主控件
要看清楚事件响应
1.鹰眼地图资源载入
private void axMapControl1_OnMapReplaced(object sender, IMapControlEvents2_OnMapReplacedEvent e) { //当主地图显示控件的地图更换时,鹰眼中的地图也跟随更换 axMapControl2.LoadMxFile(axMapControl1.DocumentFilename); axMapControl2.Extent = axMapControl2.FullExtent; }
2.绘制鹰眼矩形框
private void setMap2(IMapControlEvents2_OnExtentUpdatedEvent e) { // 得到新范围 IEnvelope pEnv = (IEnvelope)e.newEnvelope; IGraphicsContainer pGra = axMapControl2.Map as IGraphicsContainer; IActiveView pAv = pGra as IActiveView; //在绘制前,清除axMapControl2中的任何图形元素 pGra.DeleteAllElements(); IRectangleElement pRectangleEle = new RectangleElementClass(); IElement pEle = pRectangleEle as IElement; pEle.Geometry = pEnv; //设置鹰眼图中的红线框 IRgbColor pColor = new RgbColorClass(); pColor.Red = 255; pColor.Green = 0; pColor.Blue = 0; pColor.Transparency = 255; //产生一个线符号对象 ILineSymbol pOutline = new SimpleLineSymbolClass(); pOutline.Width = 2; pOutline.Color = pColor; //设置颜色属性 pColor = new RgbColorClass(); pColor.Red = 255; pColor.Green = 0; pColor.Blue = 0; pColor.Transparency = 0; //设置填充符号的属性 IFillSymbol pFillSymbol = new SimpleFillSymbolClass(); pFillSymbol.Color = pColor; pFillSymbol.Outline = pOutline; IFillShapeElement pFillShapeEle = pEle as IFillShapeElement; pFillShapeEle.Symbol = pFillSymbol; pGra.AddElement((IElement)pFillShapeEle, 0); pAv.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null); }private void axMapControl1_OnExtentUpdated(object sender, IMapControlEvents2_OnExtentUpdatedEvent e){setMap2(e);}3.互动
private void axMapControl2_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e) { //by yl 改进 landgis@126.co IRubberBand pBand = new RubberEnvelopeClass(); IGeometry pGeometry = pBand.TrackNew(axMapControl2.ActiveView.ScreenDisplay, null); if (pGeometry.IsEmpty) { IPoint pPt = new PointClass(); pPt.PutCoords(e.mapX, e.mapY); //改变主控件的视图范围 axMapControl1.CenterAt(pPt); } else { axMapControl1.Extent = pGeometry.Envelope; axMapControl1.ActiveView.Refresh(); } }
- 闫磊关于鹰眼的制作
- 关于鹰眼的制作
- 关于鹰眼的相关问题
- ArcGIS制作鹰眼
- 鹰眼图的实现
- 1.鹰眼的实现
- 百度鹰眼的感受
- ArcGIS Engine 系统开发设计(二):打开地图文档、鹰眼图的制作
- 鹰眼
- 鹰眼
- C#制作鹰眼全过程(带注释)
- C#制作Arcgis Engine鹰眼全过程
- ArcEngine9.3的鹰眼实现
- mapxtreme 鹰眼图的开发
- 百度鹰眼addPoint()的使用
- 关于字体库的制作
- C#,arcengine制作鹰眼全过程(带注释)
- C#制作Arcgis Engine鹰眼全过程(引自ESRI中国社区)
- 网络文件系统
- 2013 硬件笔试题目 有些题目 高手看见了就写写答案咯 大家共同学习嘛!!!
- 设计模式-Observe
- Android mkdir(filepath,mode)
- RCP,SWT与Eclipse插件开发点滴
- 闫磊关于鹰眼的制作
- ABAP CALL FUNCTION 'DATE_GET_MONTH_LASTDAY' 取每月最后一天 'DATE_GET_WEEK'取周
- 一、MyBatis简介与配置MyBatis+Spring+MySql
- 如何在word和wps中添加分割线
- 数据挖掘的标准流程
- 使用ArcGIS Online小贴士-Excel CSV TXT文件的使用
- errno详解
- 不可思议的网络错误(当网络被病毒攻击)
- 重定向与请求转发