-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
56 lines (46 loc) · 1.94 KB
/
index.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>Mi iTowns</title>
<!-- Hoja de estilo-->
<style type="text/css">
html {height: 100%}
body { margin: 0; overflow:hidden; height:100%}
#viewerDiv {
margin : auto auto;
width: 100%;
height: 100%;
padding: 0;
}
#menuDiv {position: absolute; top:0px; margin-left: 0px;}
</style>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="viewerDiv"></div>
<script src="itowns.js"></script>
<script type="text/javascript">
/* global itowns,document,GuiTools*/
var positionOnGlobe = { longitude: -74.00, latitude: 4.00, altitude: 25000000 };
// iTowns namespace defined here
// Cree un objeto de la division
var viewerDiv = document.getElementById('viewerDiv');
var globeView = new itowns.GlobeView(viewerDiv, positionOnGlobe);
// Promesa, carga el JSON
var promises = []
promises.push(itowns.Fetcher.json('Ortho.json').then(function(result) { return globeView.addLayer(result); }));
Promise.all(promises).then(function () {
menuGlobe.addImageryLayersGUI(globeView.getLayers(function (l) { return l.type === 'color'; }));
menuGlobe.addElevationLayersGUI(globeView.getLayers(function(l) { return l.type === 'elevation'; }));
console.info('menuGlobe initialized');
}).catch( function (e) { console.error(e) });
window.globeView = globeView;
</script>
</body>
</html>