Imports TerraExplorerX
Partial Public Class Form1
Private sgworld As SGWorld65
Public Sub New()
InitializeComponent()
sgworld = New SGWorld65()
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs)
' Register to OnLoadFinished globe event
AddHandler sgworld.OnLoadFinished, AddressOf OnProjectLoadFinished
' Open Project in asynchronous mode
Dim flyFile As String = "https://www.skylinesoft.com/SkylineGlobe/WebClient/PresentationLayer/WebClient/SkyglobeLB.fly"
sgworld.Project.Open(flyFile, True, Nothing, Nothing)
MessageBox.Show("Opening project " & flyFile & " in async mode")
End Sub
Private Sub OnProjectLoadFinished()
MessageBox.Show("Received project loaded event. Click OK to fly to Washington DC.")
Dim Washington As IPosition65 = sgworld.Creator.CreatePosition(-77.036667, 38.895111, 1500, AltitudeTypeCode.ATC_TERRAIN_RELATIVE, 0, 0, 0, 0)
sgworld.Navigate.FlyTo(Washington)
End Sub
End Class