Z Zeus Member Licensed User Longtime User Jan 28, 2019 #1 I try many samples of googlemaps but i still have a blank maps Some body have a clear sample for the B4A V 8.8 Tks
I try many samples of googlemaps but i still have a blank maps Some body have a clear sample for the B4A V 8.8 Tks
DonManfred Expert Licensed User Longtime User Jan 28, 2019 #2 Zeus said: Some body have a clear sample for the B4A V 8.8 Click to expand... https://www.b4x.com/android/forum/threads/google-maps.63930/#post-404386 Upvote 0
Zeus said: Some body have a clear sample for the B4A V 8.8 Click to expand... https://www.b4x.com/android/forum/threads/google-maps.63930/#post-404386
Z Zeus Member Licensed User Longtime User Jan 28, 2019 #3 Tks DonMAnfred i try these tutorial but still dont work just blank i try this on my manifest '************ Google Play Services Base ************ AddApplicationText( <activity android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="false"/> <meta-data android:name="com.google.android.gms.version" android:value="@Integer/google_play_services_version" /> ) '************ Google Play Services Base (end) ************ AddApplicationText( <meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaxxxxxxxxxxxxxxxxxx"/> my key go here ) *Use GoogleMap.jar 2.02 *MapFragment MyLocatation Enabled is false *Google Play Services is run in the phone *Google Map is running correct on the phone is a Huewey Y7 Upvote 0
Tks DonMAnfred i try these tutorial but still dont work just blank i try this on my manifest '************ Google Play Services Base ************ AddApplicationText( <activity android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="false"/> <meta-data android:name="com.google.android.gms.version" android:value="@Integer/google_play_services_version" /> ) '************ Google Play Services Base (end) ************ AddApplicationText( <meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaxxxxxxxxxxxxxxxxxx"/> my key go here ) *Use GoogleMap.jar 2.02 *MapFragment MyLocatation Enabled is false *Google Play Services is run in the phone *Google Map is running correct on the phone is a Huewey Y7
Alexander Stolte Expert Licensed User Longtime User Jan 28, 2019 #4 Do you have the location permission request in the code? Code: Copy Sub MapFragment1_Ready gmap = MapFragment1.GetMap rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION) Wait For Activity_PermissionResult (Permission As String, Result As Boolean) gmap.MyLocationEnabled = Result Dim m1 As Marker = gmap.AddMarker(10, 30, "test") m1.Snippet = "This is the snippet" End Sub Upvote 0
Do you have the location permission request in the code? Code: Copy Sub MapFragment1_Ready gmap = MapFragment1.GetMap rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION) Wait For Activity_PermissionResult (Permission As String, Result As Boolean) gmap.MyLocationEnabled = Result Dim m1 As Marker = gmap.AddMarker(10, 30, "test") m1.Snippet = "This is the snippet" End Sub
victormedranop Well-Known Member Licensed User Longtime User Jan 28, 2019 #5 Check runtime permisions. Victor Upvote 0
Z Zeus Member Licensed User Longtime User Jan 28, 2019 #6 Alexander Stolte said: Do you have the location permission request in the code? Code: Copy Sub MapFragment1_Ready gmap = MapFragment1.GetMap rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION) Wait For Activity_PermissionResult (Permission As String, Result As Boolean) gmap.MyLocationEnabled = Result Dim m1 As Marker = gmap.AddMarker(10, 30, "test") m1.Snippet = "This is the snippet" End Sub Click to expand... i dont have i put now and i will try tks Upvote 0
Alexander Stolte said: Do you have the location permission request in the code? Code: Copy Sub MapFragment1_Ready gmap = MapFragment1.GetMap rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION) Wait For Activity_PermissionResult (Permission As String, Result As Boolean) gmap.MyLocationEnabled = Result Dim m1 As Marker = gmap.AddMarker(10, 30, "test") m1.Snippet = "This is the snippet" End Sub Click to expand... i dont have i put now and i will try tks
Z Zeus Member Licensed User Longtime User Jan 28, 2019 #7 Well * add runtimepermissions(V1.10) Librery References * Add the alexander code and i debug line by line no error all de code execute but still blank map this is the log ** Activity (map) Create, isFirst = true ** ** Activity (map) Resume ** ** Activity (map) Pause, UserClosed = false ** ** Activity (map) Resume ** ** Activity (map) Pause, UserClosed = true ** ** Activity (panmain) Resume ** ** Service (starter) Destroy (ignored)** ** Activity (panmain) Pause, UserClosed = true ** *** Service (starter) Create *** ** Service (starter) Start ** ** Activity (main) Create, isFirst = true ** ** Activity (main) Resume ** FASCON ** Activity (main) Pause, UserClosed = false ** ** Activity (panmain) Create, isFirst = true ** ** Activity (panmain) Resume ** ** Activity (panmain) Pause, UserClosed = false ** ** Activity (map) Create, isFirst = true ** ** Activity (map) Resume ** Upvote 0
Well * add runtimepermissions(V1.10) Librery References * Add the alexander code and i debug line by line no error all de code execute but still blank map this is the log ** Activity (map) Create, isFirst = true ** ** Activity (map) Resume ** ** Activity (map) Pause, UserClosed = false ** ** Activity (map) Resume ** ** Activity (map) Pause, UserClosed = true ** ** Activity (panmain) Resume ** ** Service (starter) Destroy (ignored)** ** Activity (panmain) Pause, UserClosed = true ** *** Service (starter) Create *** ** Service (starter) Start ** ** Activity (main) Create, isFirst = true ** ** Activity (main) Resume ** FASCON ** Activity (main) Pause, UserClosed = false ** ** Activity (panmain) Create, isFirst = true ** ** Activity (panmain) Resume ** ** Activity (panmain) Pause, UserClosed = false ** ** Activity (map) Create, isFirst = true ** ** Activity (map) Resume **
victormedranop Well-Known Member Licensed User Longtime User Jan 28, 2019 #8 Post sample code. Victor Upvote 0
Z Zeus Member Licensed User Longtime User Jan 28, 2019 #9 TKs victor thes is my code *********** Start Code **************** #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Private MySQL As JdbcSQL Private rp As RuntimePermissions End Sub Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Private gmap As GoogleMap Private MapFragment1 As MapFragment End Sub Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") Activity.LoadLayout("map") If MapFragment1.IsGooglePlayServicesAvailable = False Then ToastMessageShow("Please install Google Play Services.", True) End If End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub MapFragment1_Ready gmap = MapFragment1.GetMap rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION) Wait For Activity_PermissionResult (Permission As String, Result As Boolean) gmap.MyLocationEnabled = Result Dim m1 As Marker = gmap.AddMarker(10, 30, "test") m1.Snippet = "This is the snippet" End Sub **********End Code*************************************** Upvote 0
TKs victor thes is my code *********** Start Code **************** #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Private MySQL As JdbcSQL Private rp As RuntimePermissions End Sub Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Private gmap As GoogleMap Private MapFragment1 As MapFragment End Sub Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") Activity.LoadLayout("map") If MapFragment1.IsGooglePlayServicesAvailable = False Then ToastMessageShow("Please install Google Play Services.", True) End If End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub MapFragment1_Ready gmap = MapFragment1.GetMap rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION) Wait For Activity_PermissionResult (Permission As String, Result As Boolean) gmap.MyLocationEnabled = Result Dim m1 As Marker = gmap.AddMarker(10, 30, "test") m1.Snippet = "This is the snippet" End Sub **********End Code***************************************
Alexander Stolte Expert Licensed User Longtime User Jan 28, 2019 #10 Please use Code: Copy code here... tags when posting code. Upvote 0
Z Zeus Member Licensed User Longtime User Jan 28, 2019 #11 Code: Copy #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Private MySQL As JdbcSQL Private rp As RuntimePermissions End Sub Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Private gmap As GoogleMap Private MapFragment1 As MapFragment End Sub Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") Activity.LoadLayout("map") If MapFragment1.IsGooglePlayServicesAvailable = False Then ToastMessageShow("Please install Google Play Services.", True) End If End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub MapFragment1_Ready gmap = MapFragment1.GetMap rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION) Wait For Activity_PermissionResult (Permission As String, Result As Boolean) gmap.MyLocationEnabled = Result Dim m1 As Marker = gmap.AddMarker(10, 30, "test") m1.Snippet = "This is the snippet" End Sub Upvote 0
Code: Copy #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Private MySQL As JdbcSQL Private rp As RuntimePermissions End Sub Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Private gmap As GoogleMap Private MapFragment1 As MapFragment End Sub Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") Activity.LoadLayout("map") If MapFragment1.IsGooglePlayServicesAvailable = False Then ToastMessageShow("Please install Google Play Services.", True) End If End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub MapFragment1_Ready gmap = MapFragment1.GetMap rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION) Wait For Activity_PermissionResult (Permission As String, Result As Boolean) gmap.MyLocationEnabled = Result Dim m1 As Marker = gmap.AddMarker(10, 30, "test") m1.Snippet = "This is the snippet" End Sub
Z Zeus Member Licensed User Longtime User Jan 28, 2019 #12 this is the proyect sample Attachments FASM.zip FASM.zip 9.7 KB · Views: 550 Upvote 0
Jorge M A Well-Known Member Licensed User Longtime User Jan 29, 2019 #13 a) Be sure you are using latest GoogleMaps library v2.02 from here. b) Be sure set minSdkVersion="14" in your manifest file. c) Be sure your android.geo.API_KEY Your proyect is working fine here, with this changes. Upvote 0
a) Be sure you are using latest GoogleMaps library v2.02 from here. b) Be sure set minSdkVersion="14" in your manifest file. c) Be sure your android.geo.API_KEY Your proyect is working fine here, with this changes.
DonManfred Expert Licensed User Longtime User Jan 29, 2019 #14 Alexander Stolte said: tags when posting code. Click to expand... heeeeyyyy, these are MY pictures Upvote 0
Alexander Stolte Expert Licensed User Longtime User Jan 29, 2019 #15 DonManfred said: heeeeyyyy, these are MY pictures Click to expand... Yes i have bookmarked your comment this is the perfect tutorial! Upvote 0
DonManfred said: heeeeyyyy, these are MY pictures Click to expand... Yes i have bookmarked your comment this is the perfect tutorial!
Z Zeus Member Licensed User Longtime User Jan 29, 2019 #16 Jorge M A said: a) Be sure you are using latest GoogleMaps library v2.02 from here. b) Be sure set minSdkVersion="14" in your manifest file. c) Be sure your android.geo.API_KEY Your proyect is working fine here, with this changes. Click to expand... Tks Jorge I will try and i will back to coment, Tks a lot to every body for the help Victor, Alexander, DonManfred and Jorge Upvote 0
Jorge M A said: a) Be sure you are using latest GoogleMaps library v2.02 from here. b) Be sure set minSdkVersion="14" in your manifest file. c) Be sure your android.geo.API_KEY Your proyect is working fine here, with this changes. Click to expand... Tks Jorge I will try and i will back to coment, Tks a lot to every body for the help Victor, Alexander, DonManfred and Jorge
Z Zeus Member Licensed User Longtime User Jan 29, 2019 #17 i try your sugestion Jorge 1) Used GoogleMap 2.02 2) i Change the Mindskversion="14" in manifest 3) i put and test my google apy key (in other plataform like xojo for web developer work proyect work) But still blank maps, i read that posibly huawei have some problems with googlemap i will try in other devise Upvote 0
i try your sugestion Jorge 1) Used GoogleMap 2.02 2) i Change the Mindskversion="14" in manifest 3) i put and test my google apy key (in other plataform like xojo for web developer work proyect work) But still blank maps, i read that posibly huawei have some problems with googlemap i will try in other devise
Erel B4X founder Staff member Licensed User Longtime User Jan 29, 2019 #18 1. Check the unfiltered logs. 2. Make sure that you are using an Android key. Not a web key. 3. Download this APK and try it: www.b4x.com/android/files/googlemap.apk Upvote 0
1. Check the unfiltered logs. 2. Make sure that you are using an Android key. Not a web key. 3. Download this APK and try it: www.b4x.com/android/files/googlemap.apk
Z Zeus Member Licensed User Longtime User Jan 29, 2019 #19 Hi Erel Tks for the help we download the googlemap.apk that you mentions and work perfectly in the device we will try the android key now Upvote 0
Hi Erel Tks for the help we download the googlemap.apk that you mentions and work perfectly in the device we will try the android key now
DonManfred Expert Licensed User Longtime User Jan 29, 2019 #20 Zeus said: we will try the android key now Click to expand... if you did not used an Android key before than we have found the problem. The Googlemap tutorial i linked in #2 explicitely mention that you need to create an Android key. - Register your app in Google developer console: https://console.developers.google.com You need to enable Google Maps Android API. Then click on Credentials -> Create Credentials -> API Key -> Android Key. You should get a key that looks like: AIzaSyCmFHamGE0O0BvxxxxxxxxXbTCSrjFVg-Q Click to expand... Upvote 0
Zeus said: we will try the android key now Click to expand... if you did not used an Android key before than we have found the problem. The Googlemap tutorial i linked in #2 explicitely mention that you need to create an Android key. - Register your app in Google developer console: https://console.developers.google.com You need to enable Google Maps Android API. Then click on Credentials -> Create Credentials -> API Key -> Android Key. You should get a key that looks like: AIzaSyCmFHamGE0O0BvxxxxxxxxXbTCSrjFVg-Q Click to expand...