Skip to content

Instantly share code, notes, and snippets.

@jdsteinbach
Last active August 29, 2015 14:22
Show Gist options
  • Save jdsteinbach/10d953e73edaa83c13a9 to your computer and use it in GitHub Desktop.
Save jdsteinbach/10d953e73edaa83c13a9 to your computer and use it in GitHub Desktop.
Boilerplate Markup for Embedding a Google Map
<script src="http://maps.googleapis.com/maps/api/js"></script>
<script>
function initialize() {
var lat = '38.897922',
lng = '-77.036541',
loc = new google.maps.LatLng(lat, lng),
mapOptions = {
center: loc,
zoom: 15,
scrollwheel: false,
disableDefaultUI: true
},
map = new google.maps.Map(document.getElementById("map-embed"), mapOptions),
marker = new google.maps.Marker({
position: loc,
map: map,
title: 'Map Point Title'
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment