Last active
March 10, 2020 11:33
-
-
Save joanbono/9c15acf62641698046ebdb4f8d69151c to your computer and use it in GitHub Desktop.
Google Maps API PoC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- This snippet is useful to verify if a found Google Maps API key can be used externally --> | |
<!-- Save this in a index.html file and run a local HTTP server --> | |
<!-- If Maps are loaded, then it works ¯\_(ツ)_/¯ --> | |
<html> | |
<head> | |
<title>External Google Maps API PoC</title> | |
<meta name="viewport" content="initial-scale=1.0"> | |
<meta charset="utf-8"> | |
<style> | |
#map { | |
height: 100%; | |
} | |
html, body { | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script> | |
var map; | |
function initMap() { | |
map = new google.maps.Map(document.getElementById('map'), { | |
center: {lat: -34.397, lng: 150.644}, | |
zoom: 8 | |
}); | |
} | |
</script> | |
<script src="https://maps.googleapis.com/maps/api/js?key=API_KEY_HERE&callback=initMap" | |
async defer></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment