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 stepped on by Godzilla.

Where You Can Use Maps V2

The preview of this section was stepped on by Godzilla.

Licensing Terms for Maps V2

The preview of this section was lost due to a rupture in the space-time continuum.

What You Need to Start

The preview of this section is sleeping in.

The Book Samples… And You!

The preview of this section is en route to Mars.

Setting Up a Basic Map

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

Playing with the Map

The preview of this section is en route to Mars.

Map Tiles

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

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 is out seeking fame and fortune as the Dread Pirate Roberts.

Flattening and Rotating Markers

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

Sprucing Up Your “Info Windows”

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

Images and Your Info Window

The preview of this section is presently indisposed.

Setting the Marker Icon

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

Responding to Taps

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

Dragging Markers

The preview of this section was lost in the sofa cushions.

The “Final” Limitations

The preview of this section was the victim of a MITM ('Martian in the middle') attack.

A Bit More About IPC

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

Finding the User

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

Drawing Lines and Areas

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

Gestures and Controls

The preview of this section is being chased by zombies.

Tracking Camera Changes

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

Maps in Fragments and Pagers

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

Animating Marker Movement

The preview of this section is [REDACTED].

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 is in an invisible, microscopic font.

SupportMapFragment vs. MapView

The preview of this section was stepped on by Godzilla.

About That AbstractMapActivity Class…

The preview of this section is being chased by zombies.

Helper Libraries for Maps V2

The preview of this section was lost in the sofa cushions.

Problems with Maps V2 at Runtime

The preview of this section was the victim of a MITM ('Martian in the middle') attack.

Problems with Maps V2 Deployment

The preview of this section was abducted by space aliens.

What Non-Compliant Devices Show

The preview of this section is out seeking fame and fortune as the Dread Pirate Roberts.

Mapping Alternatives

The preview of this section is in the process of being translated from its native Klingon.