Book Image

Ionic Cookbook

By : Hoc Phan
Book Image

Ionic Cookbook

By: Hoc Phan

Overview of this book

Table of Contents (18 chapters)
Ionic Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding Google Maps with geocoding support


Many mobile apps today utilize different mapping features such as showing the current location, creating routes, and providing a suggestive business search. This recipe will show you how to use the Cordova Google Maps plugin to provide mapping support. For more information, visit https://github.com/wf9a5m75/phonegap-googlemaps-plugin.

You will create an app that can:

  • Display Google Maps in full screen with the ability to detect the current device location

  • Perform geocoding to find the address of any coordinate

  • Add a marker with any text

  • Abstract all mapping functions into a new <ion-map> directive and $ionicMap delegate

It is possible to use the HTML5 and JavaScript version of geolocation and maps, instead of Cordova plugins. However, you will see a negative impact on performance. It's very obvious that if you use the SDK, map rendering and optimization tends to be faster. In addition, HTML5 geolocation sometimes has some strange bugs that require...