万本电子书0元读

万本电子书0元读

顶部广告

Learning Android Google Maps电子书

售       价:¥

3人正在读 | 0人评论 9.8

作       者:Raj Amal W.

出  版  社:Packt Publishing

出版时间:2015-09-30

字       数:146.6万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Integrate Google Maps with your Android application to offer feature-rich and interactive maps About This Book Set up the development environment and obtain the Google API key to create your first map application Create a cutting edge Google maps application by implementing all the concepts learned A step-by-step tutorial guide that is full of pragmatic examples Who This Book Is For If you are an Android developer and want to integrate maps into your application, then this book is definitely for you. This book is intended for novice Android application developers who would like to get up and running with map rich applications using Google Maps. Some basic development experience would be helpful but it's not a mandate. What You Will Learn Get to know about the basic development environment setup needed to create a successful map application Generate an SHA1 fingerprint, obtain an API key, and create a basic map application Detect different types of maps and implement them in your application Add information to your map such as markers, overlays, information windows, and shapes Explore the interaction with maps and work with gestures Change the different camera views in your map application Work with real-time GPS location data and implementing it in your application Apply Street View and integrate the StreetViewPanoroma fragment to your application Employ the native Google maps application to solve some of the tasks using intents Create a cutting edge Google maps application by implementing all the concepts learned In Detail 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 de*ion 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. Style and approach The book is tailored for the reader with a fundamental approach to Android Google Maps providing a step-by-step introduction to Android Google Maps. It focuses on simple, easy-to-understand examples that are pragmatic and serve as useful basis for real-world applications. Different topics are approached in a bottom-up fashion, gradually going from the simplest foundations to the most advanced features.
目录展开

Learning Android Google Maps

Table of Contents

Learning Android Google Maps

Credits

About the Author

About the Reviewer

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

1. Setting Up the Development Environment

The importance of Android Google Maps

An example of a map application

IDEs for developing Android applications

Android Studio

System requirements for Android Studio

Eclipse

Choosing one IDE over another

Setting up Android Studio

Windows

Mac OS X

Linux

Setting up Eclipse with the ADT plugin

Windows

Mac OS X

Linux

Downloading and setting up Google Play services

Downloading the Google APIs System Image

Setting up AVD for testing

Setting up AVD from Android Studio

Setting up AVD from Eclipse

Exploring Android Studio

Creating a sample application

Exporting the Android application as APK

Additional helpful stuff

Using Android Debug Bridge

Configuring JAVA environment variables

Android API levels

Self-test questions

Summary

2. Configuring an API Key and Creating Our First Map Application

Generating the SHA1 fingerprint

Windows

Linux

Mac OS X

Registering in the Google Developer Console

Configuring Google Play services

Android Studio

Eclipse

Adding permissions and defining the API key

Adding permissions

INTERNET

ACCESS_NETWORK_STATE

WRITE_EXTERNAL_STORAGE

READ_GSERVICES

Specifying the Google Play services version

Specifying the version 2 of OpenGL ES

Defining the API key

Creating our first map application

Working with a layout

Optional (for old APIs)

Working with the Activity class

Optional (for old APIs)

Adding MapFragment programatically

activity_maps.xml – code 3

Optional – for older APIs

Using the callback method

The GoogleMap object

Common problems and solutions

Self-test questions

Summary

3. Working with Different Map Types

The need for different types of maps

Delving into different types of maps and their differences

Normal map

Satellite map

Hybrid map

Terrain map

Implementing different types of maps

Using a normal map

Using a satellite map

Using a hybrid map

Using a terrain map

What if I don't need anything?

Working with indoor maps

Using the lite mode

Map types and constants

Self-test questions

Summary

4. Adding Information to Maps

Importance of adding information to a map

Adding information with markers

How to add a marker?

Customizing the marker

Changing the marker color

Changing the marker opacity

Using a custom image as a marker

Flattening a marker

Rotating a marker

Hiding a marker

Employing marker events

Marker click events

Marker drag events

Expanding markers with information windows

How to add an information window?

Showing/hiding an information window programmatically

Creating custom information windows

Working with shapes

Polyline

Creating a polyline

Polygons

Creating a polygon

Creating a hollow polygon

Circles

Creating a circle

Customizing the appearance of shapes

Changing the stroke color

Using a fill color

Changing the stroke width

Geodesic segments

Z-Index

Changing the visibility

Using overlays

Ground overlays

Adding a ground overlay

Positioning a ground overlay

Tile overlays

Tile coordinates and zoom levels

Removing a tile overlay

Clearing the cache

Self-test questions

Summary

5. Interacting with a Map

Need for interaction with a map

Working with UI controls

Zoom controls

Compass

The My Location button

Level picker

Custom applications

Working with the map toolbar

Working with gestures

Zoom gestures

Double tap

Two finger tap

Two finger pinch/stretch (pinch to zoom)

One finger zoom

Scroll gestures

Tilt gestures

Rotate gestures

Disabling/Enabling UI controls and gestures with XML attributes

Disabling/enabling the UI controls and gestures with the GoogleMapOptions object

Working with map events

Map click/long click events

Camera change events

Indoor map events

Using a Projection class

Creating a custom application

Self-test questions

Summary

6. Working with Custom Views

The need for different camera views

Working with camera positions

Target

Zoom

Bearing

Tilt

Moving the camera

Changing the zoom level in the current position

Changing the camera position

Using the CameraPosition class

Setting boundaries

Panning the map

Animating the camera

Map padding

Self-test questions

Summary

7. Working with Location Data

The need for location data

Prerequisites

ACCESS_COARSE_LOCATION

ACCESS_FINE_LOCATION

Using the my location layer

Using the Android Location API

Using the Google Play services Location API

Working with the Android Location API

Working with the Google Play services Location API

Getting the last known location

Location updates

Using reverse geocoding

Working with Geofences

Integrating location data with maps

Self-test questions

Summary

8. Know about the Street View

About Google Street View

Prerequisites

Implementing StreetViewPanoramaFragment

Adding StreetViewPanoramaFragment programmatically

Customizing StreetViewPanorama

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

Using custom camera views

Other functions

Orientation to point

Point to orientation

Getting the location

Self-test questions

Summary

9. Google Maps Intents

The need for Google Maps Intents

Defining Intent requests

Action

URI

Package

Display maps

Display maps with a specified zoom level

Searching for a location

Advanced search

Label location

Using navigation

Displaying StreetViewPanorama

Self-test questions

Summary

10. Creating a Custom Map Application

What the custom application does

What additional libraries/classes do we use

Prerequisites

Adding dependencies

Using the material design icons

Adding permissions

Defining the API key and Google Play services version

Implementation

Defining the app theme

Defining strings

Defining and creating a database

Creating layouts

Creating activities and fragments

Summary

A. Answers to Self-test Questions

Chapter 1, Setting Up the Development Environment

Chapter 2, Configuring an API Key and Creating Our First Map Application

Chapter 3, Working with Different Map Types

Chapter 4, Adding Information to Maps

Chapter 5, Interacting with a Map

Chapter 6, Working with Custom Views

Chapter 7, Working with Location Data

Chapter 8, Knowing about the Street View

Chapter 9, Google Maps Intents

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部