Skip to content

Instantly share code, notes, and snippets.

@markhillard
Created March 12, 2017 05:36
Show Gist options
  • Save markhillard/e96ea0d3b6fc93e6b6679c630998b196 to your computer and use it in GitHub Desktop.
Save markhillard/e96ea0d3b6fc93e6b6679c630998b196 to your computer and use it in GitHub Desktop.
Google Maps Sandbox
<div id="map-canvas"></div>
var map;
// initialize map
function initMap() {
map = new google.maps.Map(document.getElementById('map-canvas'), {
zoom: 17,
center: {
lat: 32.752357,
lng: -79.874714
},
backgroundColor: '#fcfcfc',
scrollwheel: true,
fullscreenControl: true,
fullscreenControlOptions: true,
rotateControl: true,
rotateControlOptions: true,
tilt: 45
});
var marker = new google.maps.Marker({
map: map,
position: {
lat: 32.752357,
lng: -79.874714
},
title: 'Fort Sumter National Monument'
});
}
// load map
google.maps.event.addDomListener(window, 'load', initMap);
<script src="//maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
html,body,#map-canvas { height:100%; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment