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

Displaying StreetViewPanorama


Finally, we have reached the last, and one of the most exciting parts of this chapter. In this section, we are going to learn how to launch Street View for our Android application.

We need to use the google.streetview keyword.

The format should be as follows:

google.streetview:cbll=latitude,longitude&cbp=0,bearing,0,zoom,tilt
google.streetview:panoid=id&cbp=0,bearing,0,zoom,tilt

Now, let's discuss the parameters. They are as follows:

  • cbll: This parameter is compulsory. This parameter is used to specify the latitude and longitude as comma separated values. One thing to note is that Google Maps will display the panorama nearest to the specified location.

  • cbp: The cbp parameter is an optional one. This takes five values. This is used to specify the bearing, tilt, and zoom. The first and third parameters are not supported. Bearing, zoom, and tilt should be specified in the second, fourth, and fifth positions.

  • panoid: This parameter is compulsory. This is used to...