Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Forked from almccon/.block
Last active March 8, 2018 03:01
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 wboykinm/b62556e9333a8bec57c9dacfa105eb6e to your computer and use it in GitHub Desktop.
Save wboykinm/b62556e9333a8bec57c9dacfa105eb6e to your computer and use it in GitHub Desktop.
WebGL Earth demo: Faraday light base
license: mit
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="http://www.webglearth.com/v2/api.js"></script>
<script>
function initialize() {
var options = { zoom: 3, position: [47.19537,-100.524404] };
var earth = new WE.map('earth_div', options);
var options = { bounds: [[-84, -179],[84, 179]],
minZoom: 2,
maxZoom: 18 };
var watercolor = WE.tileLayer('https://a.tiles.mapbox.com/v4/landplanner.f505d476/{z}/{x}/{y}@2x.png?access_token=pk.eyJ1IjoibGFuZHBsYW5uZXIiLCJhIjoicUtlZGgwYyJ9.UFYz8MD4lI4kIzk9bjGFvg', options);
watercolor.addTo(earth);
}
</script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0;font-family:sans-serif }
</style>
</head>
<body onload="initialize()">
<div id="earth_div" style="width:100%;height:100%;border:0px solid gray; padding:2px;"></div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment