-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
85 lines (74 loc) · 2.16 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
73
74
75
76
77
78
79
80
81
82
83
84
85
<!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">
<title>Calculate 3D heading and pitch</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.21/esri/css/main.css">
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<div id="viewDiv"></div>
<script>
var dojoConfig = {
async: 1,
packages: [
{
name: "toolkit",
location:
window.location.origin +
window.location.pathname.replace(/\/[^/]+$/, "") +
"/toolkit",
},
],
};
</script>
<script src="https://js.arcgis.com/4.21/"></script>
<script>
var root = document.getElementById("viewDiv");
require([
"esri/WebScene",
"esri/views/SceneView",
"./toolkit/DrawAirplaneViewModel.js",
], function (
WebScene,
SceneView,
DrawAirplaneViewModel
) {
/************************************************************
* Load a web scene and set it to the map property in a SceneView.
************************************************************/
const scene = new WebScene({
portalItem: {
id: "f2220db76c6448b4be8083d19ef4cf8d",
},
});
const view = new SceneView({
map: scene,
container: root,
environment: {
lighting: {
directShadowsEnabled: false,
},
},
});
window.view = view;
const vm = new DrawAirplaneViewModel({
view: view,
});
vm.start();
window.vm = vm;
});
</script>
</body>
</html>