Skip to content

Instantly share code, notes, and snippets.

@willwhite
Last active December 14, 2015 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willwhite/5169835 to your computer and use it in GitHub Desktop.
Save willwhite/5169835 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML>
<html>
<head>
<script src="http://www.webglearth.com/api.js"></script>
<style type="text/css" media="screen">
#earth_div {
width:600px;
height:400px;
border:1px solid gray;
padding:2px;
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(253,253,253)),
color-stop(0.15, rgb(253,253,253)),
color-stop(0.53, rgb(223,223,223)),
color-stop(0.56, rgb(255,255,255)),
color-stop(1, rgb(253,253,253))
);
background-image: -moz-linear-gradient(
center bottom,
rgb(253,253,253) 0%,
rgb(253,253,253) 15%,
rgb(223,223,223) 53%,
rgb(255,255,255) 56%,
rgb(253,253,253) 100%
);
}
</style>
<script>
function initialize() {
var earth = new WebGLEarth('earth_div', { zoom: 2 });
var customTMS = earth.initMap(WebGLEarth.Maps.CUSTOM, ['TMS','http://a.tiles.mapbox.com/v1/willwhite.map-ya618yqe/{z}/{x}/{y}.jpg',1,5,256,true]);
// name, url, minZoom, maxZoom, tileSize, flip-y-axis
earth.setBaseMap(customTMS);
}
</script>
</head>
<body onload="initialize()">
<div id="earth_div"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment