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

Using navigation


Till now, we have only learned about displaying locations, and searching for places of interest such as restaurants, beach resorts, and fuel filling stations using the native Google Maps application. Now, we are moving a step further. We are going to learn about navigation using the Google Maps application. It is a tedious task to design our own navigation application from scratch. So, if we want to develop and deploy an application as fast as possible, we can use the native Google Maps application. Let's learn about this in the forthcoming sections.

To search and display a location, we used the keyword geo in the Intent request. Similarly, now we need to use the google.navigation keyword.

Two parameters can be passed, they are:

  • q

  • mode

The street address, or the latitude and longitude coordinates, can be passed through the q parameter. The navigation modes can be passed through the mode parameter. Three values can be given to the mode parameter as follows:

  • d indicates driving

  • w...