viewpoint.html 2.56 KB
<!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>