When it comes to displaying Google Maps from within our own applications Android makes this wonderfully simple by providing the MapView widget, which we can treat just like we would any other View.
Unfortunately, because the data we are using belongs to Google, before we can begin working with maps we have to register for a Google API key. This is free and simple to do, as this recipe will demonstrate.
Before we start, you will need to know the whereabouts of the files that you use when signing an application. These are debug.keystore
and keytool.exe
. The debug.keystore
file can usually be found somewhere like C:\Users\<user>\.android\
on most PCs and keytool.exe
should be in your Java program files; on my machine it was in C:\Program Files\Java\jdk1.6.0_25\bin\
.
This exercise is designed to be run on an emulator. If you wish to run it on a handset then you will need to substitute debug.keystore
with your own keystore file, which you will have set...