14.01.2013 Views

Android™ Application Development - Bahar Ali Khan

Android™ Application Development - Bahar Ali Khan

Android™ Application Development - Bahar Ali Khan

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7: Maps, Geocoding, and Location-Based Services<br />

3. Modify the main.xml layout resource to include a MapView using the fully qualifi ed class name.<br />

Be sure to include an android:apikey attribute within the com.android.MapView node. If<br />

you have an Android maps API key, use it here.<br />

<br />

<br />

<br />

<br />

<br />

4. Running the application now should display the original geolocation text, with a MapView<br />

beneath it, as shown in Figure 7-6.<br />

Figure 7-6<br />

229

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!