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:
- Whenever Ionic and Cordova are ready, trigger platform.ready().then to initialize the map by calling showMap() in the constructor of the HomePage.
- When a user clicks on the button, the app will call getMyLocation to get the location data.
- The data will be used to create the marker and move the map's camera to center on that location.
It's ...