Created
September 25, 2013 13:24
-
-
Save zross/6699520 to your computer and use it in GitHub Desktop.
HTML: Google map boilerplate (full screen)
This file contains 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>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