-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwo-layers.html
39 lines (38 loc) · 1.13 KB
/
two-layers.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE HTML>
<html>
<head>
<script src="http://www.webglearth.com/v2/api.js"></script>
<script>
function initialize() {
var options = {
sky: true,
atmosphere: true,
dragging: true,
tilting: true,
zooming: true,
center: [46.8011, 8.2266],
zoom: 2
};
earth = new WE.map('earth_div', options);
var natural = WE.tileLayer('http://data.webglearth.com/natural-earth-color/{z}/{x}/{y}.jpg', {
tileSize: 256,
tms: true
});
natural.addTo(earth);
var toner = WE.tileLayer('http://tile.stamen.com/toner/{z}/{x}/{y}.png', {
attribution: 'Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.',
opacity: 0.6
});
toner.addTo(earth);
}
</script>
<style>
html, body{padding: 0; margin: 0;}
#earth_div{top: 0; right: 0; bottom: 0; left: 0; position: absolute !important;}
</style>
<title>WebGL Earth API: Overlays</title>
</head>
<body onload="initialize()">
<div id="earth_div"></div>
</body>
</html>