Android Question [SOLVED] No view found error on Google Maps

makis_best

Well-Known Member
Licensed User
Longtime User
I try to implement google maps example from here
but I get the error


I search at forum but I didn't find anything.
 

makis_best

Well-Known Member
Licensed User
Longtime User
I mean I look in forum for the same error from another user but I didn't find anyone else had the same problem

In my project there is a tabhost with 3 tabs and in one layout of the three I have the MapFragment

But when I select the tab I get the above error

B4X:
Sub Globals
......
        Private gmap As GoogleMap
    Private MapFragment1 As MapFragment
End Sub

B4X:
Sub Activity_Create(FirstTime As Boolean)
..........
    TabHost1.AddTab("ΤΑΥΤΟΤΗΤΑ", "Client_info_TAFTOTHTA.bal")
    TabHost1.AddTab("ΕΜΠΟΡΙΚΟ", "Client_info_EMPORIKO.bal")
    TabHost1.AddTab("ΔΙΕΥΘΥΝΣΕΙΣ", "Client_info_DIEFTHYNSEIS.bal")
    ClientAddresses
End Sub

Inside Client_info_DIEFTHYNSEIS.bal I have the MapFragment view.

B4X:
Sub ClientAddresses
    Wait For MapFragment1_Ready
    gmap = MapFragment1.GetMap
    Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
    Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
    If Result Then
        gmap.MyLocationEnabled = True
    Else
        Log("No permission!")
    End If
End Sub
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…