Hi Guys n Gals
So, I followed the Gmap Tutorial and added the MapFragment, which gets populated withou problems...
But I get no other "automatic" interaction with it.
I can manually zoom in and out, but I get no logs and no camera movement by code.
I get the Log("MapFrag Ready") but not the Log("Got here")... So it seems my permission request is pending???
[EDIT] Permission need to be requested on an Activity!!!!
So, I followed the Gmap Tutorial and added the MapFragment, which gets populated withou problems...
But I get no other "automatic" interaction with it.
I can manually zoom in and out, but I get no logs and no camera movement by code.
B4X:
Wait For MapFragment1_Ready
Log("MapFrag Ready")
gmap = MapFragment1.GetMap
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
Log("Got here")
If Result Then
Log("Permission OK")
gmap.MyLocationEnabled = True
Dim cp As CameraPosition = gmap.CameraPosition
Dim NewCP As CameraPosition
NewCP.Initialize(cp.Target.Latitude, cp.Target.Longitude, cp.Zoom + 1)
gmap.AnimateCamera(NewCP)
Else
Log("No permission!")
End If
[EDIT] Permission need to be requested on an Activity!!!!
Last edited: