-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
72 lines (66 loc) · 2.71 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"
rel="stylesheet"
/>
<title>Mapa Territórios do Presente</title>
</head>
<body>
<div id="container" style="position: absolute; width: 100%; height: 100%;"></div>
</body>
<script type="text/javascript" src="./procedural-gl.js"></script>
<script type="text/javascript">
var container = document.getElementById('container');
var datasource = {
elevation: {
apiKey: '11eadde6a82ee4206b90f5f349b01259b',
},
imagery: {
apiKey: 'xzKVH4kVaBty0sgjUUqE',
urlFormat:
'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key={apiKey}',
attribution:
'<a href="https://www.maptiler.com/copyright/">Maptiler</a> <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
},
};
Procedural.init({ container, datasource });
Procedural.setCameraModeControlVisible(true);
Procedural.setCompassVisible(true);
Procedural.setUserLocationControlVisible(true);
Procedural.setRotationControlVisible(true);
Procedural.setZoomControlVisible(true);
var latitude = -20.297619;
var longitude = -40.295776;
Procedural.displayLocation({
latitude: latitude,
longitude: longitude,
});
window.Procedural = Procedural;
fetch('/data/conflitos.geojson')
.then((response) => response.json())
.then((json) => {
Procedural.addOverlay(json);
})
.catch((error) => {
console.log(error);
});
Procedural.onFeatureClicked = function ( id ) {
console.log( 'Feature clicked:', id );
switch (id) {
case 1000039: window.open("http://territoriosdopresente.ufes.br/manguezal-de-vitoria/");
case 1000023: window.open("https://territoriosdopresente.ufes.br/itapua/");
case 1000033: window.open("https://territoriosdopresente.ufes.br/canal-da-costa/");
case 1000015: window.open("https://territoriosdopresente.ufes.br/bairro-jesus-de-nazareth/");
case 1000027: window.open("https://territoriosdopresente.ufes.br/morro-da-fonte-grande/");
case 1000029: window.open("https://territoriosdopresente.ufes.br/po-preto/");
case 1000019: window.open("https://territoriosdopresente.ufes.br/jacarenema/");
case 1: window.open("http://territoriosdopresente.ufes.br/vale-do-mulemba/");
}
}
</script>
</html>