Last active
November 20, 2019 06:28
-
-
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/
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
<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