Book Image

Learning Android Google Maps

Book Image

Learning Android Google Maps

Overview of this book

This book helps you to overcome the most common problems faced by users and helps you create a successful map application without any hassle. The book starts with a brief description of how to set up an environment and obtain an API key to create your map application. This book will teach you about adding markers, overlays, and information windows to the map in detail. You will then dive deep into customizing various types of maps and working with location data and Google Street view. By the end of this book, you will be able to create succinct map applications in Android using Google maps efficiently.
Table of Contents (18 chapters)
Learning Android Google Maps
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Prerequisites


The first important step before proceeding is to specify the required permissions to access GPS data. Two new permissions are required. They are:

  • android.permission.ACCESS_COARSE_LOCATION

  • android.permission.ACCESS_FINE_LOCATION

Let's discuss what these permissions are for:

ACCESS_COARSE_LOCATION

This permission is used to retrieve the approximate location from cell phone towers and Wi-Fi.

ACCESS_FINE_LOCATION

This permission is used to retrieve the accurate location from GPS satellites, cell phone towers, and Wi-Fi.

We have learned about permissions in Chapter 2, Configuring an API Key and Creating Our First Map Application. Similarly, we add the permissions to the AndroidManifest.xml file.

The permissions are added as follows:

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

There are three ways we can work with location data:

  • Using the my location layer

  • Using the Android Location...