viewpoint.html
2.56 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="../../js/jquery-3.4.1.min.js"></script>
<script src="../../js/JavaScript.js"></script>
<script src="../../js/popupJS.js"></script>
<link rel="stylesheet" href="../../css/layer.css">
<link rel="stylesheet" href="../../icon/iconfont.css">
<style>
/* .jumpButton {} */
</style>
<script>
var viewarr = [];
var selectValue = -1;
function addView() {
var index = viewarr.length + 1;
var sgWorld = CreateSGObj();
viewarr.push({
index: index,
point: sgWorld.Navigate.GetPosition(0) //"视点" + index//
});
var str = "<li class='item'>" +
"<span class='check'>" +
"<input type='radio' class='checkStep' name='checkStep' />" +
"</span>" +
"<span class='time'>视点" + index + "</span>" +
"<span class='mode'>" +
"<span class='jumpButton' onclick='toview(this)''>跳转</span>" +
"</span></li>";
// $("#liitems").append(str);
$(".ul").append(str);
}
function delView() {
let delIndex = $('input[class="checkStep"]:checked').index('input[class="checkStep"]');
if (delIndex !== -1) {
viewarr.splice(delIndex, 1);
$(".item").eq(delIndex + 1).remove();
}
}
function toview(item) {
var index = $('.jumpButton').index(item);
var sgWorld = CreateSGObj();
sgWorld.Navigate.FlyTo(viewarr[index].point);
}
</script>
</head>
<body marginwidth="0" marginheight="0">
<!-- 视点管理 -->
<div id="mainDiv" class="dialog donghua">
<h1 class="title" onmousedown="MouseDown(event)" onmouseup="MouseUp(event)" onmouseout="MouseUp(event)">
视点管理<i class="guanbibtn" onclick="Close()">X</i>
</h1>
<div class="main">
<div class="tool">
<i class="iconfont icon-tianjia-" title="新增" onclick="addView()"></i>
<i class="iconfont icon-guanbi" title="删除" onclick="delView()"></i>
</div>
<ul class="ul" id="liitems">
<li class="item">
<span class="check"></span>
<span class="time">视点</span>
<span class="mode">操作</span>
</li>
</ul>
</div>
</div>
</body>
</html>