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 ...

Get Android Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.