返回首页
当前位置: 主页 > GPS学院 > 应用软件 >

GPS学堂 MapX的“鹰眼”实现

时间:2008-01-18 10:42来源:GPS之家-导航之家 作者:bbs.gpsuu.com
新建一工程,放两个MapX控件:Map1(主),Map2(导航),放三个按钮用来放大、缩小和漫游: CmdZoomIn,CmdZoomOut,CmdPan '本程序演示MapX的鹰眼窗口 '采用MapX的Feature方式实现 Dim m_TempLayer As Layer '导航图上临时图层 Dim m_Fea As MapXLib.Feature '导航

新建一工程,放两个MapX控件:Map1(主),Map2(导航),放三个按钮用来放大、缩小和漫游:

 

 

CmdZoomIn,CmdZoomOut,CmdPan

'本程序演示MapX的“鹰眼”窗口
'采用MapX的Feature方式实现
Dim m_TempLayer As Layer '导航图上临时图层
Dim m_Fea As MapXLib.Feature '导航图上反映主地图窗口位置的Feature
Dim bDown As Boolean '鼠标在导航图上按下的标志

Private Sub CmdPan_Click()
Map1.CurrentTool = miPanTool
End Sub

Private Sub CmdZoomIn_Click()
Map1.CurrentTool = miZoomInTool
End Sub

Private Sub CmdZoomOut_Click()
Map1.CurrentTool = miZoomOutTool
End Sub

Private Sub Form_Load()
''给Map2增加临时图层
Set m_TempLayer = Map2.Layers.CreateLayer(wewew)
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set m_Fea = Nothing
Set m_TempLayer = Nothing
End Sub

''根据map1的Bounds在Map2上绘制矩形
Private Sub Map1_MapViewChanged()
Dim tempFea As MapXLib.Feature
Dim tempPnts As MapXLib.Points
Dim tempStyle As MapXLib.Style

(责任编辑:admin)

[ GPSUU整理发布,版权归原作者所有。]
顶一下
(4)
100%
踩一下
(0)
0%
------分隔线----------------------------

推荐内容