What is the Ionic-recommended lifecycle hook for loading a Google Map with Capacitor’s Google Maps plugin in an Ionic/Angular project?
Would that be ionViewDidEnter
rather than ngAfterViewInit
?
Let’s define near-term success as displaying a Google map on an IOS device when an application is opened by a user.
To play with this, I am using an Ionic/Angular blank starter project. I can follow the official video walk-through well enough to get a map to display from a button click (on an IOS device).
But creating maps from ngAfterViewInit
seems to be not working in IOS for a few people, including me. Maybe for different reasons or maybe because ngAfterViewInit
is not going to work in an Ionic/Angular-Capacitor project?
Borrowing from some other Youtube demos, I am doing better with ionViewDidEnter
. Maybe you have to be new to this to not know , but is that best practice?
Once I know I am using the correct hook, I will probably have some other questions relating to using the Capacitor Google Maps plugin.