-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobe.html
34 lines (33 loc) · 1.07 KB
/
globe.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
<!DOCTYPE html>
<html>
<head>
<title>WebGL Earth API: Cassini Terrestrial Globe</title>
<meta charset="utf-8"/>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<script src="http://www.webglearth.com/v2/api.js"></script>
<script>
function initialize() {
var mapBounds = [[-85, -180], [85, 180]];
var mapMinZoom = 0;
var mapMaxZoom = 5;
var center = [0, 0];
var options = {zoom: 0, position: center};
var earth = new WE.map('earth_div', options);
var layer = WE.tileLayer('http://tileserver.maptiler.com/cassini-terrestrial/{z}/{x}/{y}.jpg', {
bounds: mapBounds,
minZoom: mapMinZoom,
maxZoom: mapMaxZoom
});
layer.addTo(earth);
}
</script>
<style>
html, body{padding: 0; margin: 0;}
#earth_div{top: 0; right: 0; bottom: 0; left: 0;
background-color: #000; position: absolute !important;}
</style>
</head>
<body onload="initialize()">
<div id="earth_div"></div>
</body>
</html>