-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.html
197 lines (179 loc) · 7.27 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="icon" href="data:,">
<title>Cesium KML-CZML Editor</title>
<link rel="stylesheet" href="js/cesium-1.105.1/Widgets/widgets.css">
<script src="js/cesium-1.105.1/Cesium.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<link rel="stylesheet" href="css/styles.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.js"></script>
<script src="js/lib/jscolor.js" type="module"></script>
<script src="js/customizations.js" type="module"></script>
</head>
<body>
<!-- Vuetify application start -->
<div id="editor" class="sidebar">
<v-app style="height: 90vh">
<!-- File Upload Section -->
<v-card color="grey lighten-1" flat class="mt-1 mb-1">
<v-toolbar dense flat dark color="black">
<v-toolbar-title>Import KML/CZML/GeoJSON</v-toolbar-title>
</v-toolbar>
<v-card-text
class="text-center pb-1 pt-2"
ref="uploadContainer"
id="uploadContainer"
:class="{dragover: dragover}"
>
<v-btn
small @click="$refs.uploadfile.click()"
class="input-text"
:style="{visibility: dragover ? 'hidden' : 'visible'}"
>
Drag here or select file
</v-btn>
<input v-show="false" type="file" ref="uploadfile" id="file" class="input-file"
multiple accept=".kml, .kmz, .json, .czml, .czmz, .geojson"></input>
</v-card-text>
</v-card>
<add-entities ref="addEntities" :kmlloaded="loadedFromFile"
@newentity="newEntity"
></add-entities>
<entities-list
:entities="entities"
:entity="entity"
@select="selectEntity"
></entities-list>
<!-- Editor Section -->
<v-card color="grey lighten-1" flat class="mb-1" v-if="entity && !isFolder(entity)">
<v-toolbar dense flat dark color="black">
<v-toolbar-title>Edit <entity-type-label :entity="entity"></entity-type-label></v-toolbar-title>
</v-toolbar>
<v-card-text class="pt-0 pb-1">
<div class="mt-2">
<span class="entity-name text-subtitle-1 font-weight-medium">{{ entity.name }}</span>
<v-btn
@click="flyToEntity();"
small
color="blue-grey"
class="mx-2 white--text entity-flyto"
>
FlyTo
<v-icon right small dark>mdi-send</v-icon>
</v-btn>
</div>
<entity-info :entity="entity"></entity-info>
<billboard-editor v-if="entity.billboard"
:entity="entity"
:billboard="entity.billboard"
:advanced="advanced"
@update="updateHandler">
<template v-slot:advancetoggle>
<v-switch hide-details id="advanced" class="v-input--reverse py-2 my-0"
label="Advanced Editor:" v-model="advanced"></v-switch>
</template>
</billboard-editor>
<polygon-editor v-if="entity.polygon"
:entity="entity"
:polygon="entity.polygon"
:advanced="advanced"
@update="updateHandler"
>
<template v-slot:advancetoggle>
<v-switch hide-details id="advanced" class="v-input--reverse py-0 my-0"
label="Advanced Editor:" v-model="advanced"></v-switch>
</template>
</polygon-editor>
<rectangle-editor v-if="entity.rectangle"
:entity="entity"
:polygon="entity.rectangle"
:advanced="advanced"
@update="updateHandler"
>
<template v-slot:advancetoggle>
<v-switch hide-details id="advanced" class="v-input--reverse py-0 my-0"
label="Advanced Editor:" v-model="advanced"></v-switch>
</template>
</rectangle-editor>
<polyline-editor v-if="entity.polyline && !entity.billboard"
:entity="entity"
:polyline="entity.polyline"
:advanced="advanced"
@update="updateHandler"
>
<template v-slot:advancetoggle>
<v-switch hide-details id="advanced" class="v-input--reverse py-0 my-0 mt-2"
label="Advanced Editor:" v-model="advanced"></v-switch>
</template>
</polyline-editor>
<model-editor v-if="entity.model"
:entity="entity"
:model="entity.model"
:advanced="advanced"
@update="updateHandler"
>
<template v-slot:advancetoggle>
<v-switch hide-details id="advanced" class="v-input--reverse py-0 my-0 mt-2"
label="Advanced Editor:" v-model="advanced"></v-switch>
</template>
</model-editor>
<label-editor v-if="entity.label"
:entity="entity"
:label="entity.label"
:advanced="advanced"
@update="updateHandler"
>
<template v-slot:advancetoggle>
<v-switch hide-details v-if="!entity.billboard" id="advanced" class="v-input--reverse py-0 my-0 mt-2"
label="Advanced Editor:" v-model="advanced"></v-switch>
</template>
</label-editor>
</v-card-text>
<v-card-actions class="pt-0 pb-1">
<styles-dialog-container
:entity="entity"
:entities="entities"
:changes="changes"
v-if="!isFolder(entity)"
>
<template v-slot:buttonlabel class="pt-2">
Copy to other <entity-type-label :entity="entity"></entity-type-label>
</template>
</styles-dialog-container>
</v-card-actions>
</v-card>
<v-card color="grey lighten-1" flat class="mb-1" v-if="filename">
<v-toolbar dense flat dark color="black">
<v-toolbar-title>Group actions</v-toolbar-title>
</v-toolbar>
<v-card-actions class="pt-0 pb-1">
<v-btn small @click="clampPolygons">Clamp polygons</v-btn>
<v-btn small @click="createLabels">Create labels</v-btn>
</v-card-actions>
</v-card>
<!-- Export Section -->
<v-card color="grey lighten-1" flat class="mb-1" v-if="filename">
<v-toolbar dense flat dark color="black">
<v-toolbar-title>Export CZML</v-toolbar-title>
</v-toolbar>
<v-card-text class="text-center pb-1 pt-2">
<v-btn small @click="toCZML">Download as CZML</v-btn>
<v-btn small @click="toZIP">Download as ZIP CZML</v-btn>
</v-card-text>
</v-card>
</v-app>
<!-- AI Chat component -->
<div id="ai-chat-container" v-if="chatEnabled">
<ai-chat></ai-chat>
</div>
</div>
<div id="viewer"></div>
<script src="js/index.js" type="module"></script>
</body>
</html>