Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show a map in an Android mapactivity?

I have attached a mapview to my layout and have a it showing a compass and my current location. The problem I have is, that there is no street map shown in the view, so basically I just see the compass and my current location over a blank grid.

like image 745
Chiwai Chan Avatar asked Dec 30 '22 20:12

Chiwai Chan


2 Answers

When you run or debug through Eclipse your app is signed with your debug key which will have been automatically created. It is not the same as the key you sign your app with when releasing it.

You need to get an API key using your debug key.

See the 'Getting the MD5 Fingerprint of the SDK Debug Certificate' section on http://code.google.com/android/add-ons/google-apis/mapkey.html

Once you are ready to release your app, you replace the debug API key with the API key you are currently using.

like image 94
Intrications Avatar answered Jan 01 '23 10:01

Intrications


Make sure you have the INTERNET permission and a proper API key. Either of those will give you the blank grid effect.

http://code.google.com/android/add-ons/google-apis/mapkey.html

like image 26
CommonsWare Avatar answered Jan 01 '23 08:01

CommonsWare