HelloAll,
I am following Erel's example while trying to add google map. [ https://www.b4x.com/android/forum/threads/google-maps.63930/]
Compilation is done perfectly. Also Generated the Google API key which I have added at manifest.xml file.
But nothing is showing at the map. I have also added GoogleMap, Runtimepermisson library.
The below is the code.
Please suggest
I am following Erel's example while trying to add google map. [ https://www.b4x.com/android/forum/threads/google-maps.63930/]
Compilation is done perfectly. Also Generated the Google API key which I have added at manifest.xml file.
But nothing is showing at the map. I have also added GoogleMap, Runtimepermisson library.
The below is the code.
B4X:
Private rp As RuntimePermissions
End Sub
Sub Globals
Private gmap As GoogleMap
Private MapFragment1 As MapFragment
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
Wait For MapFragment1_Ready
gmap = MapFragment1.GetMap
rp.CheckAndRequest(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
Sub MapFragment1_Click (Point As LatLng)
gmap.AddMarker(Point.Latitude, Point.Longitude, "New Marker")
End Sub
Please suggest