title: HTML onClick to get user location with geolocation
body: <pre><code>&lt;body&gt;
       &lt;script src="script.js"&gt;&lt;/script&gt;
       &lt;div id="map"&gt;Get your Location&lt;/div&gt;
       &lt;script async defer src="https://maps.googleapis.com/maps/api/js?key=(API_KEY)&amp;callback=getLocation"&gt;&lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I just want to create a button where upon clicking the "Get your Location" will go to the getLocation() function inside the my script.js. Right now, my code will just show where I am when loading the page, not after the button is clicked. Thanks</p>