liuyg
2021-06-18 4b20fb96ba08f0c03b3a489ee3a24e5d19a3c741
空间分析细节调整
8 files modified
1 files added
83 ■■■■ changed files
images/addL/draw.cur patch | view | raw | blame | history
widgets/Tool/Widget.js 16 ●●●●● patch | view | raw | blame | history
widgets/Tool/css/style.css 2 ●●● patch | view | raw | blame | history
widgets/slope/Widget.html 4 ●●●● patch | view | raw | blame | history
widgets/slope/Widget.js 40 ●●●● patch | view | raw | blame | history
widgets/slope/css/style.css 4 ●●●● patch | view | raw | blame | history
widgets/spatialAnalysis/Widget.js 10 ●●●●● patch | view | raw | blame | history
widgets/spatialAnalysis/css/style.css 1 ●●●● patch | view | raw | blame | history
widgets/visibleArea/Widget.js 6 ●●●●● patch | view | raw | blame | history
images/addL/draw.cur
Binary files differ
widgets/Tool/Widget.js
@@ -55,6 +55,8 @@
                    topic.publish('closev', '');
                    // 关闭剖面
                    topic.publish('closep', '');
                    // 关闭坡度
                    topic.publish('closes', '');
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $(".jimu-widget-slope").hide();
@@ -83,6 +85,8 @@
                    topic.publish('closev', '');
                    // 关闭剖面
                    topic.publish('closep', '');
                    // 关闭坡度
                    topic.publish('closes', '');
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $(".jimu-widget-slope").hide();
@@ -110,6 +114,8 @@
                    topic.publish('closev', '');
                    // 关闭剖面
                    topic.publish('closep', '');
                    // 关闭坡度
                    topic.publish('closes', '');
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $(".jimu-widget-slope").hide();
@@ -137,6 +143,8 @@
                    topic.publish('closev', '');
                    // 关闭剖面
                    topic.publish('closep', '');
                    // 关闭坡度
                    topic.publish('closes', '');
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $(".jimu-widget-slope").hide();
@@ -166,6 +174,8 @@
                    topic.publish('closev', '');
                    // 关闭剖面
                    topic.publish('closep', '');
                    // 关闭坡度
                    topic.publish('closes', '');
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $(".jimu-widget-slope").hide();
@@ -196,6 +206,8 @@
                    topic.publish('closev', '');
                    // 关闭剖面
                    topic.publish('closep', '');
                    // 关闭坡度
                    topic.publish('closes', '');
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $(".jimu-widget-slope").hide();
@@ -221,9 +233,11 @@
                    $('.jimu-widget-CoorPosition').hide();
                    $('.jimu-widget-MapPrinting').hide();
                    // 关闭可视
                    // topic.publish('closev', '');
                    topic.publish('closev', '');
                    // 关闭剖面
                    topic.publish('closep', '');
                    // 关闭坡度
                    topic.publish('closes', '');
                    $(".jimu-widget-profileAnalysis").hide();
                    $(".jimu-widget-slope").hide();
                    $('.tool-y-box').stop().hide();
widgets/Tool/css/style.css
@@ -9,7 +9,7 @@
  border-radius: 6px 0 0 6px;
  text-align: center;
  cursor: pointer;
  z-index: 11 !important
  z-index: 13 !important
}
.jimu-widget-Tool .tool-bar {
widgets/slope/Widget.html
@@ -1,5 +1,5 @@
<div>
    <div id="float"">
    <div id="float">
        <div id="con">
            <label for="calMode">1、计算模式:</label>
            <select id="calMode">
@@ -19,7 +19,7 @@
            <label><input type="radio" id="showall" name="fill" checked="checked">填充颜色和坡向箭头</label>
            <label>4、颜色条带:</label>
            <div id="bar">
                <select id="colorTable1" class="selectpicker">
                <select id="colorTable12" class="selectpicker">
                    <option value="1" data-content="<span class='label band4'>&nbsp</span>">&nbsp</option>
                    <option value="2" data-content="<span class='label band2'>&nbsp</span>">&nbsp</option>
                    <option value="3" data-content="<span class='label band3'>&nbsp</span>">&nbsp</option>
widgets/slope/Widget.js
@@ -24,15 +24,15 @@
            },
            beginSlope: function () {
                console.log('beginSlope');
                // console.log('beginSlope');
                var that = this;
                var viewer = that.map;
                var scene = viewer.scene;
                scene.globe.enableLighting = true;
                //添加SuperMap iServer发布的影像服务
                viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
                    url: 'http://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace/datas/image'
                }));
                // viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
                //     url: 'http://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace/datas/image'
                // }));
                // viewer.scene.camera.setView({
                //     destination: Cesium.Cartesian3.fromDegrees(87.1, 27.8, 8000.0),
                //     orientation: {
@@ -54,7 +54,7 @@
                var wide;
                wide = Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION;
                slope.ColorTable = colorTable;
                slope.Opacity = 0.5;
                slope.Opacity = 1;
                function createTooltip(frameDiv) {//创建需要的函数
@@ -154,12 +154,18 @@
                });
                handlerPolygon.activate();
                document.getElementById("cance").onclick = function () {
                    // console.log('cance')
                    viewer.scene.globe.SlopeSetting = {
                        slopeSetting: slope,
                        analysisMode: Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE
                    };
                    handlerPolygon.polygon.show = false;
                    handlerPolygon.polyline.show = false;
                    scene.globe.enableLighting = false;
                    //关闭该绘画图层
                    // handlerPolygon.clear();
                };
                viewer._cesiumWidget._creditContainer.style.display = "none";
                $("#split").on("click", function () {
@@ -233,13 +239,13 @@
                    };
                }
                )
                $("#colorTable1").on("input change", function () {
                $("#colorTable12").on("input change", function () {
                    colorTable.remove(0);
                    colorTable.remove(20);
                    colorTable.remove(30);
                    colorTable.remove(50);
                    colorTable.remove(80);
                    var value = document.getElementById("colorTable1").selectedIndex;
                    var value = document.getElementById("colorTable12").selectedIndex;
                    switch (value) {
                        case 0:
                            colorTable.insert(0, new Cesium.Color(9 / 255, 9 / 255, 255 / 255));
@@ -292,6 +298,26 @@
                $('#toolbar').show();
                $('#btnContainer').show();
                $('#loadingbar').remove();
                that.handlerPolygon = handlerPolygon;
                that.viewer = viewer;
                that.scene = scene;
                that.slope = slope;
                topic.subscribe("closes", lang.hitch(this, this.closes));
            },
            handlerPolygon: '',
            viewer: '',
            scene: '',
            closes: function () {
                // 关闭绘画层
                this.viewer.scene.globe.SlopeSetting = {
                    slopeSetting: this.slope,
                    analysisMode: Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE
                };
                // handlerPolygon.polygon.show = false;
                // handlerPolygon.polyline.show = false;
                this.scene.globe.enableLighting = false;
                this.handlerPolygon.clear();
            },
            onOpen: function () {
widgets/slope/css/style.css
@@ -34,4 +34,8 @@
  top: 85px;
  left: 1.1%;
  margin: 10px;
}
.drawCur {
  cursor: url(../../../images/addL/draw.cur), auto;
}
widgets/spatialAnalysis/Widget.js
@@ -59,6 +59,8 @@
                    topic.publish('closev', '');
                    // 关闭剖面
                    topic.publish('closep', '');
                    // 关闭坡度
                    topic.publish('closes', '');
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $(".jimu-widget-slope").hide();
@@ -91,6 +93,8 @@
                    // topic.publish('closev', '');
                    // 关闭剖面
                    topic.publish('closep', '');
                    // 关闭坡度
                    topic.publish('closes', '');
                    $(".jimu-widget-profileAnalysis").hide();
                    $(".jimu-widget-slope").hide();
                    $('.tool-y-box').stop().hide();
@@ -115,6 +119,8 @@
                    topic.publish('closev', '');
                    // 关闭剖面
                    // topic.publish('closep', '');
                    // 关闭坡度
                    topic.publish('closes', '');
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-slope").hide();
                    $('.tool-y-box').stop().hide();
@@ -138,7 +144,9 @@
                    // 关闭可视
                    topic.publish('closev', '');
                    // 关闭剖面
                    topic.publish('closep', '');
                    topic.publish ('closep', '');
                    // 关闭坡度
                    // topic.publish('closes', '');
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $('.tool-y-box').stop().hide();
widgets/spatialAnalysis/css/style.css
@@ -33,6 +33,7 @@
  height: 40px;
  width: 100%;
  background-color: #39A5FD;
  box-shadow: 0 0 10px #39A5FD;
  color: #fff;
  font-size: 16px;
  line-height: 40px;
widgets/visibleArea/Widget.js
@@ -56,6 +56,7 @@
                // 先将此标记置为true,不激活鼠标移动事件中对可视域分析对象的操作
                scene.viewFlag = true;
                var pointHandler = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Point);
                // 创建可视域分析对象
                var viewshed3D = new Cesium.ViewShed3D(scene);
                var colorStr1 = viewshed3D.visibleAreaColor.toCssColorString();
@@ -313,6 +314,7 @@
                    viewer.entities.removeAll();
                    viewshed3D.distance = 0.1;
                    scene.viewFlag = true;
                    // pointHandler.clear();
                })
                $('.jimu-widget-visibleArea').find(".closes").click(function () {
@@ -321,23 +323,27 @@
                    viewer.entities.removeAll();
                    viewshed3D.distance = 0.1;
                    scene.viewFlag = true;
                    pointHandler.clear();
                })
                // console.log(scene)
                this.viewer = viewer;
                this.viewshed3D = viewshed3D;
                this.scene = scene;
                this.pointHandler = pointHandler;
                topic.subscribe("closev", lang.hitch(this, this.closev));
            },
            viewer: '',
            viewshed3D: '',
            scene: '',
            pointHandler: '',
            closev: function () {
                $(".jimu-widget-visibleArea").hide();
                $("#wrapper").hide();
                this.viewer.entities.removeAll();
                this.viewshed3D.distance = 0.1;
                this.scene.viewFlag = true;
                this.pointHandler.clear();
            },
            onOpen: function () {