Chapter 7

Using Google Maps

Google Maps is one of the many applications bundled with the Android platform. In addition to simply using the Maps application directly, you can also embed it into your own applications and make it do some very cool things. The Android SDK provides the MapView view, which displays a map (with data obtained from the Google Maps service).

This chapter contains various recipes on how to use Google Maps in your Android applications and programmatically perform the following:

  • Display the Google Maps using the MapView
  • Change the views of Google Maps
  • Obtain the latitude and longitude of locations in Google Maps
  • Perform geocoding and reverse geocoding (translating an address to latitude and longitude and vice versa)
  • Add markers to Google Maps

Get Android Application Development Cookbook: 93 Recipes for Building Winning Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.