Skip to content

Instantly share code, notes, and snippets.

@lukearmstrong
Created October 31, 2013 12:51
Show Gist options
  • Save lukearmstrong/7249165 to your computer and use it in GitHub Desktop.
Save lukearmstrong/7249165 to your computer and use it in GitHub Desktop.
<!-- must define a width/height for this div in css -->
<div id="google-map"></div>
<script src="https://maps.googleapis.com/maps/api/js?sensor=true"></script>
<script type="text/javascript">
function initialize()
{
var latLng = new google.maps.LatLng(52.29538, -1.54200);
var mapOptions = {
center: latLng,
zoom: 16,
mapTypeId: google.maps.MapTypeId.ROADMAP,
scrollwheel: false
};
var map = new google.maps.Map(document.getElementById("google-map"), mapOptions);
var marker = new google.maps.Marker({
position: latLng,
map: map,
title: '20 Rugby Road, Milverton, Leamington Spa, Warwickshire, CV32 6DG'
});
}
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