Posts Tagged ‘Maps’

Google Maps on Android Checklist

December 30th, 2009 @ 5:27 pm

2

Google Maps Logo

Your making an Android app and want to take advantage of Google Maps, you’ve been bashing your head against the desk attempting to work out what is going wrong.

So welcome to this little checklist of things I’ve forgotten to do when doing this task:

  1. Right click on your project in eclipse and go to properties. Then under Android select Google APIs with the correct platform number, click apply then Ok
  2. Open up your Android Manifest file, under the application tab scroll to the bottom and under the Application Nodes click on Add, then double click on “Uses Library”, now for the name enter the following – com.google.android.maps
  3. Your activity which is going to be displaying the map isn’t a plain old activity, it needs to be a MapActivity like: public class MapExample extends MapActivity
  4. Finally your map view in the layout file should look something like <com.google.android.maps.MapView android:id=”@+id/mapview” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:clickable=”true” android:apiKey=”YOUR_API_KEY”/> where your api key can be found by doing as mentioned on the Google Maps site -http://code.google.com/android/maps-api-signup.html

This should get you up and running with lots of mappy goodness.

Tags: , ,
Posted in Uncategorized | 2 Comments »