Android Question Google Maps (SOLVED)

Intelemarketing

Active Member
Licensed User
Longtime User
I have downloaded and tested many (all I could find) sample projects to do with Google Maps. Some work, most do not, but all I want to do is display a map, preferably with a location point on it.
It needs to run with B4A (eventually B4i). I have samples which partially work on B4J using a Goggle API Key (which I have purchased), but the equivalent B4A app doesn't use an API Key and also does not work.

All I want is a simple project that actually works

I found this, which looks like it will do what I want, but it is not a project (I am too much of a learner at this stage)


Thanks for your continuing help and patience with my many questions
 

TILogistic

Expert
Licensed User
Longtime User
What would you like to do.

can i guide you

if you are going to develop cross-platform google map.

See;

 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
Upvote 0

Intelemarketing

Active Member
Licensed User
Longtime User
I tried this one a few times, and found that the B4J Project works perfectly ! However, with B4A, I only get a blank screen with the Google Logo, the + and - Google keys, and the icon to view your location. Basically a blank screen. Not sure why you need the Google API Key (which I have), for B4J, but not required for B4A.

On further testing I found that with B4J, the street view did not work - kept displaying multiple partial pictures which made no sense
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Not sure why you need the Google API Key (which I have), for B4J, but not required for B4A
B4J and B4A Google Maps are using different Api/Keys. B4J is using a Javascript-Api Key. for B4A you need a AndroidMaps key.

Installation instructions:

- 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
 
Upvote 0

Intelemarketing

Active Member
Licensed User
Longtime User
What's next - I 've done all that and still have the blank screen (I am trying to run the B4A app). I renamed the app before transferring to my phone as the app I registered with Google
 
Upvote 0

Intelemarketing

Active Member
Licensed User
Longtime User
Done this - what am I supposed to do with the key - it is not used in the B4A Code

Here's a bunch of stuff - thanks guys
 

Attachments

  • credentialsym.JPG
    credentialsym.JPG
    84.6 KB · Views: 163
  • GoogleMaps.zip
    11.2 KB · Views: 173
Upvote 0

Intelemarketing

Active Member
Licensed User
Longtime User
I inserted the code in the Manifest, then tried to recompile the program - It gave me the error below (Strange thing is that it says line 28 is the problem, when there are only 15 lines in the manifest). I'm sure you will know the reason why

Thanks
George
 

Attachments

  • manierror1.JPG
    manierror1.JPG
    89.4 KB · Views: 144
Upvote 0

Intelemarketing

Active Member
Licensed User
Longtime User
I'll look at that thanks, Erel

I also worked out how to add the information to the Manifest (Thanks oparra)

AddApplicationText(<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyA42KTVsMxxxxxxxxxxyYNdju1qkPQdTlU" />)
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
Many a times I have noted that members tend to skim the video tutorials and miss many important aspects.
They are more forth coming to tips given in text in the message itself.

May be we can make a text files of what Erel says in the video and put them here too. (Voice to Text)
Members can easily search the text too.
Though I check the tutorial video with 'cc' on, may be the full text will help members more.

Regards,

Anand
 
Upvote 0

Intelemarketing

Active Member
Licensed User
Longtime User
Well .... I finally got it to work
The key to the whole solution was to Register my B4A App with Google as an Android App (Requiring the use of the Android API). This then allowed me to get an API Key specific to Android. Having put this correctly into the Manifest, it all then worked.

Thank you oparra - Thank you Erel I am sure there will be more questions. (Sorry)
 
Upvote 0

Intelemarketing

Active Member
Licensed User
Longtime User
OK ... I have the basic project running
What is missing are the other buttons you normally get with Google maps

Map - Satellite - Terrain - FullScreen - StreetView - 2D - 3D - Rotation

How do I add these please ? (I could add buttons to deal with Map - Satellite - Terrain, possibly FullScreen - but StreetView and Rotation I am not sure, but I really need them)
 
Upvote 0
Top