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

Working with camera positions


The position of the camera is based on the following parameters:

  • Target

  • Zoom

  • Bearing

  • Tilt

Let's discuss these parameters in detail.

Target

The target is a visible area on the map, which is specified by the latitude and longitude. Take a look at the following image:

In the image, the target is (40.735188, -74.172414), which are the coordinates for Newark City. The target is centered in the map.

Zoom

As the zoom level increases, the level of detail increases. Zoom can be used to display more accurate information to the user.

The image given in the previous section is a camera view with zoom level 2. However, the level of detail is very less. In order to display more detail, we will increase the zoom level. The following image is an example of this:

The zoom level of the image is 12.

As the zoom level increases by a factor of n, the width increases by a factor of 2 n.

Bearing

The term "bearing" is also called orientation. For a normal map, the bearing is zero degrees. It is the...