How to do it...

Let's start an Ionic project from scratch and add Google Maps features, as follows:

  1. Create a blank Ionic project, as shown, and go to that folder:
    $ ionic start TaxiApp blank
    $ cd TaxiApp
  1. Replace the iOS platform with version 3.9.0 with the following command lines:
    $ ionic platform remove ios
    $ ionic platform add ios@3.9.0
    $ ionic platform add android
You have to pick ios@3.9.0 specifically because the current version of the Cordova Google Maps plugin only works with this version. Otherwise, your build will fail. You should experiment with the newest version if possible.
  1. Install the Google Maps plugin with your copied key replacing `YOUR_IOS_API_KEY_IS_HERE, as follows:
 $ cordova plugin add cordova-plugin-googlemaps ...

Get Ionic Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.