摘要: View Code <?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" 阅读全文
posted @ 2011-05-17 21:50 师士 阅读(951) 评论(0) 推荐(0) 编辑
摘要: QueryTask<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" x 阅读全文
posted @ 2011-05-16 20:38 师士 阅读(580) 评论(0) 推荐(0) 编辑
摘要: CODE<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns: 阅读全文
posted @ 2011-05-06 19:10 师士 阅读(473) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:esri 阅读全文
posted @ 2011-05-06 10:12 师士 阅读(1210) 评论(0) 推荐(0) 编辑
摘要: 在主窗口的代码:View Code private void axTOCControl1_OnMouseDown(object sender, ESRI.ArcGIS.Controls.ITOCControlEvents_OnMouseDownEvent e) { if (e.button == 2) { esriTOCControlItem Item = new esriTOCControlItem(); IBasicMap pMap = new MapClass(); ILayer pLayer = new FeatureLayerClass(); object pOther = new 阅读全文
posted @ 2011-04-03 12:44 师士 阅读(2775) 评论(0) 推荐(2) 编辑
摘要: 主要实现点击查询并闪烁显示,并把查询要素的信息通过DataGridView显示出来,主要用到的接口:IIdentity、IArray、IIdentifyObj、IFeatureObj、IRowIdentifyObject、IFeature代码:Identify IGroupLayer pGroupLayer = new GroupLayerClass(); for (int i = 0; i < axMapControl1.Map.LayerCount; i++) { pGroupLayer.Add(axMapControl1.Map.get_Layer(i)); } IIdentify 阅读全文
posted @ 2011-04-01 16:52 师士 阅读(1925) 评论(0) 推荐(0) 编辑
摘要: 地图查询主要有两种查询:空间查询和属性查询所用到知识点:1 Cursor(游标)对象 本质上是一个指向数据的指针,本身不包含数据内容,提供一个连接到ROW对象或者要素对象(Feature)的桥梁而已。 游标有三种类型,即查询游标、插入游标和更新游标。每一种游标都是通过与之相适应的方法来获得的,如Search、Insert和Update方法。更新和插入游标都需要使用一个过滤器(Filter)对象,因为它们首先必须获得需要进行操作的要素。 FeatureCursor是Cursor的一个子类,指向一个或多个要素,它实现了IFeatureCursor接口,ArcGIS Engine开发所对矢量图层实现 阅读全文
posted @ 2011-03-31 23:40 师士 阅读(2598) 评论(0) 推荐(3) 编辑
摘要: 主要步骤:1鹰眼和主视图的地图同步 2 响应主视图范围发生变化时,在鹰眼视图中绘制一个矩形框(通过设置填充颜色的透明度)3 设置移动鹰眼视图中的方框,主视图的联动(其实是主视图的当前视图范围出现变化,导致重新绘制方框,也就是方框的移动)代码如下:鹰眼 private void axMapControl1_OnMapReplaced(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMapReplacedEvent e) { IMap pMap = axMapControl1.Map; axMapControl2.ClearLaye 阅读全文
posted @ 2011-03-31 19:48 师士 阅读(1526) 评论(1) 推荐(0) 编辑
摘要: 选择一个要素或者一个要素集(FeatureSelection)的方法很多,如IMap::SelectByShape、ILayer::search、IFeatureSection::SelectFeature等方法主要用到的方法:IMap接口的SelectFeature(Layer, Feature) (方法,从一个Layer中选择一个Feature);IMap接口SelectByShape(Shape, env, justOne) (方法,从Layer中依靠一个图形的范围shape和一个选择的环境env来选择要素,而在所有图层中只从IFeatureLayer的图层中进行选择)IFeatureS 阅读全文
posted @ 2011-03-30 20:40 师士 阅读(5834) 评论(1) 推荐(1) 编辑
摘要: View Code public class Point { public int x, y; public Point(int x, int y) { this.x = x; this.y = y; } public override string ToString() { return string.Format("X={0},Y={1}", x, y); } } class Program { static void Main(string[] args) { Point p1 = new Point(50, 12); Point p2 = p1; p2.x = 0; 阅读全文
posted @ 2011-03-20 10:47 师士 阅读(286) 评论(0) 推荐(0) 编辑