It is pleasant enough to be able to pan around and zoom into Google Maps but most useful applications require that a map opens at a specific location, either the user's location or a location set by the developer.
Here we will use the GeoPoint object to control the location displayed by our map.
Start up a library project by setting the build target as a Google API and, if you are not planning on testing this an a real handset, set up an Android Virtual Device to match.
Start by adding the following
<uses-library>
declaration to the<application>
element of the Android Manifest file of the project:<uses-library android:name="com.google.android.maps" />
Also include Internet permission as a child of the
<manifest>
element itself:<uses-permission android:name="android.permission.INTERNET" />
In the
main.xml
file create a MapView widget. Make it clickable and include your API key within it along...