iOS Question GoogleMap Permission

stevenindon

Active Member
Licensed User
Hello All,

I have to implement googlemap as of what i have done in B4A. In B4A, we need to request user permission as such :

B4X:
    rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
    Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)

How can i have the same in B4i... as i observed that there is no permission request from user in IOS. IOS don't require permission for googlemap to run?
 

TILogistic

Expert
Licensed User
Longtime User
see
or
 
Upvote 0

stevenindon

Active Member
Licensed User
Oparra. Thank you for your info and i manage to get both B4a and B4i Google map running. Setting permission all fixed. Thanks (*My own silly mistake)
 
Upvote 0

stevenindon

Active Member
Licensed User
Oparra. Thank you for your info and i manage to get both B4a and B4i Google map running. Setting permission all fixed. Thanks (*My own silly mistake)
To capture user permission, I am using code as below :

B4X:
    #else if B4i
        gmap.Initialize("gmap", Main.API_KEY)
        pnlMap.AddView(gmap, 0, 0, pnlMap.Width, pnlMap.Height)
        gmap.MyLocationEnabled=True '<<----------- To force the pop up for user permission
    #End If
    gmap.GetUiSettings.CompassEnabled = True
    gmap.GetUiSettings.TiltGesturesEnabled = False
    gmap.MapType = gmap.MAP_TYPE_NORMAL
  

    If gmap.MyLocationEnabled=True Then '<<---- try to determine user click permission to dislay Location Button / Hide Location Button
        gmap.GetUiSettings.MyLocationButtonEnabled=True
    Else
        gmap.GetUiSettings.MyLocationButtonEnabled=False
    End If

I am not able to catch user's input. The idea is to hide the MyLocation Button if user dont allow permission. I even tried :

wait for(gmap.MyLocationEnabled) complete (sVal as boolean) ... but doesnt seems to work
 
Last edited:
Upvote 0
Top