From 4b20fb96ba08f0c03b3a489ee3a24e5d19a3c741 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 18 Jun 2021 14:23:50 +0800
Subject: [PATCH] 空间分析细节调整
---
widgets/slope/css/style.css | 4 ++
widgets/spatialAnalysis/css/style.css | 1
widgets/slope/Widget.html | 4 +-
widgets/Tool/Widget.js | 16 +++++++
images/addL/draw.cur | 0
widgets/spatialAnalysis/Widget.js | 10 ++++
widgets/Tool/css/style.css | 2
widgets/slope/Widget.js | 40 ++++++++++++++++---
widgets/visibleArea/Widget.js | 6 +++
9 files changed, 71 insertions(+), 12 deletions(-)
diff --git a/images/addL/draw.cur b/images/addL/draw.cur
new file mode 100644
index 0000000..b885cd1
--- /dev/null
+++ b/images/addL/draw.cur
Binary files differ
diff --git a/widgets/Tool/Widget.js b/widgets/Tool/Widget.js
index f201ff9..d4b6ef3 100644
--- a/widgets/Tool/Widget.js
+++ b/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();
diff --git a/widgets/Tool/css/style.css b/widgets/Tool/css/style.css
index 9fe0356..9230563 100644
--- a/widgets/Tool/css/style.css
+++ b/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 {
diff --git a/widgets/slope/Widget.html b/widgets/slope/Widget.html
index 8c81bc2..8d65660 100644
--- a/widgets/slope/Widget.html
+++ b/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'> </span>"> </option>
<option value="2" data-content="<span class='label band2'> </span>"> </option>
<option value="3" data-content="<span class='label band3'> </span>"> </option>
diff --git a/widgets/slope/Widget.js b/widgets/slope/Widget.js
index 8ea8799..a5f81a5 100644
--- a/widgets/slope/Widget.js
+++ b/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 () {
diff --git a/widgets/slope/css/style.css b/widgets/slope/css/style.css
index dfb9df0..e589dbd 100644
--- a/widgets/slope/css/style.css
+++ b/widgets/slope/css/style.css
@@ -34,4 +34,8 @@
top: 85px;
left: 1.1%;
margin: 10px;
+}
+
+.drawCur {
+ cursor: url(../../../images/addL/draw.cur), auto;
}
\ No newline at end of file
diff --git a/widgets/spatialAnalysis/Widget.js b/widgets/spatialAnalysis/Widget.js
index c38abbc..448dc0b 100644
--- a/widgets/spatialAnalysis/Widget.js
+++ b/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();
diff --git a/widgets/spatialAnalysis/css/style.css b/widgets/spatialAnalysis/css/style.css
index bda1fd4..1012dc7 100644
--- a/widgets/spatialAnalysis/css/style.css
+++ b/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;
diff --git a/widgets/visibleArea/Widget.js b/widgets/visibleArea/Widget.js
index ffd7789..5d51872 100644
--- a/widgets/visibleArea/Widget.js
+++ b/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 () {
--
Gitblit v1.9.3