Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Activity.LoadLayout("5")
If mFragment.IsGooglePlayServicesAvailable = False Then
ToastMessageShow("Google Play services not available.", True)
bMap = False
Else
bMap = True
End If
If bMap = False Then
Return
End If
pnlMap.Visible = True
gblLat = 38.017112
gblLong = 23.542476
mFragment.Initialize("Map", pnlMap)
lMarkers.Initialize
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Map_Ready
Log("map ready")
gmap = mFragment.GetMap
gmap.MapType = gmap.MAP_TYPE_SATELLITE
If bMap = True Then
'
Else
ToastMessageShow("Google play services is not available.",True )
End If
If gmap.IsInitialized = False Then
ToastMessageShow("Error initializing map.", True)
Else
SetMapPositionToMarker
End If
End Sub
Sub SetMapPositionToMarker
sMarkTitle = "38.017112, 23.542476"
Dim m1 As Marker = gmap.AddMarker(gblLat, gblLong, sMarkTitle)
lMarkers.Add(m1)
Dim cp As CameraPosition
cp.Initialize(gblLat, gblLong, 17)
gmap.AnimateCamera(cp)
End Sub