Created
September 7, 2010 21:08
-
-
Save willwhite/569105 to your computer and use it in GitHub Desktop.
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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<title>MapBox Afghanistan Winter with Google Maps API</title> | |
<script src="http://js.mapbox.com/g/2/mapbox.js" type="text/javascript"></script> | |
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAAyy_sg_kvGifscGkzZ2uxzxTGv8pFig_qdcIeIanIjQzecSm0lRRq4s4kzJSNgFaqRoQiY2UvM2DKJA" type="text/javascript"></script> | |
<link rel=stylesheet href="gmapbox.css" type="text/css" media=screen /> | |
</head> | |
<script type="text/javascript"> | |
function initialize() { | |
if (GBrowserIsCompatible()) { | |
var map = new GMap2(document.getElementById("map")); | |
// Add custom map type | |
var options = {minZoom: 5, maxZoom: 13}; | |
var custommap = GMapBox('afghanistan-grey', 'Afghanistan Grey', options); | |
map.setCenter(new GLatLng(34,65), 6) | |
map.addMapType(custommap); | |
map.setMapType(custommap); | |
map.setUIToDefault(); | |
// Add overlay: ethnic data | |
var options = {minZoom: 0, maxZoom: 12, overlay: true, type: 'png', opacity: 1.0}; | |
customoverlay = GMapBox('afghanistan-ethnic', 'Ethnic Data', options); | |
map.addOverlay(customoverlay); | |
} | |
else { | |
alert("The Google Maps API is not compatible with this browser"); | |
} | |
} | |
</script> | |
<body onload="initialize()" onunload="GUnload()"> | |
<div id="map" style="width: 900px; height: 600px"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment