Google Map hide in page

I have two maps in my App, one map in HomePage and Page3, but when I use nav.push() the map in Page3 doesn’t work and more, when I back in my HomePage the my no show more

in HomePage

  addPosition() {
    let position = new google.maps.LatLng(-1.377280,-48.434706);
    let mapOptions = {
      zoom: 19,
      center: position,
      disableDefaultUI: true
    }
    this.map = new google.maps.Map(document.getElementById('map'), mapOptions);
    this.myMarker(position);
  }

in Page2 navigate to Page3:

navigatePage3(collect) {
    this.navCtrl.push('MapSelectivePage', {
      collect: collect
    })
  }

In what lifecycle event are you loading your map? You may need to initialize it in ionViewDidEnter as opposed to ionViewDidLoad (if that is in fact what you’re doing)

1 Like

thanks friend, well, I done, but I dont know if was the Id, because I have 2 maps in my projetct and my navigation is Tabs and I had put in ionViewDidLoad.
So, I change the Ids of div maps and now I’m use initialize in ngOnInit, now the 2 maps works fine