Android: Maps is not getting displayed - android

I tried to add map activity in my android application. I generated the API key and without any error I have finished the coding but in my output I am not getting the map displayed only the grid lines are visible. Please help me to display the map or please help me with the codes. I have installed the respective Google libraries.

This problem is usually derived from a problem in referencing google-play-service library.
Take a look at this blog post I wrote on how to integrate Google Maps in your application, especially the first 3 steps:
Google Maps API V2
another cause of this could be that you haven't configured the Google API Console properly, so I suggest you to take a look at this guide as well:
Google Maps API V2 Key
another reason that may cause this is if you have some kind of problem in your permissions in the manifest file. You can look at the first guide for the needed permissions as well.

Related

Google's sample maps application from play services won't work

So I have been having problems getting maps to work on my project and could not figure out why it wouldn't work, so I tested out the maps test application that comes in the services add on for Android Studio but just the menu will work and it still gives me a blank screen for the map even though it shows no errors.
This is a very vague question, I know, but is there something I'm missing?
Did you get an API key for your application?
From https://developers.google.com/maps/documentation/android/intro#sample_code:
Add your own Google Maps Android API key. The package name for the demo app is com.example.mapdemo. Note that the demo app already includes an API key in its manifest file. You will need to replace the key with your own API key.

Google Api not loading

I have downloaded the Google Play Services SDK to use Google Maps in my app but when I try to import it, it doesn't find the file, even though the lib is there. Done so many times but all in vain.
Thanks
First of all you need to create the correct api key. If the key is wrong the map will not load. Follow this link. It teaches maps nicely: http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/

Google map api shows grid

I tried to integrate Google map API with android native application. But I got only grid only, I can't get the map. Please help me to solve this problem.
Grids are shown because your key is not correct.Use the true key for your project which is registered in Google Project Console.
If you are getting only grid instead of the map, usually it's Google Maps Authentication problem. To solve it I would suggest you to go over the following guide:
Google Maps API V2 key
Follow all the steps of the guide and reproduce the key.
Next, follow this guide as well:
Google Maps API V2
to create application that integrates Google Maps API V2. Don't forget to remove the current installed application completely because Google Maps V2 caches the key you used before.

Map Problems in Android

I am new in android programming, I had problem in showing Map with getting the location that is touched, could any one help. Here please me code bellow. Thank you in advance.
Note: I took the code from this site, I used displaying the Map and it was working but when I am trying to use the last code in the site for display the touch location, does not work.
After seeing the link you have given for code reference .i have seen that you are developing with the old outdated API V1 for android which will not work now because the new Maps API V2 for android is now applicable.
Find more about the new API HERE on Android Developer Site.
The API is now distributed as part of the Google Play services SDK,
which you can download with the Android SDK Manager.
Maps are now encapsulated in the MapFragment class, an extension of Android's Fragment class.
Now you can add a map as a piece of a larger Activity. With a
MapFragment object, you can show a map by itself on smaller screens,
such as mobile phones, or as a part of a more complex UI on
larger-screen devices, such as tablets.
Because maps are encapsulated in the MapFragment class, you can
implement them by extending the Android standard Activity class,
rather than extending the MapActivity used in version 1.
The Maps API now uses vector tiles. Their data representation is
smaller, so maps appear in your apps faster, and use less bandwidth.
Caching is improved, so users will typically see a map without empty areas.
Maps are now 3D. By moving the user's viewpoint, you can show the map with perspective.
See my blog posts i have tried to summarize all there is needed to build an App with Google Maps API V2 for Android.
Solution to Problems with Maps API V2(using google_play_services_lib).
Creating an Android App with Maps API V2 for minSDK=8 (Android 2.2 Froyo).
Creating an Android App with Maps API V2 for minSDK=11 (Android 3.0 HoneyComb).
I've played with the Google Maps Android Library V2 a bit.
Here is an example I did that works, see if it can help you.
I stripped out my own API key, but i've included many different parts including the need to setup:
http://www.digitalopium.com/android-google-maps-api-tutorial/
-Debug/Retail Certificates and the SHA-1 key
-Google Project and the Android Map API key
-Google Play services via the Android SDK
-Project setup including the manifest file and code snippets.
Google has changed the method of obtainig map keys, previously it was using MD5 fingerprint
Now you can follow the link to integrate the map
Integrating google maps in android applicaiton
This tutorial has a section about getting location from touched position. Hope it will help you. Google Maps Android v2 Tutorial

Google Map on Android

We have an application that uses google maps' api.
After following the tutorial on how to generate a keystore, fingerprint and api key here: http://code.google.com/android/add-ons/google-apis/mapkey.html. We have successfully run our application with maps showing.
But after sometime the map stop showing, I tried to create a new key using the same procedure but didn't work. Finally I tried creating on a new machine and it worked. Is anyone have any idea what's causing this problem?
Did you know that Google has limitation on request to be processed? While you run your application, how many request (roughly) google maps should serve then?
Please checkout Google Maps API FAQ

Categories

Resources