How it works...

The core of this app is mainly in the JavaScript code-home.ts. In order to use the plugin object, you should declare it on top, as shown here:

import {  GoogleMaps,GoogleMap,GoogleMapsEvent,GoogleMapOptions,  CameraPosition,LatLng,MarkerOptions,Marker} from '@ionic-native/google-maps';

While it might seem that there are a lot of moving parts, the basic flow is very simple, as listed here:

  1. Whenever Ionic and Cordova are ready, trigger platform.ready().then to initialize the map by calling showMap() in the constructor of the HomePage.
  2. When a user clicks on the button, the app will call getMyLocation to get the location data.
  3. The data will be used to create the marker and move the map's camera to center on that location.

It's ...

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.135.80