Last active
November 15, 2016 21:50
-
-
Save ZachMoreno/1a62d94398ad9f060e27e6cb2a03316a to your computer and use it in GitHub Desktop.
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> | |
<html> | |
<head> | |
<title>Google Map Example</title> | |
<style> | |
html, | |
body, | |
#my-map { | |
height: 100vh; | |
width: 100vw; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="my-map"></div> | |
</body> | |
<!-- ADD YOU API KEY BELOW --> | |
<script src="https://maps.googleapis.com/maps/api/js?key=<YOUR-API-KEY>&callback=initMaps" async defer></script> | |
<script> | |
var myMap, | |
myMarker, | |
myCoords = {lat: 37.823779, lng: -122.230583}; | |
function initMaps() { | |
myMap = new google.maps.Map(document.getElementById('my-map'), { | |
center: myCoords, | |
zoom: 11, | |
mapTypeId: 'terrain', | |
zoomControl: true, | |
scrollwheel: false, | |
mapTypeControl: false, | |
scaleControl: false, | |
streetViewControl: false, | |
rotateControl: false, | |
fullscreenControl: false, | |
styles: [] | |
}); | |
myMarker = new google.maps.Marker({ | |
position: myCoords, | |
// icon: '', | |
map: myMap | |
}); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment