MapX+VB 前一视图功能

Option Explicit
Dim oZoom As Double
Dim oMapX As Double
Dim oMapY As Double
Dim Zoom As Double
Dim MapX As Double
Dim MapY As Double

Private Sub Form_Load()
cmdPreOrNextView.Caption = "前一视图" 
End Sub

Private Sub cmdPreOrNextView_Click()
Map1.ZoomTo oZoom, oMapX, oMapY
If cmdPreOrNextView.Caption = "前一视图" Then
cmdPreOrNextView.Caption = "后一视图"
Else
cmdPreOrNextView.Caption = "前一视图"
End If
End Sub

Private Sub Map1_MapViewChanged()
oZoom = Zoom
oMapX = MapX
oMapY = MapY

Zoom = Map1.Zoom
MapX = Map1.CenterX
MapY = Map1.CenterY
End Sub

posted @ 2010-08-16 09:03  googlegis  阅读(200)  评论(0编辑  收藏  举报

坐标合肥,非典型GIS开发人员 GitHub