GoogleMaps is not showing in ion-segment

I’d like to show GoogleMaps in ion-segment. My code so far:

   <ion-segment [(ngModel)]="dashboard" (change)="onSegmentChanged($event)">
        <ion-segment-button value="list">
        <ion-segment-button value="map">

  <div [ngSwitch]="dashboard">

    <div *ngSwitchCase="'list'">
        some content...
      <div *ngSwitchCase="'map'">
        <div #map id="map"></div>



initMap() {

        let LatLng = new google.maps.LatLng(52.491114, 13.394625);

        let mapOptions = {
            center: LatLng,
            zoom: 15,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        }; = new google.maps.Map(this.mapElement.nativeElement, mapOptions);

    onSegmentChanged($event) {
        if ($event == 'map') {



It’s related to this topic: How to call custom function after ngSwitch new view is created

But GoogleMaps is not showing. I’m new to ionic and angular, so I can not find any other solution. Can anybody help- I would really appreciate!