Summary

Location and maps can be very useful in some apps. A device’s location is acquired by listening to either the network or the GPS sensor. You can code the capability to acquire the device’s location whether you use maps or not. However, if you use maps, the code for determining your location is much simpler.

Icons can be placed on a map based on their GPS coordinates. The map object has a large number of classes that facilitate the manipulation of maps. Icons on a map are called markers. Markers can use the standard pin icon or a custom item supplied by the developer. Icons can also be made to display information about the location through the use of a title and snippets.

Using Google Maps in an Android requires significantly more setup ...

Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android 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.