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 the map toolbar


In the previous chapters, we worked with markers and a lite map. While working with markers, you may have noticed that when you click on one, two icons appear at the bottom right-hand corner. This is the map toolbar. When you click on the map toolbar, it opens the Google Maps application. The map toolbar disappears when the marker is out of focus.

This toolbar also appears in the lite mode by default.

The following screenshot displays the map toolbar in the bottom right-hand corner as the marker is clicked on:

If we do not want to display the map toolbar, we can disable it by calling the setMapToolbarEnabled() method on the UiSettings class by passing the Boolean value as false.

The code for the onMapReadyCallback() method is as follows:

 map.getUiSettings().setMapToolbarEnabled(false)