The plugin seems incompatible with the Ionic 2/3 tabs component. The map is only rendered the first time the relevant tab is pressed. When navigating away and then back to the map page is it no longer displayed - just a blank screen is rendered.
Are there any work arounds for this? I have heard using Events to inform the tab component would be a solution?
Thanks
You need to remove before opening another tab using map.remove()
@wf9a5m75 I have tried this in both the below contexts on the maps page, however the issue still persists?
ionViewDidLeave() {
this.map.remove()
}
ionViewWillLeave() {
this.map.remove()
}
I have also this issue. How to proper remove map before switch tab ?
@boskiv I still have this issue, and haven't found anyone who has successfully used the maps plugin with Ionic tabs. @wf9a5m75 I don't believe it is possible to use this with tabs?
Could you give me more enough information?
Such as example code that reproduce your issue 100% without ionic.
@wf9a5m75 This is an issue _with_ using Ionic. It's due (apparently) to multiple maps not being supported by the plugin. The this.map.remove() method doesn't seem to address the issue.
The issue can only be seen on an actual device. I can provide an APK to test if you wish?
If the issue is ionic problem, I can not help. Because I'm NOT familiar with ionic.
You should ask at the ionic forum.
Anyway please make an apk that is very simple features (for example, only map and tab), and put it with full code to a github repository, then tell me the repository URL.
Don't share with your full app code. Please make a simple example code that reproduces your issue 100%.
@boskiv Do you have a simple example that I can also test?
Do you guys still face the same issue?
@wf9a5m75 What versions I need to check ?
At least this plugon works on ionic2.
If you don't face any problem now, you don't need to check
I had no problem with this, Ionic 2.x + map plugin 1.4. I used Ionic Native wrapper in a little bit different way:
this.map = new GoogleMaps(...);
Or you can follow this tutorial: https://www.joshmorony.com/ionic-2-how-to-use-google-maps-geolocation-video-tutorial/
Installing the v2 for the ionic framework, please check out this page.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/For-ionic2-users/README.md
If you have any problems, please file another issue. Thanks.
Most helpful comment
You need to remove before opening another tab using
map.remove()