E
E
Edward Harutyunyan2017-02-10 11:36:49
Google Maps
Edward Harutyunyan, 2017-02-10 11:36:49

GoogleMaps API console error: TypeError: a is null?

When creating a map through the Google API, an error appears in the console: TypeError: a is null. HTML code:

<div id="map"></div>

<script type="text/javascript">
  var map;
  function initMap() {
    map = new google.maps.Map(document.getElementById('map}'), {
    center: {lat: -34.397, lng: 150.644},
    zoom: 8
    });
  }
</script>
<script async defer src="http://maps.googleapis.com/maps/api/js?key=(тут вставляю свой ключ)&callback=initMap">
</script>

And this is a standard design from Google. The error is found in the Google file itself. That same Google line:
Nf=function(){this.f=_.Kf("apiboot2",{startTime:_.Mf});_.Jf(this.f,"main");this.b=!1};Xf=function(){var a=Wf;a.b||(a.b=!0,_.Jf(a.f,"firstmap"))};_.Yf=function(a,b,c){if(a=a.fromLatLngToPoint(b))c=Math.pow(2,c),a.x*=c,a.y*=c;return a};_.$f=function(a){for(var b;b=a.firstChild;)_.Zf(b),a.removeChild(b)};_.Zf=function(a){a=new Gf(a);try{for(;;)_.z.clearInstanceListeners(a.next())}catch(b){if(b!==_.ag)throw b;}};

What could be the problem? Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question