O'Reilly logo

Android Programming: The Big Nerd Ranch Guide by Brian Hardy, Bill Phillips

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

36Using Maps

The next logical step for RunTracker is to show the user a map of his or her travels. Using the new Google Maps API (version 2), this is an easy task. In this chapter, you will create a new RunMapFragment class to display a map showing the track of the user’s run and interactive markers that indicate the start and end of the journey.

Before starting with the fun stuff, however, you must set up your project to use the Maps API.

Adding the Maps API to RunTracker

The Maps API (version 2) is provided by the Google Play services SDK, and has several requirements for both your development environment and your application.

Use a real device to test maps

The Google Play services SDK (and thus the Maps API) requires a real device running at least ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required