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

Customizing StreetViewPanorama


In this section, we are going to customize user-controlled features such as zoom gestures, pan gestures, navigation icons, and so on. We are going to learn about:

  • Disabling/enabling pan gestures

  • Disabling/enabling user navigation

  • Disabling/enabling zoom gestures

  • Disabling/enabling the street name

  • Working with click events

  • Listening to panorama change events

Disabling/enabling pan gestures

By default, pan gestures are enabled. These help us move around in the street view. To disable this, we can call the setPanningGesturesEnabled() method on the StreetViewPanorama object, which will take Boolean as a parameter. The code would be similar to:

        panorama.setPanningGesturesEnabled(false);

In the earlier code, the panorama is the StreetViewPanorama object.

Disabling/enabling user navigation

By default, user navigation is enabled and directional arrows are visible for navigation. Take a look at the following image:

In the earlier image, you can see the two directional arrows...