Skip to content

Instantly share code, notes, and snippets.

@theredstapler
Last active November 20, 2019 06:28
Show Gist options
  • Save theredstapler/10dfba15002f6cfa3c5b4e1f16f7557c to your computer and use it in GitHub Desktop.
Save theredstapler/10dfba15002f6cfa3c5b4e1f16f7557c to your computer and use it in GitHub Desktop.
Source code of Google Map API Embedding Tutorial by Red Stapler. View Tutorial at: https://redstapler.co/tutorials/google-maps-javascript-api-tutorial/
<html>
<head>
<script src="jquery-2.1.4.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
<style>
#map {
height: 500px;
}
</style>
</head>
<body>
<div id="navbar"><span>Google Maps - Javascript API</span></div>
<div id="wrapper">
<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: 9
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=API_KEY&callback=initMap"
async defer></script>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment