使用ArcGIS Engine来实现地图的点击查询并闪烁
2009-04-29 18:37
441 查看
ArcGIS Engine没有提供在MapControl中点击查询的命令,只是提供了ReaderControl中的使用的点击查询的命令,下面的代码就是实现点击查询并闪烁的代码。 过程描述 Private Sub MapControl1_OnMouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long, ByVal mapX As Double, ByVal mapY As Double) Dim pMap As IMap Dim i As Integer Dim pPoint As IPoint Set pMap = MapControl1.Map Set pPoint = MapControl1.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(x, y) Dim pIdentify As IIdentify Dim pIDArray As IArray Dim pFeatIdObj As IFeatureIdentifyObj Dim pIdObj As IIdentifyObj Set pIdentify = pMap.Layer(1) Dim pEnv As IEnvelope Set pEnv = New Envelope Set pEnv = MapControl1.ActiveView.Extent pEnv.Height = 100 pEnv.Width = 100 pEnv.CenterAt pPoint Set pIDArray = pIdentify.Identify(pEnv) If Not pIDArray Is Nothing Then Set pFeatIdObj = pIDArray.Element(0) Set pIdObj = pFeatIdObj pIdObj.Flash MapControl1.ActiveView.ScreenDisplay '消息显示查询目标的信息 MsgBox "Layer:" & pIdObj.Layer.Name & vbNewLine & "Feature:" & pIdObj.Name Else MsgBox "No feature identified." End If End Sub |
相关文章推荐
- 使用ArcGIS Engine来实现地图的点击查询并闪烁
- 使用ArcGIS Engine来实现地图的点击查询并闪烁
- 使用ArcGIS Engine来实现地图的点击查询并闪烁
- 使用ArcGIS Engine来实现地图的点击查询并闪烁 (C#)-未完成
- Android中使用百度API定位,并实现手势操作(显示最后点击地图的位置)
- 使用百度API实现实时公交线路查询及地图显示
- 使用百度API实现实时公交站点查询及地图显示
- 点击地图div上的按钮实现对地图数据的操作:查询点、添加点、删除点
- 使用ajax来实现数据的添加删除查询并能操作表格
- Android使用百度LBS SDK(三)点击地图POI导航
- XZ_iOS之使用KVO实现textField在填写完数据时,button可点击且变颜色
- Android 号码, 来电归属地 Jni 使用C++对二进制文件查询(二) C++实现篇
- Android简单实现 高德地图的定位与显示,点击按钮切换地图图层
- 一小段JS代码实现静态页面点击数的自动更新(使用AJAX)
- cocos2d-x 使用lua实现像素点击检测
- 使用JS代码实现点击按钮下载文件
- 一小段JS代码实现静态页面点击数的自动更新(使用AJAX)
- MySQL数据库(11)----使用子查询实现多表查询
- Java+oracle树查询实现easyui中tree使用的json
- 使用预处理语句实现数据查询的方法