www.pudn.com > my_GoogleEarth.rar > FormMain.frm, change:2007-06-07,size:31269b


VERSION 5.00 
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll" 
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX" 
Begin VB.Form FormMain  
   Caption         =   "My_GoogleEarth" 
   ClientHeight    =   8160 
   ClientLeft      =   60 
   ClientTop       =   345 
   ClientWidth     =   10125 
   LinkTopic       =   "Form1" 
   ScaleHeight     =   8160 
   ScaleWidth      =   10125 
   StartUpPosition =   3  'Windows Default 
   WindowState     =   2  'Maximized 
   Begin VB.CommandButton COMbj  
      Caption         =   "北京" 
      Height          =   255 
      Left            =   14160 
      TabIndex        =   38 
      Top             =   3240 
      Width           =   975 
   End 
   Begin VB.CommandButton COMsh  
      Caption         =   "上海" 
      Height          =   255 
      Left            =   14160 
      TabIndex        =   19 
      Top             =   3000 
      Width           =   975 
   End 
   Begin VB.CheckBox CheckMark  
      Caption         =   "MARK" 
      Height          =   255 
      Left            =   13560 
      TabIndex        =   44 
      Top             =   5160 
      Value           =   1  'Checked 
      Width           =   975 
   End 
   Begin VB.CommandButton COMpds  
      Caption         =   "平顶山" 
      Height          =   255 
      Left            =   14160 
      TabIndex        =   42 
      Top             =   2760 
      Width           =   975 
   End 
   Begin VB.CommandButton ComXX  
      Caption         =   "Input" 
      Height          =   255 
      Left            =   11400 
      TabIndex        =   41 
      Top             =   5160 
      Width           =   1935 
   End 
   Begin MSComctlLib.ProgressBar ProgressBar  
      Height          =   255 
      Left            =   11400 
      TabIndex        =   6 
      Top             =   10080 
      Visible         =   0   'False 
      Width           =   3855 
      _ExtentX        =   6800 
      _ExtentY        =   450 
      _Version        =   393216 
      Appearance      =   0 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "Frame1" 
      Height          =   3480 
      Index           =   8 
      Left            =   7560 
      TabIndex        =   28 
      Top             =   7680 
      Width           =   3480 
      Begin SHDocVwCtl.WebBrowser WebBrowser  
         Height          =   1455 
         Index           =   8 
         Left            =   720 
         TabIndex        =   37 
         Top             =   720 
         Width           =   1815 
         ExtentX         =   3201 
         ExtentY         =   2566 
         ViewMode        =   0 
         Offline         =   0 
         Silent          =   0 
         RegisterAsBrowser=   0 
         RegisterAsDropTarget=   1 
         AutoArrange     =   0   'False 
         NoClientEdge    =   0   'False 
         AlignLeft       =   0   'False 
         NoWebView       =   0   'False 
         HideFileNames   =   0   'False 
         SingleClick     =   0   'False 
         SingleSelection =   0   'False 
         NoFolders       =   0   'False 
         Transparent     =   0   'False 
         ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}" 
         Location        =   "http:///" 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "Frame1" 
      Height          =   3480 
      Index           =   7 
      Left            =   3720 
      TabIndex        =   27 
      Top             =   7680 
      Width           =   3480 
      Begin SHDocVwCtl.WebBrowser WebBrowser  
         Height          =   1455 
         Index           =   4 
         Left            =   1080 
         TabIndex        =   33 
         Top             =   960 
         Width           =   1815 
         ExtentX         =   3201 
         ExtentY         =   2566 
         ViewMode        =   0 
         Offline         =   0 
         Silent          =   0 
         RegisterAsBrowser=   0 
         RegisterAsDropTarget=   1 
         AutoArrange     =   0   'False 
         NoClientEdge    =   0   'False 
         AlignLeft       =   0   'False 
         NoWebView       =   0   'False 
         HideFileNames   =   0   'False 
         SingleClick     =   0   'False 
         SingleSelection =   0   'False 
         NoFolders       =   0   'False 
         Transparent     =   0   'False 
         ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}" 
         Location        =   "http:///" 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "Frame1" 
      Height          =   3480 
      Index           =   6 
      Left            =   -120 
      TabIndex        =   26 
      Top             =   7680 
      Width           =   3480 
      Begin SHDocVwCtl.WebBrowser WebBrowser  
         Height          =   1455 
         Index           =   7 
         Left            =   360 
         TabIndex        =   36 
         Top             =   1080 
         Width           =   1815 
         ExtentX         =   3201 
         ExtentY         =   2566 
         ViewMode        =   0 
         Offline         =   0 
         Silent          =   0 
         RegisterAsBrowser=   0 
         RegisterAsDropTarget=   1 
         AutoArrange     =   0   'False 
         NoClientEdge    =   0   'False 
         AlignLeft       =   0   'False 
         NoWebView       =   0   'False 
         HideFileNames   =   0   'False 
         SingleClick     =   0   'False 
         SingleSelection =   0   'False 
         NoFolders       =   0   'False 
         Transparent     =   0   'False 
         ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}" 
         Location        =   "http:///" 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "Frame1" 
      Height          =   3480 
      Index           =   5 
      Left            =   7560 
      TabIndex        =   25 
      Top             =   3840 
      Width           =   3480 
      Begin SHDocVwCtl.WebBrowser WebBrowser  
         Height          =   1455 
         Index           =   2 
         Left            =   720 
         TabIndex        =   31 
         Top             =   840 
         Width           =   1815 
         ExtentX         =   3201 
         ExtentY         =   2566 
         ViewMode        =   0 
         Offline         =   0 
         Silent          =   0 
         RegisterAsBrowser=   0 
         RegisterAsDropTarget=   1 
         AutoArrange     =   0   'False 
         NoClientEdge    =   0   'False 
         AlignLeft       =   0   'False 
         NoWebView       =   0   'False 
         HideFileNames   =   0   'False 
         SingleClick     =   0   'False 
         SingleSelection =   0   'False 
         NoFolders       =   0   'False 
         Transparent     =   0   'False 
         ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}" 
         Location        =   "http:///" 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "Frame1" 
      Height          =   3480 
      Index           =   4 
      Left            =   3720 
      TabIndex        =   24 
      Top             =   3840 
      Width           =   3480 
      Begin VB.PictureBox PictureMark  
         Height          =   135 
         Left            =   360 
         Picture         =   "FormMain.frx":0000 
         ScaleHeight     =   75 
         ScaleWidth      =   75 
         TabIndex        =   43 
         Top             =   480 
         Visible         =   0   'False 
         Width           =   135 
      End 
      Begin SHDocVwCtl.WebBrowser WebBrowser  
         Height          =   1455 
         Index           =   0 
         Left            =   600 
         TabIndex        =   29 
         Top             =   840 
         Width           =   1815 
         ExtentX         =   3201 
         ExtentY         =   2566 
         ViewMode        =   0 
         Offline         =   0 
         Silent          =   0 
         RegisterAsBrowser=   0 
         RegisterAsDropTarget=   1 
         AutoArrange     =   0   'False 
         NoClientEdge    =   0   'False 
         AlignLeft       =   0   'False 
         NoWebView       =   0   'False 
         HideFileNames   =   0   'False 
         SingleClick     =   0   'False 
         SingleSelection =   0   'False 
         NoFolders       =   0   'False 
         Transparent     =   0   'False 
         ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}" 
         Location        =   "http:///" 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "Frame1" 
      Height          =   3480 
      Index           =   3 
      Left            =   -120 
      TabIndex        =   23 
      Top             =   3840 
      Width           =   3480 
      Begin SHDocVwCtl.WebBrowser WebBrowser  
         Height          =   1455 
         Index           =   1 
         Left            =   840 
         TabIndex        =   30 
         Top             =   840 
         Width           =   1815 
         ExtentX         =   3201 
         ExtentY         =   2566 
         ViewMode        =   0 
         Offline         =   0 
         Silent          =   0 
         RegisterAsBrowser=   0 
         RegisterAsDropTarget=   1 
         AutoArrange     =   0   'False 
         NoClientEdge    =   0   'False 
         AlignLeft       =   0   'False 
         NoWebView       =   0   'False 
         HideFileNames   =   0   'False 
         SingleClick     =   0   'False 
         SingleSelection =   0   'False 
         NoFolders       =   0   'False 
         Transparent     =   0   'False 
         ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}" 
         Location        =   "http:///" 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "Frame1" 
      Height          =   3480 
      Index           =   2 
      Left            =   7560 
      TabIndex        =   22 
      Top             =   0 
      Width           =   3480 
      Begin SHDocVwCtl.WebBrowser WebBrowser  
         Height          =   1455 
         Index           =   6 
         Left            =   480 
         TabIndex        =   35 
         Top             =   960 
         Width           =   1815 
         ExtentX         =   3201 
         ExtentY         =   2566 
         ViewMode        =   0 
         Offline         =   0 
         Silent          =   0 
         RegisterAsBrowser=   0 
         RegisterAsDropTarget=   1 
         AutoArrange     =   0   'False 
         NoClientEdge    =   0   'False 
         AlignLeft       =   0   'False 
         NoWebView       =   0   'False 
         HideFileNames   =   0   'False 
         SingleClick     =   0   'False 
         SingleSelection =   0   'False 
         NoFolders       =   0   'False 
         Transparent     =   0   'False 
         ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}" 
         Location        =   "http:///" 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "Frame1" 
      Height          =   3480 
      Index           =   1 
      Left            =   3720 
      TabIndex        =   21 
      Top             =   0 
      Width           =   3480 
      Begin SHDocVwCtl.WebBrowser WebBrowser  
         Height          =   1455 
         Index           =   3 
         Left            =   840 
         TabIndex        =   32 
         Top             =   840 
         Width           =   1815 
         ExtentX         =   3201 
         ExtentY         =   2566 
         ViewMode        =   0 
         Offline         =   0 
         Silent          =   0 
         RegisterAsBrowser=   0 
         RegisterAsDropTarget=   1 
         AutoArrange     =   0   'False 
         NoClientEdge    =   0   'False 
         AlignLeft       =   0   'False 
         NoWebView       =   0   'False 
         HideFileNames   =   0   'False 
         SingleClick     =   0   'False 
         SingleSelection =   0   'False 
         NoFolders       =   0   'False 
         Transparent     =   0   'False 
         ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}" 
         Location        =   "http:///" 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "Frame1" 
      Height          =   3480 
      Index           =   0 
      Left            =   -120 
      TabIndex        =   20 
      Top             =   0 
      Width           =   3480 
      Begin SHDocVwCtl.WebBrowser WebBrowser  
         Height          =   1455 
         Index           =   5 
         Left            =   1080 
         TabIndex        =   34 
         Top             =   960 
         Width           =   1815 
         ExtentX         =   3201 
         ExtentY         =   2566 
         ViewMode        =   0 
         Offline         =   0 
         Silent          =   0 
         RegisterAsBrowser=   0 
         RegisterAsDropTarget=   1 
         AutoArrange     =   0   'False 
         NoClientEdge    =   0   'False 
         AlignLeft       =   0   'False 
         NoWebView       =   0   'False 
         HideFileNames   =   0   'False 
         SingleClick     =   0   'False 
         SingleSelection =   0   'False 
         NoFolders       =   0   'False 
         Transparent     =   0   'False 
         ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}" 
         Location        =   "http:///" 
      End 
   End 
   Begin VB.CheckBox CheckGO  
      Caption         =   "Link GO" 
      Height          =   255 
      Index           =   1 
      Left            =   14160 
      TabIndex        =   15 
      Top             =   1920 
      Value           =   1  'Checked 
      Width           =   975 
   End 
   Begin VB.TextBox TextLayer  
      Height          =   285 
      Left            =   14520 
      TabIndex        =   3 
      Text            =   "0" 
      Top             =   1080 
      Width           =   375 
   End 
   Begin VB.CommandButton Command2  
      Caption         =   "-" 
      Height          =   375 
      Index           =   1 
      Left            =   14520 
      TabIndex        =   14 
      Top             =   1365 
      Width           =   375 
   End 
   Begin VB.CommandButton Command2  
      Caption         =   "+" 
      Height          =   375 
      Index           =   0 
      Left            =   14520 
      TabIndex        =   13 
      Top             =   720 
      Width           =   375 
   End 
   Begin VB.CheckBox CheckGO  
      Caption         =   "Link GO" 
      Height          =   255 
      Index           =   0 
      Left            =   12480 
      TabIndex        =   12 
      Top             =   1920 
      Value           =   1  'Checked 
      Width           =   975 
   End 
   Begin VB.TextBox TextChe  
      Height          =   375 
      Left            =   12840 
      TabIndex        =   11 
      Text            =   "5" 
      Top             =   1080 
      Width           =   375 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "→" 
      Height          =   375 
      Index           =   3 
      Left            =   13200 
      TabIndex        =   10 
      Top             =   1080 
      Width           =   375 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "←" 
      Height          =   375 
      Index           =   2 
      Left            =   12480 
      TabIndex        =   9 
      Top             =   1080 
      Width           =   375 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "↓" 
      Height          =   375 
      Index           =   1 
      Left            =   12840 
      TabIndex        =   8 
      Top             =   1440 
      Width           =   375 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "↑" 
      Height          =   375 
      Index           =   0 
      Left            =   12840 
      TabIndex        =   7 
      Top             =   720 
      Width           =   375 
   End 
   Begin VB.TextBox TextY  
      Height          =   285 
      Left            =   13920 
      TabIndex        =   2 
      Text            =   "0" 
      Top             =   360 
      Width           =   1215 
   End 
   Begin VB.TextBox TextX  
      Height          =   285 
      Left            =   12360 
      TabIndex        =   1 
      Text            =   "0" 
      Top             =   360 
      Width           =   1215 
   End 
   Begin VB.CommandButton ComGO  
      Caption         =   "GO" 
      Height          =   375 
      Left            =   12480 
      TabIndex        =   0 
      Top             =   2280 
      Width           =   2655 
   End 
   Begin VB.Label Labelexd  
      Caption         =   "度分秒" 
      Height          =   255 
      Left            =   11640 
      TabIndex        =   40 
      Top             =   9720 
      Width           =   3615 
   End 
   Begin VB.Label Labelexc  
      Caption         =   "度分秒" 
      Height          =   255 
      Left            =   11640 
      TabIndex        =   39 
      Top             =   9480 
      Width           =   3615 
   End 
   Begin VB.Label LabelL  
      Caption         =   "Label3" 
      Height          =   255 
      Left            =   9000 
      TabIndex        =   17 
      Top             =   3480 
      Width           =   2055 
   End 
   Begin VB.Line Line_X  
      BorderColor     =   &H000000FF& 
      X1              =   13320 
      X2              =   13320 
      Y1              =   5520 
      Y2              =   9360 
   End 
   Begin VB.Line Line_Y  
      BorderColor     =   &H000000FF& 
      X1              =   11400 
      X2              =   15240 
      Y1              =   7440 
      Y2              =   7440 
   End 
   Begin VB.Label LabelURL  
      Caption         =   "1" 
      Height          =   255 
      Left            =   8520 
      TabIndex        =   16 
      Top             =   3480 
      Width           =   2295 
   End 
   Begin VB.Line LineY  
      X1              =   11160 
      X2              =   15480 
      Y1              =   7440 
      Y2              =   7440 
   End 
   Begin VB.Line LineX  
      X1              =   13320 
      X2              =   13320 
      Y1              =   5280 
      Y2              =   9600 
   End 
   Begin VB.Label Label2  
      Caption         =   "纬度:" 
      Height          =   255 
      Left            =   13920 
      TabIndex        =   5 
      Top             =   120 
      Width           =   615 
   End 
   Begin VB.Label Label1  
      Caption         =   "经度:" 
      Height          =   255 
      Left            =   12360 
      TabIndex        =   4 
      Top             =   120 
      Width           =   615 
   End 
   Begin VB.Image ImageC  
      Height          =   3840 
      Left            =   11400 
      Picture         =   "FormMain.frx":1242 
      Top             =   5520 
      Width           =   3840 
   End 
   Begin VB.Label LabelR  
      Caption         =   "Label3" 
      Height          =   255 
      Left            =   7800 
      TabIndex        =   18 
      Top             =   3480 
      Width           =   2055 
   End 
End 
Attribute VB_Name = "FormMain" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
 
Private Sub ComGO_Click() 
Dim initURL As String 
Dim the_url(0 To 8) As String 
Dim i As Integer 
 
initURL = "http://kh.google.com/kh?v=3&t=t" 
'On Error GoTo ErrLab 
Call LoadLine_G(CDbl(TextX.Text), CDbl(TextY.Text)) 
ProgressBar.Value = 0 
the_url(0) = GLatLng(CDbl(TextX.Text), CDbl(TextY.Text), CInt(TextLayer.Text)) 
the_url(1) = GLatLng_Left(the_url(0)) 
the_url(2) = GLatLng_Right(the_url(0)) 
the_url(3) = GLatLng_Up(the_url(0)) 
the_url(4) = GLatLng_Down(the_url(0)) 
the_url(5) = GLatLng_Up(the_url(1)) 
the_url(6) = GLatLng_Up(the_url(2)) 
the_url(7) = GLatLng_Down(the_url(1)) 
the_url(8) = GLatLng_Down(the_url(2)) 
LabelURL.Caption = the_url(0) 
LabelL.Caption = the_url(1) 
LabelR.Caption = the_url(2) 
For i = 0 To 8 
    If WebBrowser(i).LocationURL <> initURL & the_url(i) Then 
        Call WebBrowser(i).Navigate(initURL & the_url(i)) 
    End If 
Next 
'ImageC.Picture = LoadPicture(localURL) 
Exit Sub 
ErrLab: 
MsgBox Err.Description 
End Sub 
 
Private Sub Command1_Click(Index As Integer) 
If Index = 0 Then 
    TextY.Text = CStr(CDbl(TextY.Text) + CDbl(TextChe.Text)) 
ElseIf Index = 1 Then 
    TextY.Text = CStr(CDbl(TextY.Text) - CDbl(TextChe.Text)) 
ElseIf Index = 2 Then 
    TextX.Text = CStr(CDbl(TextX.Text) - CDbl(TextChe.Text)) 
ElseIf Index = 3 Then 
    TextX.Text = CStr(CDbl(TextX.Text) + CDbl(TextChe.Text)) 
End If 
If CheckGO(0).Value = 1 Then 
    ComGO_Click 
Else 
    Call LoadLine_G(CDbl(TextX.Text), CDbl(TextY.Text)) 
End If 
End Sub 
 
Private Sub Command2_Click(Index As Integer) 
If Index = 0 Then 
    TextLayer.Text = CStr(CInt(TextLayer.Text) + 1) 
ElseIf Index = 1 Then 
    TextLayer.Text = CStr(CInt(TextLayer.Text) - 1) 
End If 
If CInt(TextLayer.Text) > 18 Then 
    TextLayer.Text = 18 
End If 
If CInt(TextLayer.Text) < 0 Then 
    TextLayer.Text = 0 
End If 
If CheckGO(1).Value = 1 Then 
    ComGO_Click 
End If 
End Sub 
 
Private Sub ComXX_Click() 
If ComXX.Caption = "Input" Then 
    ComXX.Caption = "OK" 
    Call My_formload_in(1) 
Else 
    ComXX.Caption = "Input" 
    Call My_formload_in(2) 
End If 
End Sub 
 
Private Sub Form_Unload(Cancel As Integer) 
FormAbout.Show 
End Sub 
 
Private Sub TextX_Change() 
Dim str As String 
Dim m, vel As Double 
 
On Error GoTo Err 
vel = CDbl(TextX.Text) 
 
If vel < 0 Then 
    Labelexc.Caption = " W" 
    vel = -vel 
     
Else 
    Labelexc.Caption = " E" 
End If 
m = Fix(vel) 
str = CStr(m) & "° " 
vel = vel - m 
vel = vel * 3600 
str = str & CStr(CInt(Fix(vel) / 60)) & "' " 
str = str & CStr(CInt(Fix(vel) Mod 60)) & "'' " 
str = str & CStr(vel - Fix(vel)) 
Labelexc.Caption = "经度: " & str & Labelexc.Caption 
Exit Sub 
Err: 
    MsgBox Err.Description 
End Sub 
 
Private Sub TextY_Change() 
Dim str As String 
Dim m, vel As Double 
 
On Error GoTo Err 
vel = CDbl(TextY.Text) 
 
If vel < 0 Then 
    Labelexd.Caption = " S" 
    vel = -vel 
     
Else 
    Labelexd.Caption = " N" 
End If 
m = Fix(vel) 
str = CStr(m) & "° " 
vel = vel - m 
vel = vel * 3600 
str = str & CStr(CInt(Fix(vel) / 60)) & "' " 
str = str & CStr(CInt(Fix(vel) Mod 60)) & "'' " 
str = str & CStr(vel - Fix(vel)) 
Labelexd.Caption = "纬度: " & str & Labelexd.Caption 
Exit Sub 
Err: 
    MsgBox Err.Description 
End Sub 
 
Private Sub WebBrowser_DownloadBegin(Index As Integer) 
ProgressBar.Max = 9 
ProgressBar.Value = 0 
ProgressBar.Visible = True 
End Sub 
 
Private Sub WebBrowser_DownloadComplete(Index As Integer) 
Dim i 
ProgressBar.Value = ProgressBar.Value + 1 
For i = 0 To 8 
    If WebBrowser(i).Busy Then 
        Exit Sub 
    End If 
Next 
ProgressBar.Visible = False 
End Sub 
 
'Private Sub WebBrowser_ProgressChange(index As Integer, ByVal Progress As Long, ByVal ProgressMax As Long) 
'Dim Parr(0 To 8) As Long 
'Dim max(0 To 8) As Long 
'Dim max_8 As Long 
'Dim i 
'Dim val As Integer 
'If ProgressMax = 0 Then 
'    max(index) = 0 
'    Exit Sub 
'End If 
'max(index) = ProgressMax 
'If Progress <> -1 And Progress <= ProgressMax Then 
'    Parr(index) = Progress 
'End If 
'val = 0 
'max_8 = 0 
'For i = 0 To 8 
'    val = val + Parr(i) 
'    max_8 = max_8 + max(i) 
'Next 
'ProgressBar.max = max_8 
'ProgressBar.Value = val 
'End Sub 
 
 
 
'################################## 
'               |+(N)latitude(MAX:=90) 
'      {Q}      |      {R} 
'               |               +(E)longitude(MAX:=180) 
'---------------O---------------- 
'-(W)           |(0,0) 
'      {T}      |      {S} 
'           -(S)| 
'################################## 
Private Function GLatLng(longitude As Double, latitude As Double, layer As Integer) As String 
Dim URLstr As String    '(37.4419, -122.1419) 
Dim i As Integer 
Dim coordinate_width As Double 
Dim coordinate_height As Double 
 
If layer > 18 Then 
    layer = 18 
End If 
If longitude > 180 Then 
    longitude = longitude - 360 
ElseIf longitude < -180 Then 
    longitude = longitude + 360 
End If 
If latitude > 90 Then 
    latitude = latitude - 180 
ElseIf latitude < -90 Then 
    latitude = latitude + 180 
End If 
 
URLstr = "" 
coordinate_width = 180 
coordinate_height = 90 
For i = 1 To layer 
    coordinate_width = coordinate_width / 2 
    coordinate_height = coordinate_height / 2 
    If longitude > 0 Then 
        If latitude > 0 Then 
            URLstr = URLstr & "r" 
            longitude = longitude - coordinate_width 
            latitude = latitude - coordinate_height 
        Else 
            URLstr = URLstr & "s" 
            longitude = longitude - coordinate_width 
            latitude = latitude + coordinate_height 
        End If 
    Else 
        If latitude > 0 Then 
            URLstr = URLstr & "q" 
            longitude = longitude + coordinate_width 
            latitude = latitude - coordinate_height 
        Else 
            URLstr = URLstr & "t" 
            longitude = longitude + coordinate_width 
            latitude = latitude + coordinate_height 
        End If 
    End If 
Next 
Call LoadLine(longitude, latitude, coordinate_width, coordinate_height) 
GLatLng = URLstr 
End Function 
 
Private Function GLatLng_Left(location As String) As String 
Dim temp As String 
Dim tempL As String 
 
If location = "" Then 
    GLatLng_Left = "" 
    Exit Function 
End If 
 
If Len(location) > 1 Then 
    temp = Mid(location, 1, Len(location) - 1) 
    tempL = Mid(location, Len(location), 1) 
Else 
    temp = "" 
    tempL = location 
End If 
If tempL = "r" Then 
    GLatLng_Left = temp & "q" 
    Exit Function 
ElseIf tempL = "s" Then 
    GLatLng_Left = temp & "t" 
    Exit Function 
End If 
If tempL = "q" Then 
    If temp = "" Then 
        GLatLng_Left = "r" 
    Else 
        GLatLng_Left = GLatLng_Left(temp) & "r" 
    End If 
    Exit Function 
ElseIf tempL = "t" Then 
     If temp = "" Then 
        GLatLng_Left = "s" 
    Else 
        GLatLng_Left = GLatLng_Left(temp) & "s" 
    End If 
    Exit Function 
End If 
 
End Function 
 
Private Function GLatLng_Right(location As String) As String 
Dim temp As String 
Dim tempL As String 
 
If location = "" Then 
    GLatLng_Right = "" 
    Exit Function 
End If 
 
If Len(location) > 1 Then 
    temp = Mid(location, 1, Len(location) - 1) 
    tempL = Mid(location, Len(location), 1) 
Else 
    temp = "" 
    tempL = location 
End If 
If tempL = "q" Then 
    GLatLng_Right = temp & "r" 
    Exit Function 
ElseIf tempL = "t" Then 
    GLatLng_Right = temp & "s" 
    Exit Function 
End If 
If tempL = "r" Then 
    If temp = "" Then 
        GLatLng_Right = "q" 
    Else 
        GLatLng_Right = GLatLng_Right(temp) & "q" 
    End If 
    Exit Function 
ElseIf tempL = "s" Then 
    If temp = "" Then 
        GLatLng_Right = "t" 
    Else 
        GLatLng_Right = GLatLng_Right(temp) & "t" 
    End If 
    Exit Function 
End If 
 
End Function 
 
Private Function GLatLng_Up(location As String) As String 
Dim temp As String 
Dim tempL As String 
 
If location = "" Then 
    GLatLng_Up = "" 
    Exit Function 
End If 
 
If Len(location) > 1 Then 
    temp = Mid(location, 1, Len(location) - 1) 
    tempL = Mid(location, Len(location), 1) 
Else 
    temp = "" 
    tempL = location 
End If 
If tempL = "s" Then 
    GLatLng_Up = temp & "r" 
    Exit Function 
ElseIf tempL = "t" Then 
    GLatLng_Up = temp & "q" 
    Exit Function 
End If 
If tempL = "r" Then 
    If temp = "" Then 
        GLatLng_Up = "s" 
    Else 
        GLatLng_Up = GLatLng_Up(temp) & "s" 
    End If 
    Exit Function 
ElseIf tempL = "q" Then 
    If temp = "" Then 
        GLatLng_Up = "t" 
    Else 
        GLatLng_Up = GLatLng_Up(temp) & "t" 
    End If 
    Exit Function 
End If 
 
End Function 
 
Private Function GLatLng_Down(location As String) As String 
Dim temp As String 
Dim tempL As String 
 
If location = "" Then 
    GLatLng_Down = "" 
    Exit Function 
End If 
 
If Len(location) > 1 Then 
    temp = Mid(location, 1, Len(location) - 1) 
    tempL = Mid(location, Len(location), 1) 
Else 
    temp = "" 
    tempL = location 
End If 
If tempL = "r" Then 
    GLatLng_Down = temp & "s" 
    Exit Function 
ElseIf tempL = "q" Then 
    GLatLng_Down = temp & "t" 
    Exit Function 
End If 
If tempL = "s" Then 
    If temp = "" Then 
        GLatLng_Down = "r" 
    Else 
        GLatLng_Down = GLatLng_Down(temp) & "r" 
    End If 
    Exit Function 
ElseIf tempL = "t" Then 
    If temp = "" Then 
        GLatLng_Down = "q" 
    Else 
        GLatLng_Down = GLatLng_Down(temp) & "q" 
    End If 
    Exit Function 
End If 
 
End Function 
 
Private Sub LoadLine(X As Double, Y As Double, w As Double, h As Double) 
LineX.X1 = ImageC.Left + ImageC.Width / 2 + 255 * 15 * X / (w * 2) 
LineX.X2 = ImageC.Left + ImageC.Width / 2 + 255 * 15 * X / (w * 2) 
LineY.Y1 = ImageC.Top + ImageC.Height / 2 - 255 * 15 * Y / (h * 2) 
LineY.Y2 = ImageC.Top + ImageC.Height / 2 - 255 * 15 * Y / (h * 2) 
If CheckMark.Value = 1 Then 
    With PictureMark 
        .Left = WebBrowser(0).Left + WebBrowser(0).Width / 2 + 255 * 15 * X / (w * 2) - .Width / 2 
        .Top = WebBrowser(0).Top + WebBrowser(0).Height / 2 - 255 * 15 * Y / (h * 2) - .Height / 2 
    End With 
    PictureMark.Visible = True 
Else 
    PictureMark.Visible = False 
End If 
End Sub 
 
Private Sub LoadLine_G(X As Double, Y As Double) 
Line_X.X1 = ImageC.Left + ImageC.Width / 2 + 255 * 15 * X / 360 
Line_X.X2 = ImageC.Left + ImageC.Width / 2 + 255 * 15 * X / 360 
Line_Y.Y1 = ImageC.Top + ImageC.Height / 2 - 255 * 15 * Y / 180 
Line_Y.Y2 = ImageC.Top + ImageC.Height / 2 - 255 * 15 * Y / 180 
End Sub 
 
Private Sub My_formload() 
Dim i As Integer 
For i = 0 To 8 
    With Frame1(i) 
        .BorderStyle = 0 
        .Width = 3845 
        .Height = 4000 
    End With 
    With WebBrowser(i) 
        .Width = 4455 
        .Height = 4455 
        .Left = -180 
        .Top = -260 
        '.Navigate ("about:blank") 
        .Navigate (App.Path & "\te.jpg") 
    End With 
Next 
End Sub 
 
Private Sub My_formload_in(stu As Integer) 
Dim i As Integer 
For i = 0 To 8 
    With WebBrowser(i) 
        If stu = 1 Then 
            .Width = 5455 
            .Height = 13000 
            .Left = -800 
            .Top = -8000 
        ElseIf stu = 2 Then 
            .Width = 4455 
            .Height = 4455 
            .Left = -180 
            .Top = -260 
        End If 
    End With 
Next 
End Sub 
 
Private Sub Form_Load() 
My_formload 
End Sub 
 
Private Sub COMsh_Click() 
TextX.Text = 121.483 
TextY.Text = 16.454 
TextLayer = 15 
ComGO_Click 
End Sub 
 
Private Sub COMbj_Click() 
TextX.Text = 116.39 
TextY.Text = 21.795 
TextLayer = 15 
ComGO_Click 
End Sub 
 
Private Sub COMpds_Click() 
TextX.Text = 113.305 
TextY.Text = 17.935 
TextLayer = 11 
ComGO_Click 
End Sub