The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


Mapping with Maps V2

One of Google’s most popular services — after search, of course – is Google Maps, where you can find everything from the nearest pizza parlor to directions from New York City to San Francisco (only 2,905 miles!) to street views and satellite imagery.

Android has had mapping capability from the beginning, with an API available to us as developers to bake maps into our apps. However, as we will see shortly, that original API was getting a bit stale.

In December 2012, Google released a long-awaited update to the mapping capabilities available to Android app developers. The original mapping solution, now known as the Maps V1, worked but had serious limitations. The new mapping solution, known as Maps V2, offers greater power and greater ease of handling common situations, though it too has its rough edges.

Prerequisites

Understanding this chapter requires that you have read the core chapters, along with the chapter on drawables. Also, one of the samples involves location tracking, and another of the samples involves the use of the animator framework.

One section involves the use of Picasso, covered in the chapter on Internet access.

This chapter also makes the occasional reference back to Maps V1 for comparisons, mostly for the benefit of developers already familiar with Maps V1 and looking to migrate to Maps V2. However, prior experience with Maps V1 is not necessary to understand this chapter.

A Brief History of Mapping on Android

The preview of this section was traded for a bag of magic beans.

Where You Can Use Maps V2

The preview of this section was eaten by a grue.

Licensing Terms for Maps V2

The preview of this section apparently resembled a Pokémon.

What You Need to Start

The preview of this section is unavailable right now, but if you leave your name and number at the sound of the tone, it might get back to you (BEEEEEEEEEEEEP!).

The Book Samples… And You!

The preview of this section will not appear here for a while, due to a time machine mishap.

Setting Up a Basic Map

The preview of this section was accidentally identified as an Android 'tasty treat' by the Cookie Monster.

Playing with the Map

The preview of this section was stepped on by Godzilla.

Map Tiles

The preview of this section apparently resembled a Pokémon.

Placing Simple Markers

The preview of this section is off trying to sweet-talk the Khaleesi into providing us with a dragon.

Seeing All the Markers

The preview of this section apparently resembled a Pokémon.

Flattening and Rotating Markers

The preview of this section is [REDACTED].

Sprucing Up Your “Info Windows”

The preview of this section is [REDACTED].

Images and Your Info Window

The preview of this section is in an invisible, microscopic font.

Setting the Marker Icon

The preview of this section will not appear here for a while, due to a time machine mishap.

Responding to Taps

The preview of this section is off trying to sweet-talk the Khaleesi into providing us with a dragon.

Dragging Markers

The preview of this section is sleeping in.

The “Final” Limitations

The preview of this section is being chased by zombies.

A Bit More About IPC

The preview of this section will not appear here for a while, due to a time machine mishap.

Finding the User

The preview of this section took that left turn at Albuquerque.

Drawing Lines and Areas

The preview of this section was traded for a bag of magic beans.

Gestures and Controls

The preview of this section did not survive Thanos's finger snap.

Tracking Camera Changes

The preview of this section was eaten by a grue.

Maps in Fragments and Pagers

The preview of this section was traded for a bag of magic beans.

Animating Marker Movement

The preview of this section apparently resembled a Pokémon.

Maps, of the Indoor Variety

The preview of this section will not appear here for a while, due to a time machine mishap.

Taking a Snapshot of a Map

The preview of this section was last seen in the Bermuda Triangle.

SupportMapFragment vs. MapView

The preview of this section is presently indisposed.

About That AbstractMapActivity Class…

The preview of this section was accidentally identified as an Android 'tasty treat' by the Cookie Monster.

Helper Libraries for Maps V2

The preview of this section is unavailable right now, but if you leave your name and number at the sound of the tone, it might get back to you (BEEEEEEEEEEEEP!).

Problems with Maps V2 at Runtime

The preview of this section left for Hollywood to appear in a reality TV show.

Problems with Maps V2 Deployment

The preview of this section was traded for a bag of magic beans.

What Non-Compliant Devices Show

The preview of this section was whisked away by a shark-infested tornado.

Mapping Alternatives

The preview of this section was fed to a gremlin, after midnight.