Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("lyCollectGPS")
If MapFragment1.IsGooglePlayServicesAvailable = False Then
ToastMessageShow("Please install Google Play Services.", True)
End If
End Sub
Sub MapFragment1_Ready
gmap = MapFragment1.GetMap
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
gmap.GetUiSettings.MyLocationButtonEnabled=True
Dim m1 As Marker = gmap.AddMarker(10, 30, "test")
m1.Snippet = "This is the snippet"
End Sub
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
If Permission = Starter.rp.PERMISSION_ACCESS_FINE_LOCATION Then
gmap.MyLocationEnabled = Result
End If
End Sub