在要素图层上点选要素的快速方法
2012-08-09 11:30
204 查看
在要素图层上点选要素的快速方法
IFeatureLayer , IFeature ,
IFeatureLayer , IFeature ,
IIdentify2 , IRowIdentifyObject
//鼠标按下 事件 public override void OnMouseDown(int button, int shift, int x, int y) { IPoint point; this.feat_dk = null; point = this.HookHelper.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(x, y); if (featureLayer != null) { IFeature feature1 = null; ESRI.ArcGIS.esriSystem.IArray arr = (this.featureLayer as IIdentify2).Identify(point as IGeometry,null); if (arr != null && arr.Count > 0) { object fiobj = arr.get_Element(0); if (fiobj is IRowIdentifyObject) { feature1 = (fiobj as IRowIdentifyObject).Row as IFeature; } } if (feature1 != null) { ZhFeature zhfeat = new ZHFeaturePolygon(feature1); this.feat_dk=feature1; IFeatureSelection selection1 = this.featureLayer as IFeatureSelection; selection1.Clear(); selection1.Add(feature1); IEnvelope env = this.HookHelper.ActiveView.Extent; this.HookHelper.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, this.featureLayer, env); this.selDelegate(); //调用代理方法(执行回调) } } //end if }
相关文章推荐
- AE控制图层中要素可见状态的几种方法
- AE控制图层中要素可见状态的几种方法
- 在AE中取得所有图层以及没某个图层选择要素的方法
- Photoshop快速复制图层的几种方法和技巧
- TerraExplorer 6.6 for JavaScript 通过图层获取地理要素,获取图层属性信息,矢量标注等通用方法
- AE控制图层中要素可见状态的几种方法
- [转载]AE控制图层中要素可见状态的几种方法
- AE控制图层中要素可见状态的几种方法
- IFeatureLayerDefinition接口查询要素图层方法汇总
- 常用JS调试工具使用方法,帮你快速定位问题
- linux 快速登录方法u盘系统制作—livecd制作iso
- 快速增加微信好友的十大方法
- 快速掌握 Android Studio 中 Gradle 的使用方法
- 高维向量快速检索方法Locality Sensitive Hashing之二算法改进
- Taro集成Redux快速上手的方法示例
- [置顶] eclipse无法启动及快速恢复的解决方法
- GDAL/OGR创建DXF文件中多图层的方法
- string和byte 数组转换的快速方法(采用unsafe)
- Zen Coding: 一种快速编写HTML/CSS代码的方法