New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google maps won't display on tab switch #7260
Comments
I think this is more of an issue with that project and not Ionic itself. Please create an issue on that repository. We have a conference app that uses a Google map in a tab and it works correctly: https://github.com/driftyco/ionic-conference-app If you're having issues with your own project I recommend asking on the forums: https://forum.ionicframework.com/ Thanks! |
@brandyscarney I think this issue is about the native component from 'ionic-native' which utilizes Google Maps mobile SDK (which is used in the example of the issue) instead of Google Maps Javascript SDK (which is used in this conference app). |
Thanks @560889223, I'll reopen this to look at it! |
I'd suggest to make it work through javascript again like before, it was much more easier than now, and actually the one I posted above is bugged. So if it get solved, will be awesome |
@Fel486 @brandyscarney The specific issue is that with app code from https://github.com/560889223/ionic2-google-maps (a fork of ZiFFeL1992) and ionic-angular@2.0.0-beta.10 (or ionic-angular@nightly, 20160713-something at the time of writing), when pushing the map page onto the navigation stack, the previous page were left in device screen, overlapping map page, as shown in this screenshot. I have figured out a way to hack current paging behavior to get correct result (as below), but I'd like to see if there is more through-thought solution out there and make it into official code base. export class HomePage {
// Collapsing other stuff ...
openMap() {
const useHack = true;
if (!useHack) {
this.nav.push(MapPage);
} else {
this.ionContent.getNativeElement().hidden = true;
this.nav.push(MapPage)
.then(() => {
const subscription = this.nav.viewWillEnter.subscribe(() => {
this.ionContent.getNativeElement().hidden = false;
subscription.unsubscribe();
});
});
}
}
} |
Has some one solution to that problem with tabs/modals? |
Hello all! Is this still an issue? |
Hello all! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic! |
@560889223 is on the right track, see my solution below: If you are on a Map Page, click on another tab (Second Page) ,then ionic does set the new tab as root, but So to remedy this because I think ionic drops the ball after it removes the map page from the navstack, delete the map page DOM if it exists So do this before navigating to the Map Page from the Second Page:
|
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
I'm using this one:
If I put the map on first tab, it will show, but if I switch to the second and come back to the first tab, map won't show anymore and second tab content will still be shown above first's content (if I write a text), but map won't show anyway.
....
The text was updated successfully, but these errors were encountered: