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

Creating our first map application


Creating our map application with Android Studio is very simple. Android Studio has inbuilt templates that help us to create our map application easily through some simple steps. The first method to do this is by editing the layout from the Android studio inbuilt template. Select File | New Project.

In the next screen, select the target Android SDK version and minimum Android SDK version that your application supports.

In the following screen, select activity as Google Maps Activity and select Next, as shown in the following image:

In the following screenshot, enter a name for activity and layout:

Finally, select Finish. Our map project will be created and all the permissions of the other components are added by default. Our job is to paste the API key to the google_maps_api.xml file, which is present in the folder res/values.

However, if you create an application in Eclipse, you need to add the permissions and other components manually and also configure Google...