# Google Maps showing blank

**URL:** <https://forum.ionicframework.com/t/google-maps-showing-blank/170918>\
**Category:** Ionic Framework\
**Created:** [August 10, 2019, 4:24pm UTC](https://forum.ionicframework.com/t/google-maps-showing-blank/170918 "2019-08-10T16:24:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DSA2](https://avatars.discourse-cdn.com/v4/letter/d/9de053/32.png) [@DSA2](https://forum.ionicframework.com/u/DSA2)\
**Post date:** [August 10, 2019, 4:24pm UTC](https://forum.ionicframework.com/t/google-maps-showing-blank/170918/1 "2019-08-10T16:24:04Z")

</div>

Hi,

I am new to ionic. I have created a project and tried to use Google Maps Javascript API. When I comppile my app and run it in Chrome browser, there is not error but map is not getting displayed. The code is as follows:

```auto
import { Component, OnInit, ViewChild } from '@angular/core';

@Component({
  selector: 'app-search',
  templateUrl: './search.page.html',
  styleUrls: ['./search.page.scss'],
})
export class SearchPage implements OnInit {
  myMap: any;
  @ViewChild('map', {static: false}) mapelement: any;

  constructor() {
   }

  ngOnInit() {
    // this.initMap();
  }

  ionViewDidEnter() {
    console.log('View did load initiated......');
    this.initMap();
  }

  initMap() {
    let coords = new google.maps.LatLng(51.6520, 0.7666);
    let mapOptions: google.maps.MapOptions = {
      center: {lat: 51.6520, lng: 0.7666},
      mapTypeId: google.maps.MapTypeId.ROADMAP,
      zoom: 14
    };

    this.myMap = new google.maps.Map(this.mapelement.nativeElement, mapOptions);
    let marker: google.maps.Marker = new google.maps.Marker({
      map: this.myMap,
      position: {lat: 51.6520, lng: 0.7666}
    });
  }
}

```

In index.html, I have added the Script code with maps API key. I tried to use debugger but there is no error, still map is not visible.

Regards.
