title: Unable load google map by javascript? Of course I don't have an API key. but usually it shows for a second
body: <p><strong>JS Code</strong></p>
  
  <pre><code>&lt;script async defer src="https://maps.googleapis.com/maps/api/js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
  
                  function loadMap() {
                      console.log('ji');
                      var position = new google.maps.LatLng(17.412630, 78.447480);
                      var myOptions = {
                          zoom: 15,
                          center: position
                      };
                      var map = new google.maps.Map(document.getElementById("divami_location"), myOptions);
                      var myMarker = new google.maps.Marker({ 
                          position: position, 
                          map: map,
                          animation: google.maps.Animation.DROP,
                          title:"Software Private Limited",
                      });
                  }
  
      &lt;/script&gt;
  </code></pre>
  
  <p><strong>HTML code</strong></p>
  
  <pre><code>            &lt;a href="#contact" id="maps" onclick="loadMap()"&gt;&lt;div&gt;Contact&lt;/div&gt;&lt;/a&gt;
  </code></pre>
  
  <p>when I click console shows an error, that is, <strong>js:93 Uncaught TypeError: Cannot read property 'addEventListener' of undefined</strong>
  Please help me to solve this</p>