• MapX+VB 前一視圖功能

    2016-07-08

    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


    天堂网