I have generated a Google Maps API key for my Android application. It works perfectly fine. Next, I want to use Google Maps in another application. So, what I did was simply copy paste the Google Maps API key from the first application's XML file to the second application's XML fi开发者_运维百科le. Strangely, the map view doesn't display anything but empty grids in the second application.
Note that I've allowed all the permissions in the manifest file.
Also, I want to know if the map key is portable between systems as the debug.keystore file changes between systems. I tried generating another map API key for my second application. But, that didn't quite help because Google gave me the same map key.
You should update the code to version 3 of the API. This does not need a key.
If you are using Google Maps JavaScript API v3 (which the current tags for the question indicate you are), then you do not need an API key for those maps. v2 required an API key, but v2 is deprecated.
(If you are using a non-JavaScript API for Maps, the google-maps-api-3 tag should be removed from the question.)
精彩评论