Skip to content

Instantly share code, notes, and snippets.

@zross
Created September 25, 2013 13:24
Show Gist options
  • Save zross/6699520 to your computer and use it in GitHub Desktop.
Save zross/6699520 to your computer and use it in GitHub Desktop.
HTML: Google map boilerplate (full screen)
<!DOCTYPE html>
<html>
<head>
<title>HTML5</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=650, user-scalable=yes">
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false">
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<style>
html, body {
height: 100%;
margin: 0;
}
#mapcanvas{
height:100%;
}
</style>
<script>
var map;
$(document).ready(function(){
var mapOptions = {
zoom: 3,
center: new google.maps.LatLng(43, 0),
mapTypeId: google.maps.MapTypeId.TERRAIN
};
map=new google.maps.Map($('#mapcanvas')[0], mapOptions);
//*********************************************************************
// Add the layer showing the inventory
//*********************************************************************
});//end document ready
</script>
</head>
<body>
<div id="mapcanvas">
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment