在mapControl控件上添加feature要素
来源:互联网 发布:哪个电气设计软件最好 编辑:程序博客网 时间:2024/05/16 20:30
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
- 在mapControl控件上添加feature要素
- 鼠标在MapControl中框选要素
- MapControl控件
- Arcengine实现:在 MapControl 上绘制几何图形
- ArcEngine+VC6二次开发之添加MapControl控件封装应用类
- 在GIS二次开发mapcontrol空间中对要素显示气泡弹出框(AE开发)
- 在ToolStrip控件上添加控件
- C#.net 地图控件开发(八) 地图要素Feature
- DevExpess 控件-MapControl
- 在listview控件标题上添加图标
- 在Toolbar上添加Edit控件
- Flex在Tree控件上添加CheckBox
- RCP,在工具栏上添加其它控件
- 如何在控件上添加右键菜单
- Flex在Tree控件上添加CheckBox
- 如何在vb控件上添加超链接
- Flex在Tree控件上添加CheckBox
- 在导航栏上添加控件
- 将人民币的数字转化成大写表示
- SCJP试题1
- Java图形用户界面设计6
- 深入认识JavaScript中的函数
- linux 学习
- 在mapControl控件上添加feature要素
- Gets or sets whether drilling down to a page/chart/summary is enabled.
- "Parser Error Message: Access is denied: Source Error: Line 198: "
- 大学生必读
- [转][小说]我是一名黑客
- 论:Java替代C语言的可能性
- 利用java实现打印菱形
- Java SE 6 的新特性
- inversion of control(控制反转)