Closed venkadesh-p closed 4 years ago
I have no problem at all. Could you add the screenshot for the first step?
Do you mean the landing page of the app? I am using it as a Modal page.
I have tried the same by creating a new sample app. Still, it is not working on iOS. But working in the browser. @wf9a5m75 I have attached my sample code. it is a single-page app. please check it.
Thank you for preparing, but please create a GitHub repo and put your code into them. Because I'm super busy. I can't open the zip file on my phone
The problem of your code is here.
ngOnInit() {
// Since ngOnInit() is executed before `deviceready` event,
// you have to wait the event.
this.platform.ready();
this.loadMap();
}
You need to wait the this.platform.ready()
.
ngOnInit() {
// Since ngOnInit() is executed before `deviceready` event,
// you have to wait the event.
this.platform.ready().then(() => {
this.loadMap();
});
}
Works correctly.
@wf9a5m75 If I use the map in ModalController, the map will not work?
No. Please understand how this plugin works.
ok thanks.
For anyone getting here: You can use GoogleMaps "within" Modals. The hack is to set "display: none" to the ion-router-outlet after the Modal is opened and remove it after the modal gets dismissed
I'm submitting a ... (check one with "x")
If you choose 'problem or bug report', please select OS: (check one with "x")
ionic info:
cordova information:
Current behavior: Google map is displaying in the browser but not displaying in iOS. It is showing a blank screen. I have checked the API key in google Maps console. It is enabled for iOS.
Expected behavior: It should display the map screen in ios.
Screen capture:
Related code: