Sub Globals
Dim mFragment As MapFragment
Dim gmap As GoogleMap
Dim GoogleMapsExtras1 As GoogleMapsExtras
Dim MapPanel As Panel
Dim panel1 As Panel
Dim panel2 As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
MapPanel.Initialize("")
panel1.Initialize("panel1")
panel2.Initialize("panel2")
Activity.AddView(panel1, 0, 0, 100%x, 70%y)
Activity.AddView(panel2, 0, 70%y, 100%x, 30%y)
panel1.AddView(MapPanel,0,0,100%x,100%y)
If mFragment.IsGooglePlayServicesAvailable = False Then
ToastMessageShow("Google Play services not available.", True)
Else
mFragment.Initialize("Map", MapPanel)
End If
End Sub
Sub panel1_click
MapPanel.RemoveView
panel1.AddView(MapPanel,0,0,100%x,100%y)
End Sub
Sub panel2_click
MapPanel.RemoveView
panel2.AddView(MapPanel,0,0,100%x,100%y)
End Sub
Sub Map_Ready
Log("map ready")
gmap = mFragment.GetMap
If gmap.IsInitialized = False Then
ToastMessageShow("Error initializing map.", True)
Else
gmap.MapType=gmap.MAP_TYPE_TERRAIN
gmap.MyLocationEnabled = True
'goto SW germany
Dim cp As CameraPosition
cp.Initialize(48.706214727530195,9.060724675655365, 7)
gmap.AnimateCamera(cp)
End If
End Sub