-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
executable file
·69 lines (61 loc) · 2.24 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Use correct character set. -->
<meta charset="utf-8">
<!-- Tell IE to use the latest, best version. -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>Fukuchiyama</title>
<script src="./Build/Cesium/Cesium.js"></script>
<style>
@import url(./Build/Cesium/Widgets/widgets.css);
html, body, #cesiumContainer {
width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
}
</style>
</head>
<body>
<div id="cesiumContainer"></div>
<script>
var viewer = new Cesium.Viewer('cesiumContainer', {
baseLayerPicker: true,
timeline : false,
animation : false,
homeButton: false,
vrButton: true,
geocoder:false,
sceneModePicker:false,
navigationHelpButton:false
});
viewer.camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(135.123896, 35.2930, 600.0),
complete : function() {
setTimeout(function() {
viewer.camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(135.123896, 35.2930, 600.0),
orientation : {
heading : Cesium.Math.toRadians(0.0), //回転
pitch : Cesium.Math.toRadians(-40.0), //角度(-50.0等)
},
easingFunction : Cesium.EasingFunction.LINEAR_NONE
});
}, 100);//easingFunction=時間
}
});
viewer.dataSources.add(Cesium.KmlDataSource.load("./KML/fukuchiyama.kmz"));
var img = document.createElement('img');
img.src = './img/legend.png';
viewer.container.appendChild(img)
//position overlay with CSS styling
img.style.position = 'absolute';
img.style.top = 0;
img.style.left = 0;
img.style.width = '30%';
img.style.height = '30%';
img.style['pointer-events'] = 'none';
</script>
</body>
</html>