Created
March 25, 2018 02:30
-
-
Save hepplerj/958bdea511c6b16b1012ecf84a90758b to your computer and use it in GitHub Desktop.
WebGL Mapping
This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script src="http://www.webglearth.com/v2/api.js"></script> | |
<script> | |
function map() { | |
var options = { zoom: 1.5, position: [47.19537,8.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://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg', 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="map()"> | |
<div id="earth_div" style="width: 960px; height: 500px;"></div> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment