This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
263 lines (222 loc) · 12.1 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
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<title>Maa-amet 3D v2</title>
<link rel="icon" type="image/x-icon" href="./assets/favicon.ico?">
<!-- CSS custom -->
<link rel="stylesheet" href="style.css" />
<!-- CSS calcite -->
<script src="https://js.arcgis.com/calcite-components/1.11.0/calcite.esm.js" type="module"></script>
<!-- AMD import for Accessor only -->
<script src="https://js.arcgis.com/4.28/"></script>
<!-- ES6 for everything else -->
<script type="module" src="app.js"></script>
<!-- A simple windmill model -->
<script
src="https://developers.arcgis.com/javascript/latest/sample-code/scene-external-renderer/live/windmill.js"></script>
<!-- A simple fragment shader -->
<script id="shader-fs" type="x-shader/x-fragment">
precision mediump float;
varying vec3 vLightColor;
void main(void) {
gl_FragColor = vec4(vLightColor, 1.0);
}
</script>
<!-- A simple vertex shader -->
<script id="shader-vs" type="x-shader/x-vertex">
attribute vec3 aVertexPosition;
attribute vec3 aVertexNormal;
uniform mat4 uModelViewMatrix;
uniform mat4 uProjectionMatrix;
uniform mat3 uNormalMatrix;
uniform vec3 uAmbientColor;
uniform vec3 uLightingDirection;
uniform vec3 uDirectionalColor;
varying vec3 vLightColor;
void main(void) {
gl_Position = uProjectionMatrix * uModelViewMatrix * vec4(aVertexPosition, 1.0);
vec3 transformedNormal = normalize(uNormalMatrix * aVertexNormal);
float directionalLightWeighting = max(dot(transformedNormal, uLightingDirection), 0.0);
vLightColor = uAmbientColor + uDirectionalColor * directionalLightWeighting;
}
</script>
</head>
<body>
<calcite-shell content-behind id="calcite-shell">
<div slot="header" id="header">
<h2 id="header-title">
Maa-amet 3D
</h2>
<div id="in-ads-container"></div>
</div>
<calcite-shell-panel slot="panel-start" display-mode="float">
<calcite-action-bar slot="action-bar" class="responsive-action-bar">
<calcite-action data-action-id="layers" icon="layers" text="Layers" scale="l"></calcite-action>
<calcite-action data-action-id="layers-wms" icon="image-layer" text="WMS" scale="l"></calcite-action>
<calcite-action data-action-id="basemaps" icon="layer-basemap" text="Basemaps" scale="l">
</calcite-action>
<calcite-action data-action-id="elevation" icon="sky-plot" text="Elevation" scale="l"></calcite-action>
<calcite-action data-action-id="lineOfSight" icon="line-of-sight" text="Line of Sight" scale="l">
</calcite-action>
<calcite-action data-action-id="daylight" icon="date-time" text="Daylight" scale="l"></calcite-action>
<calcite-action data-action-id="elevationProfile" icon="altitude" text="Elevation profile" scale="l">
</calcite-action>
<calcite-action data-action-id="measurement" icon="measure" text="Measurements" scale="l">
</calcite-action>
<calcite-action data-action-id="shadowCast" icon="measure-building-height-shadow" text="Shadow cast"
scale="l">
</calcite-action>
<calcite-action data-action-id="slicing" icon="slice" text="Slicing" scale="l"></calcite-action>
<calcite-action data-action-id="sketching" icon="freehand" text="Sketch" scale="l">
</calcite-action>
<calcite-action data-action-id="information" icon="information" text="Information" scale="l">
</calcite-action>
<calcite-action id="share-tooltip" data-action-id="share" icon="share" text="Share" scale="l">
</calcite-action>
<calcite-tooltip reference-element="share-tooltip">
<span>Share a map</span>
</calcite-tooltip>
</calcite-action-bar>
<calcite-alert id="share-map-alert" auto-close auto-close-duration="fast" kind="success">
<div slot="message">Copied map location to the clipboard</div>
</calcite-alert>
<!-- Map-specific panels (each one provides a div for ArcGIS Maps SDK for JavaScript widgets) -->
<calcite-panel heading="Layers" height-scale="l" data-panel-id="layers" hidden>
<div id="layers-container"></div>
</calcite-panel>
<calcite-panel heading="WMS" height-scale="l" data-panel-id="layers-wms" hidden>
<div id="wms-layers-container"></div>
</calcite-panel>
<calcite-panel heading="Basemaps" height-scale="l" data-panel-id="basemaps" hidden>
<div id="basemaps-container">
</div>
<calcite-label layout="inline">
<calcite-checkbox id="basemapSwitch" scale="l"></calcite-checkbox>
No basemap
</calcite-label>
<calcite-slider id="opacitySlider" label-handles min=0 max=100 step=1 value=100></calcite-slider>
</calcite-panel>
<calcite-panel heading="Elevation settings" height-scale="l" data-panel-id="elevation" hidden>
<calcite-radio-button-group id="elevationModels" name="ElevationModels" layout="vertical">
<calcite-label layout="inline">
<calcite-radio-button id="dtmElevation" value="987798be0faa561d" checked></calcite-radio-button>
DTM
</calcite-label>
<calcite-label layout="inline">
<calcite-radio-button id="apElevation" value="bae50815bbab6ded"></calcite-radio-button>
Aluspõhi 50m
</calcite-label>
<calcite-label layout="inline">
<calcite-radio-button id="akElevation" value="974102ce30be63bb"></calcite-radio-button>
Aluskord 50m
</calcite-label>
</calcite-radio-button-group>
<calcite-label layout="inline">
<calcite-checkbox id="navigationUnderground" unchecked></calcite-checkbox>
Navigate underground
</calcite-label>
<calcite-label layout="inline">
<calcite-checkbox id="elevationInput" checked></calcite-checkbox>
Elevation
</calcite-label>
</calcite-panel>
<calcite-panel heading="Line of Sight" height-scale="l" data-panel-id="lineOfSight" hidden>
<div id="line-of-sight-container"></div>
<calcite-label>
Start coordinates
<form id="losForm">
<calcite-input-text id="xLOSstart" name="xLOSstart" prefix-text="X-coordinate" value="">
</calcite-input-text>
<calcite-input-text id="yLOSstart" name="yLOSstart" prefix-text="Y-coordinate" value="">
</calcite-input-text>
<calcite-input-text id="zLoSstart" name="zLOSstart" prefix-text="Z-coordinate" value="">
</calcite-input-text>
</form>
<calcite-button form="losForm" id="LoSstartBtn" name="LoSstartBtn" width="half">Submit
</calcite-button>
</calcite-label>
</calcite-panel>
<calcite-panel height-scale="l" data-panel-id="daylight" hidden>
<div id="daylight-container"></div>
</calcite-panel>
<calcite-panel heading="Elevation profile" height-scale="l" data-panel-id="elevationProfile" hidden>
<div id="elevation-profile-container"></div>
</calcite-panel>
<calcite-panel heading="Measurements" width-scale="s" height-scale="l" data-panel-id="measurement" hidden>
<calcite-action id="distanceButton" icon="measure-line" text="Measure line" text-enabled>
</calcite-action>
<calcite-action id="areaButton" icon="measure-area" text="Measure area" text-enabled></calcite-action>
<calcite-action id="clearButton" icon="trash" text="Clear" text-enabled></calcite-action>
<div id="measurement-container"></div>
</calcite-panel>
<calcite-panel height-scale="l" data-panel-id="shadowCast" hidden>
<div id="shadowcast-container"></div>
</calcite-panel>
<calcite-panel heading="Slicing" height-scale="l" data-panel-id="slicing" hidden>
<div id="slicing-container"></div>
</calcite-panel>
<calcite-panel heading="Sketching" height-scale="l" data-panel-id="sketching" hidden>
<div id="sketchPanel" class="esri-widget">
<div id="startbuttons">
<button id="point" data-type="point" class="esri-button starttool">
Draw a point of interest
</button>
<button id="line" data-type="polyline" class="esri-button starttool">
Draw a route
</button>
<button id="extrudedPolygon" data-type="polygon" class="esri-button starttool">
Draw a building
</button>
</div>
<div id="actionbuttons">
<button id="cancel" class="esri-button">Cancel</button>
<button id="done" class="esri-button">Done</button>
</div>
<div id="edgeoperationbuttons">
<div id="extrudeSliderContainer">
<div>Extrude value: <span id="extrude">10</span></div>
<div id="extrudeSlider"></div>
</div>
<br />Select the edge operation:
<div class="update-options" id="edge">
<button class="esri-widget--button edge-button" id="none-edge-button" value="none">
None
</button>
<button class="esri-widget--button edge-button edge-button-selected" id="split-edge-button"
value="split">
Split
</button>
<button class="esri-widget--button edge-button" id="offset-edge-button" value="offset">
Offset
</button>
</div>
Select the move operation:
<div class="update-options" id="shape">
<button class="esri-widget--button shape-button" id="none-shape-button" value="none">
None
</button>
<button class="esri-widget--button shape-button shape-button-selected"
id="move-shape-button" value="move">
Move
</button>
</div>
</div>
</div>
</calcite-panel>
<!-- Info panel (populates with info from the web map) -->
<calcite-panel id="information-panel" heading="Details" data-panel-id="information" hidden>
<div id="info-content">
<div id="item-description">
<!-- Dynamically populated -->
</div>
</div>
</calcite-panel>
<calcite-panel height-scale="l" data-panel-id="share" hidden closed>
</calcite-panel>
</calcite-shell-panel>
<div id="viewDiv" class="esri-widget">
</div>
</calcite-shell>
</body>
</html>