-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindexM.html
169 lines (146 loc) · 5.57 KB
/
indexM.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CBYC Smooth</title>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="./Qgis2threejs.css">
<link rel="stylesheet" type="text/css" href="./mobile.css">
<script defer src="./fontawesome/solid.min.js"></script>
<script defer src="./fontawesome/fontawesome.min.js"></script>
<script src="./threejs/three.min.js"></script>
<script src="./threejs/OrbitControls.js"></script>
<script src="./threejs/ViewHelper.js"></script>
<script src="./threejs/OutlineEffect.js"></script>
<script src="./proj4js/proj4.js"></script>
<script src="./Qgis2threejs.js"></script>
<script src="./threejs/DeviceOrientationControls.js"></script>
<script src="./mobile.js"></script>
</head>
<body>
<video id="video" autoplay></video>
<div id="view">
<div id="labels"></div>
<div id="northarrow"></div>
<div id="navigation"></div>
</div>
<!-- buttons -->
<button class="btn" id="stop-button" title="stop orbitting"><i class="fas fa-stop-circle fa-2x"></i></button>
<label class="switch" title="AR mode">
<div>AR</div>
<input type="checkbox" id="ar-checkbox">
<span class="slider"></span>
</label>
<button class="btn" id="current-location" title="move to current location"><i class="fas fa-crosshairs fa-2x"></i></button>
<div class="expand">
<input type="checkbox" id="expand-checkbox">
<label for="expand-checkbox" title="show/hide buttons">
<div class="btn btn1"><i class="fas fa-ellipsis-h fa-2x"></i></div>
</label>
<button class="btn btn2" id="layers-button" title="layer list"><i class="fas fa-layer-group fa-2x"></i></button>
<button class="btn btn3" id="settings-button" title="settings"><i class="fas fa-cog fa-2x"></i></button>
<button class="btn btn4" id="info-button" title="about this page"><i class="fas fa-info-circle fa-2x"></i></button>
</div>
<!-- layer list -->
<div id="layerlist" class="hidden"></div>
<!-- settings -->
<div id="settings" class="hidden">
<div>AR mode camera settings</div>
<div>
<div>
<label>
Enabled: <input type="checkbox" id="camera-enabled" checked disabled>
</label>
</div>
<div>
<label>
Field of View (in degrees): <input type="number" id="fov">
</label>
</div>
</div>
<div>
<label>
<input type="checkbox" id="save-in-storage"> Save settings in local storage
</label>
</div>
<div>
<button id="settings-ok">OK</button>
<button id="settings-cancel">Cancel</button>
</div>
</div>
<!-- popup -->
<div id="popup">
<div id="closebtn">×</div>
<div id="popupbar"></div>
<div id="popupbody">
<div id="popupcontent"></div>
<!-- query result -->
<div id="queryresult">
<table id="qr_layername_table">
<caption>Layer name</caption>
<tr><td id="qr_layername"></td></tr>
</table>
<table id="qr_coords_table">
<caption>Clicked coordinates</caption>
<tr><td id="qr_coords"></td></tr>
</table>
<!-- camera actions -->
<div class="action-btn action-zoom" onclick="app.cameraAction.zoomIn(); app.closePopup();">Zoom in here</div>
<div class="action-btn action-move" onclick="startARModeHere(); app.closePopup();">Start AR mode here</div>
<div class="action-btn action-move hidden" onclick="moveHere(); app.closePopup();">Move here</div>
<div class="action-btn action-orbit" onclick="app.cameraAction.orbit(); app.closePopup();">Orbit around here</div>
<!-- attributes -->
<table id="qr_attrs_table">
<caption>Attributes</caption>
</table>
</div>
<!-- page info -->
<div id="pageinfo">
<h1>Usage</h1>
<table id="usage">
<tr><td colspan="2" class="star">Non-AR mode</td></tr>
<tr><td>One Finger Move</td><td>Orbit</td></tr>
<tr><td>Two Fingers Pinch</td><td>Zoom</td></tr>
<tr><td>Two Fingers Move</td><td>Pan</td></tr>
</table>
<h1>About</h1>
<div id="about">
This page was made with <a href="https://www.qgis.org/" target="_blank">QGIS</a> and <a href="https://github.com/minorua/Qgis2threejs" target="_blank">Qgis2threejs</a> plugin (version 2.6).
<div>Powered by <a href="https://threejs.org/" target="_blank">three.js</a>,
<a href="https://trac.osgeo.org/proj4js/" target="_blank">Proj4js</a> and
<a href="https://fontawesome.com/" target="_blank">Font Awesome</a>.</div>
</div>
</div>
</div>
</div>
<!-- progress bar -->
<div id="progress"><div id="bar"></div></div>
<!-- header and footer -->
<div id="header"></div>
<div id="footer"></div>
<script>
Q3D.Config.autoZShift = true;
Q3D.Config.bgColor = 0x000000;
Q3D.Config.viewpoint = {lookAt:{x:0.0,y:0.0,z:0.0},pos:{x:-1.136926017404163,y:4.5515224033842,z:6.991983547141859}};
Q3D.Config.localMode = true;
Q3D.Config.AR.MND = 0.0;
var container = document.getElementById("view"),
app = Q3D.application;
app.init(container); // initialize viewer
init(); // initialization for mobile template (in mobile.js)
// load the scene
app.loadSceneFile("./data/indexM/scene.js", function (scene) {
// scene file has been loaded
app.start();
initLayerList(scene);
if ("AR" in app.urlParams) {
document.getElementById("ar-checkbox").checked = true;
startARMode();
moveToCurrentLocation();
}
}, function (scene) {
// all relevant files have been loaded
});
</script>
</body>
</html>