欢迎来到天天文库
浏览记录
ID:9279621
大小:57.00 KB
页数:15页
时间:2018-04-26
《arcengine 鹰眼的实现》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、ArcEngine鹰眼的实现usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingESRI.ArcGIS.Carto;usingESRI.ArcGIS.Controls;usingESRI.ArcGIS.Geometry;usingESRI.ArcGIS.Display;namespaceArcEngineCommon.Controls{publicclassMapMapControlEagle{//记录层的内容以及次序(使用字典)privateSystem.Collections.Generic.Diction
2、ary_layerLog;//地图的主显示控件privateAxMapControl_mapControlMain;//地图的鹰眼显示控件privateAxMapControl_mapControlEagle;//Activeview操作对象privateActiveView_activeView;//渲染的样式privateIFillSymbol_fillSymbol;//记录移动的个数,为移动过程中显示红框用。privateint_moveCount=0;//标识是否在拖动privatebool_isTrackingSmallViewer=false;//红色的
3、框范围privateIEnvelope_envelope;//鹰眼小地图的红框privateIMoveEnvelopeFeedback_smallViewerEnvelope;//拖动时鼠标落点privateIPoint_smallViewerMouseDownPt;//////鹰眼显示程序//////主地图显示控件///鹰眼地图显示控件publicMapMapControlEagle(AxMapCont
4、rolpMapControlMain,AxMapControlpMapControlEagle){this._mapControlMain=pMapControlMain;this._mapControlEagle=pMapControlEagle;this._layerLog=newDictionary();this._activeView=newActiveView(this._mapControlEagle.ActiveView);//注册地图主控件视图范围更新事件this._mapControlMain.OnExtentUpdated+=newIMapCon
5、trolEvents2_Ax_OnExtentUpdatedEventHandler(this.axMapControlMian_OnExtentUpdated);//注册地图主控件视图数据更新事件this._mapControlMain.OnAfterScreenDraw+=newIMapControlEvents2_Ax_OnAfterScreenDrawEventHandler(this.axMapControl_OnAfterScreenDraw);//注册鹰眼地图控件的点击居中this._mapControlEagle.OnMouseDown+=newIMapControlEve
6、nts2_Ax_OnMouseDownEventHandler(this.axMapControl2_OnMouseDown);this._mapControlEagle.OnMouseMove+=newIMapControlEvents2_Ax_OnMouseMoveEventHandler(this.axMapControl2_OnMouseMove);this._mapControlEagle.OnMouseUp+=newIMapControlEvents2_Ax_OnMouseUpEventHandler(this.axMapControl2_OnMouseUp);}//当地图主控
7、件视图范围刷新时触发privatevoidaxMapControlMian_OnExtentUpdated(objectsender,ESRI.ArcGIS.Controls.IMapControlEvents2_OnExtentUpdatedEvente){//得到地图主控件新的显示范围IEnvelopemyEnvelope=e.newEnvelopeasIEnvelope;//清除鹰眼地图显示控件上面的所有的元素th
此文档下载收益归作者所有