From d12e030d8a7690d79c5786bc2a786b6c21a24433 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 18 Jun 2021 16:31:13 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap

---
 config.json                                  |   18 +
 widgets/slope/css/style.css                  |   29 +
 widgets/Tool/Widget.html                     |    5 
 images/addL/draw.cur                         |    0 
 widgets/visibleArea/css/style.css            |    4 
 widgets/spatialAnalysis/manifest.json        |   17 +
 widgets/slope/Widget.js                      |   40 ++
 widgets/visibleArea/Widget.js                |    6 
 widgets/spatialAnalysis/nls/zh-cn/strings.js |    5 
 widgets/visualAngle/Widget.html              |   12 
 widgets/visualAngle/Widget.js                |  116 +++++---
 widgets/spatialAnalysis/css/style.css        |   75 +++++
 widgets/slope/Widget.html                    |    7 
 widgets/Tool/Widget.js                       |  147 +++++++---
 widgets/spatialAnalysis/Widget.js            |  213 ++++++++++++++++
 widgets/visualAngle/css/style.css            |   33 +-
 widgets/Tool/css/style.css                   |    4 
 widgets/spatialAnalysis/Widget.html          |   15 +
 widgets/profileAnalysis/css/style.css        |    4 
 widgets/spatialAnalysis/nls/strings.js       |    7 
 widgets/spatialAnalysis/nls/es/strings.js    |    5 
 21 files changed, 618 insertions(+), 144 deletions(-)

diff --git a/config.json b/config.json
index 205bc79..3e8f3e5 100644
--- a/config.json
+++ b/config.json
@@ -189,7 +189,14 @@
       },
       {
         "name": "视角底部按钮",
-        "uri": "widgets/visualAngle/Widget"
+        "uri": "widgets/visualAngle/Widget",
+        "position": {
+          "right": 168,
+          "top": 20,
+          "height": "36px",
+          "width": "142px",
+          "relativeTo": "map"
+        }
       },
       {
         "name": "图例",
@@ -217,9 +224,14 @@
       {
         "name": "搜索弹窗表格各项弹窗",
         "uri": "widgets/searchTabaPopup/Widget"
-      }, {
+      },
+      {
         "name": "图层管理",
         "uri": "widgets/Layermanagement/Widget"
+      },
+      {
+        "name": "空间分析",
+        "uri": "widgets/spatialAnalysis/Widget"
       },
       {
         "name": "可视化分析",
@@ -233,8 +245,6 @@
         "name": "剖面分析",
         "uri": "widgets/profileAnalysis/Widget"
       }
-
-
     ],
     "groups": [],
     "panel": {
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.html b/widgets/Tool/Widget.html
index f296b9a..7296661 100644
--- a/widgets/Tool/Widget.html
+++ b/widgets/Tool/Widget.html
@@ -10,9 +10,10 @@
 				<li class="sign-tool"><i></i> <span>我的标记</span></li>
 				<li class="CoorPosition-tool"><i></i> <span>坐标定位</span></li>
 				<li class="MapPrinting-tool"><i></i> <span>场景快照</span></li>
-				<li class="visibleArea-tool"><i></i> <span>可视分析</span></li>
+				<li class="spatialAnalysis-tool"><i></i> <span>空间分析</span></li>
+				<!-- <li class="visibleArea-tool"><i></i> <span>可视分析</span></li>
 				<li class="profileAnalysis-tool"><i></i> <span>剖面分析</span></li>
-				<li class="slope-tool"><i></i> <span>坡度分析</span></li>
+				<li class="slope-tool"><i></i> <span>坡度分析</span></li> -->
 				<!-- <li class="superposition-tool"><i></i> <span>叠加分析</span></li>
 				<li class="buffer-tool"><i></i> <span>缓冲分析</span></li> -->
 			</ul>
diff --git a/widgets/Tool/Widget.js b/widgets/Tool/Widget.js
index 590d014..d4b6ef3 100644
--- a/widgets/Tool/Widget.js
+++ b/widgets/Tool/Widget.js
@@ -55,10 +55,13 @@
 					topic.publish('closev', '');
 					// 关闭剖面
 					topic.publish('closep', '');
+					// 关闭坡度
+					topic.publish('closes', '');
 					$(".jimu-widget-visibleArea").hide();
 					$(".jimu-widget-profileAnalysis").hide();
 					$(".jimu-widget-slope").hide();
 					$('.tool-y-box').stop().hide();
+					$(".jimu-widget-spatialAnalysis").hide();
 
 					$('.jimu-widget-Measurement').show();
 
@@ -82,10 +85,13 @@
 					topic.publish('closev', '');
 					// 关闭剖面
 					topic.publish('closep', '');
+					// 关闭坡度
+					topic.publish('closes', '');
 					$(".jimu-widget-visibleArea").hide();
 					$(".jimu-widget-profileAnalysis").hide();
 					$(".jimu-widget-slope").hide();
 					$('.tool-y-box').stop().hide();
+					$(".jimu-widget-spatialAnalysis").hide();
 
 					topic.publish('openRolling', 'Rolling');
 
@@ -108,10 +114,13 @@
 					topic.publish('closev', '');
 					// 关闭剖面
 					topic.publish('closep', '');
+					// 关闭坡度
+					topic.publish('closes', '');
 					$(".jimu-widget-visibleArea").hide();
 					$(".jimu-widget-profileAnalysis").hide();
 					$(".jimu-widget-slope").hide();
 					$('.tool-y-box').stop().hide();
+					$(".jimu-widget-spatialAnalysis").hide();
 
 					topic.publish('openSplitScreen', 'SplitScreen');
 
@@ -134,10 +143,13 @@
 					topic.publish('closev', '');
 					// 关闭剖面
 					topic.publish('closep', '');
+					// 关闭坡度
+					topic.publish('closes', '');
 					$(".jimu-widget-visibleArea").hide();
 					$(".jimu-widget-profileAnalysis").hide();
 					$(".jimu-widget-slope").hide();
 					$('.tool-y-box').stop().hide();
+					$(".jimu-widget-spatialAnalysis").hide();
 
 					topic.publish('openSign', 'Sign');
 
@@ -162,10 +174,13 @@
 					topic.publish('closev', '');
 					// 关闭剖面
 					topic.publish('closep', '');
+					// 关闭坡度
+					topic.publish('closes', '');
 					$(".jimu-widget-visibleArea").hide();
 					$(".jimu-widget-profileAnalysis").hide();
 					$(".jimu-widget-slope").hide();
 					$('.tool-y-box').stop().hide();
+					$(".jimu-widget-spatialAnalysis").hide();
 
 					$('.jimu-widget-CoorPosition').show();
 
@@ -191,18 +206,20 @@
 					topic.publish('closev', '');
 					// 关闭剖面
 					topic.publish('closep', '');
+					// 关闭坡度
+					topic.publish('closes', '');
 					$(".jimu-widget-visibleArea").hide();
 					$(".jimu-widget-profileAnalysis").hide();
 					$(".jimu-widget-slope").hide();
 					$('.tool-y-box').stop().hide();
+					$(".jimu-widget-spatialAnalysis").hide();
 
 					$('.jimu-widget-MapPrinting').show();
 
 
 				})
-
-				// 可视分析
-				$('.visibleArea-tool').click(function () {
+				// 空间分析
+				$('.spatialAnalysis-tool').click(function () {
 					that.map.scene.globe.depthTestAgainstTerrain = true;
 					// 关闭量算
 					topic.publish('closeMeasurement', 'Measurement');
@@ -216,64 +233,92 @@
 					$('.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();
-
-					$(".jimu-widget-visibleArea").show();
+					$(".jimu-widget-visibleArea").hide();
+					
+					$(".jimu-widget-spatialAnalysis").show();
 				})
+
+				// // 可视分析
+				// $('.visibleArea-tool').click(function () {
+				// 	that.map.scene.globe.depthTestAgainstTerrain = true;
+				// 	// 关闭量算
+				// 	topic.publish('closeMeasurement', 'Measurement');
+				// 	// 关闭卷帘
+				// 	topic.publish('closeRolling', 'Rolling');
+				// 	// 关闭分屏
+				// 	topic.publish('closeSplitScreen', 'SplitScreen');
+				// 	// 关闭标记
+				// 	topic.publish('closeSign', 'Sign');
+				// 	topic.publish('closeFlyRoute', 'FlyRoute');
+				// 	$('.jimu-widget-CoorPosition').hide();
+				// 	$('.jimu-widget-MapPrinting').hide();
+				// 	// 关闭可视
+				// 	// topic.publish('closev', '');
+				// 	// 关闭剖面
+				// 	topic.publish('closep', '');
+				// 	$(".jimu-widget-profileAnalysis").hide();
+				// 	$(".jimu-widget-slope").hide();
+				// 	$('.tool-y-box').stop().hide();
+
+				// 	$(".jimu-widget-visibleArea").show();
+				// })
 				// 剖面分析
-				$('.profileAnalysis-tool').click(function () {
-					that.map.scene.globe.depthTestAgainstTerrain = true;
-					// 关闭量算
-					topic.publish('closeMeasurement', 'Measurement');
-					// 关闭卷帘
-					topic.publish('closeRolling', 'Rolling');
-					// 关闭分屏
-					topic.publish('closeSplitScreen', 'SplitScreen');
-					// 关闭标记
-					topic.publish('closeSign', 'Sign');
-					topic.publish('closeFlyRoute', 'FlyRoute');
-					$('.jimu-widget-CoorPosition').hide();
-					$('.jimu-widget-MapPrinting').hide();
-					// 关闭可视
-					topic.publish('closev', '');
-					// 关闭剖面
-					// topic.publish('closep', '');
-					$(".jimu-widget-visibleArea").hide();
-					$(".jimu-widget-slope").hide();
-					$('.tool-y-box').stop().hide();
+				// $('.profileAnalysis-tool').click(function () {
+				// 	that.map.scene.globe.depthTestAgainstTerrain = true;
+				// 	// 关闭量算
+				// 	topic.publish('closeMeasurement', 'Measurement');
+				// 	// 关闭卷帘
+				// 	topic.publish('closeRolling', 'Rolling');
+				// 	// 关闭分屏
+				// 	topic.publish('closeSplitScreen', 'SplitScreen');
+				// 	// 关闭标记
+				// 	topic.publish('closeSign', 'Sign');
+				// 	topic.publish('closeFlyRoute', 'FlyRoute');
+				// 	$('.jimu-widget-CoorPosition').hide();
+				// 	$('.jimu-widget-MapPrinting').hide();
+				// 	// 关闭可视
+				// 	topic.publish('closev', '');
+				// 	// 关闭剖面
+				// 	// topic.publish('closep', '');
+				// 	$(".jimu-widget-visibleArea").hide();
+				// 	$(".jimu-widget-slope").hide();
+				// 	$('.tool-y-box').stop().hide();
 
-					$(".jimu-widget-profileAnalysis").show();
-				})
+				// 	$(".jimu-widget-profileAnalysis").show();
+				// })
 				//坡度分析
-				$('.slope-tool').click(function () {
-					that.map.scene.globe.depthTestAgainstTerrain = true;
-					// 关闭量算
-					topic.publish('closeMeasurement', 'Measurement');
-					// 关闭卷帘
-					topic.publish('closeRolling', 'Rolling');
-					// 关闭分屏
-					topic.publish('closeSplitScreen', 'SplitScreen');
-					// 关闭标记
-					topic.publish('closeSign', 'Sign');
-					topic.publish('closeFlyRoute', 'FlyRoute');
-					$('.jimu-widget-CoorPosition').hide();
-					$('.jimu-widget-MapPrinting').hide();
-					// 关闭可视
-					topic.publish('closev', '');
-					// 关闭剖面
-					topic.publish('closep', '');
-					$(".jimu-widget-visibleArea").hide();
-					$(".jimu-widget-profileAnalysis").hide();
-					$('.tool-y-box').stop().hide();
+				// $('.slope-tool').click(function () {
+				// 	that.map.scene.globe.depthTestAgainstTerrain = true;
+				// 	// 关闭量算
+				// 	topic.publish('closeMeasurement', 'Measurement');
+				// 	// 关闭卷帘
+				// 	topic.publish('closeRolling', 'Rolling');
+				// 	// 关闭分屏
+				// 	topic.publish('closeSplitScreen', 'SplitScreen');
+				// 	// 关闭标记
+				// 	topic.publish('closeSign', 'Sign');
+				// 	topic.publish('closeFlyRoute', 'FlyRoute');
+				// 	$('.jimu-widget-CoorPosition').hide();
+				// 	$('.jimu-widget-MapPrinting').hide();
+				// 	// 关闭可视
+				// 	topic.publish('closev', '');
+				// 	// 关闭剖面
+				// 	topic.publish('closep', '');
+				// 	$(".jimu-widget-visibleArea").hide();
+				// 	$(".jimu-widget-profileAnalysis").hide();
+				// 	$('.tool-y-box').stop().hide();
 
-					$(".jimu-widget-slope").show();
-					topic.publish('getbeginSlope', this.beginSlope);
-				})
+				// 	$(".jimu-widget-slope").show();
+				// 	topic.publish('getbeginSlope', this.beginSlope);
+				// })
 
 			},
 
diff --git a/widgets/Tool/css/style.css b/widgets/Tool/css/style.css
index 9fe0356..d1a52a0 100644
--- a/widgets/Tool/css/style.css
+++ b/widgets/Tool/css/style.css
@@ -6,10 +6,10 @@
   /* 240px */
   background: rgb(254, 254, 254);
   color: #838383;
-  border-radius: 6px 0 0 6px;
+  /* 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/profileAnalysis/css/style.css b/widgets/profileAnalysis/css/style.css
index ed14706..ec68269 100644
--- a/widgets/profileAnalysis/css/style.css
+++ b/widgets/profileAnalysis/css/style.css
@@ -1,14 +1,14 @@
 .jimu-widget-profileAnalysis {
   position: fixed !important;
   top: 72px !important;
-  right: 60px !important;
+  right: 383px !important;
   width: 200px !important;
   height: 40px !important;
   background-color: rgb(255, 255, 255);
   font-size: 14px;
   color: rgb(0, 0, 0);
   font-size: 16px;
-  z-index: 11 !important;
+  z-index: 12 !important;
   border-radius: 10px;
   display: none;
   box-shadow: 0 0 8px #fff;
diff --git a/widgets/slope/Widget.html b/widgets/slope/Widget.html
index c761d59..8d65660 100644
--- a/widgets/slope/Widget.html
+++ b/widgets/slope/Widget.html
@@ -1,7 +1,6 @@
 <div>
-    <div id="float"
-        style="background:#95e8f9;width: 250px;height: 470px;top: 15px;left: 1.5%;opacity: 1">
-        <div id="con" style="background:#95e8f9;width: 230px;height: 450px;top: 85px;left: 1.1%;margin: 10px">
+    <div id="float">
+        <div id="con">
             <label for="calMode">1、计算模式:</label>
             <select id="calMode">
                 <option value="calModeall_plane">指定多边形区域</option>
@@ -20,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>
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 72da04a..e589dbd 100644
--- a/widgets/slope/css/style.css
+++ b/widgets/slope/css/style.css
@@ -1,14 +1,13 @@
 .jimu-widget-slope {
   position: fixed !important;
   top: 72px !important;
-  right: 60px !important;
+  right: 388px !important;
   width: 200px !important;
   height: 40px !important;
   background-color: rgb(255, 255, 255);
   font-size: 14px;
   color: rgb(0, 0, 0);
-  font-size: 16px;
-  z-index: 11 !important;
+  z-index: 12 !important;
   border-radius: 10px;
   display: none;
   box-shadow: 0 0 8px #fff;
@@ -17,6 +16,26 @@
 
 .jimu-widget-slope #float {
   position: relative !important;
-  top: 50px !important;
-  left: -60px !important;
+  top: -10px !important;
+  left: -50px !important;
+  background-color: rgb(255, 255, 255) !important;
+  font-size: 16px;
+  color: rgb(0, 0, 0);
+  border-radius: 5px;
+  box-shadow: 0 0 8px #fff;
+  width: 250px;
+  height: 470px;
+  opacity: 1;
+}
+
+.jimu-widget-slope #float #con {
+  width: 230px;
+  height: 450px;
+  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.html b/widgets/spatialAnalysis/Widget.html
new file mode 100644
index 0000000..b179d96
--- /dev/null
+++ b/widgets/spatialAnalysis/Widget.html
@@ -0,0 +1,15 @@
+<div>
+	<div class="heards">
+		空间分析
+		<i class="layui-icon closesspatialAnalysis">
+			&#x1006;
+		</i>
+	</div>
+	<div class="main">
+		<ul id="spatialAnalysis-main">
+			<!-- <li class="visibleArea-tool"><i></i> <span>可视分析</span></li>
+			<li class="profileAnalysis-tool"><i></i> <span>剖面分析</span></li>
+			<li class="slope-tool"><i></i> <span>坡度分析</span></li> -->
+		</ul>
+	</div>
+</div>
\ No newline at end of file
diff --git a/widgets/spatialAnalysis/Widget.js b/widgets/spatialAnalysis/Widget.js
new file mode 100644
index 0000000..448dc0b
--- /dev/null
+++ b/widgets/spatialAnalysis/Widget.js
@@ -0,0 +1,213 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright © 2019 zhongsong. All Rights Reserved.
+// 模块描述:显示坐标
+///////////////////////////////////////////////////////////////////////////
+define([
+	'dojo/_base/declare',
+	'dojo/_base/lang',
+	'dojo/_base/array',
+	'dojo/_base/html',
+	'dojo/topic',
+	'jimu/BaseWidget',
+	'jimu/utils',
+	'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css',
+	'libs/zTree_v3/js/jquery.ztree.all'
+],
+	function (declare,
+		lang,
+		array,
+		html,
+		topic,
+		BaseWidget,
+		aspect,
+		string,
+		utils
+	) {
+		return declare([BaseWidget], {
+			baseClass: 'jimu-widget-spatialAnalysis',
+			name: 'spatialAnalysis',
+			layers: {},
+			startup: function () {
+				var that = this;
+				// 暴露在外的接口
+
+				var domHtmls = [
+					{
+						name: '可视分析',
+						classs: 'visibleArea-tool'
+					}, {
+						name: '剖面分析',
+						classs: 'profileAnalysis-tool'
+					}, {
+						name: '坡度分析',
+						classs: 'slope-tool'
+					}
+				];
+				var dom = $('#spatialAnalysis-main');
+				var str = '';
+				for (var k in domHtmls) {
+					str += `<li class="${domHtmls[k].classs}">
+					 <i></i>
+					 <span>${domHtmls[k].name}</span>
+					 </li>`
+				}
+				dom.replaceWith(str);
+
+				$('.closesspatialAnalysis').click(() => {
+					$('.jimu-widget-spatialAnalysis').hide();
+					// 关闭可视
+					topic.publish('closev', '');
+					// 关闭剖面
+					topic.publish('closep', '');
+					// 关闭坡度
+					topic.publish('closes', '');
+					$(".jimu-widget-visibleArea").hide();
+					$(".jimu-widget-profileAnalysis").hide();
+					$(".jimu-widget-slope").hide();
+				})
+
+
+				// topic.subscribe("closeTool", lang.hitch(this, this.closeToolBox));
+				// this.inherited(arguments);
+				// $('.tool-bar .tool-btn span').click(function () {
+				// 	topic.publish('closeMap', this.name);
+				// 	topic.publish('closeZtree', this.name);
+				// 	$('.tool-y-box').toggle();
+				// })
+
+				// 可视分析
+				$('.visibleArea-tool').click(function () {
+					that.map.scene.globe.depthTestAgainstTerrain = true;
+					// 关闭量算
+					topic.publish('closeMeasurement', 'Measurement');
+					// 关闭卷帘
+					topic.publish('closeRolling', 'Rolling');
+					// 关闭分屏
+					topic.publish('closeSplitScreen', 'SplitScreen');
+					// 关闭标记
+					topic.publish('closeSign', 'Sign');
+					topic.publish('closeFlyRoute', 'FlyRoute');
+					$('.jimu-widget-CoorPosition').hide();
+					$('.jimu-widget-MapPrinting').hide();
+					// 关闭可视
+					// topic.publish('closev', '');
+					// 关闭剖面
+					topic.publish('closep', '');
+					// 关闭坡度
+					topic.publish('closes', '');
+					$(".jimu-widget-profileAnalysis").hide();
+					$(".jimu-widget-slope").hide();
+					$('.tool-y-box').stop().hide();
+
+					$(".jimu-widget-visibleArea").show();
+				})
+				// 剖面分析
+				$('.profileAnalysis-tool').click(function () {
+					that.map.scene.globe.depthTestAgainstTerrain = true;
+					// 关闭量算
+					topic.publish('closeMeasurement', 'Measurement');
+					// 关闭卷帘
+					topic.publish('closeRolling', 'Rolling');
+					// 关闭分屏
+					topic.publish('closeSplitScreen', 'SplitScreen');
+					// 关闭标记
+					topic.publish('closeSign', 'Sign');
+					topic.publish('closeFlyRoute', 'FlyRoute');
+					$('.jimu-widget-CoorPosition').hide();
+					$('.jimu-widget-MapPrinting').hide();
+					// 关闭可视
+					topic.publish('closev', '');
+					// 关闭剖面
+					// topic.publish('closep', '');
+					// 关闭坡度
+					topic.publish('closes', '');
+					$(".jimu-widget-visibleArea").hide();
+					$(".jimu-widget-slope").hide();
+					$('.tool-y-box').stop().hide();
+
+					$(".jimu-widget-profileAnalysis").show();
+				})
+				//坡度分析
+				$('.slope-tool').click(function () {
+					that.map.scene.globe.depthTestAgainstTerrain = true;
+					// 关闭量算
+					topic.publish('closeMeasurement', 'Measurement');
+					// 关闭卷帘
+					topic.publish('closeRolling', 'Rolling');
+					// 关闭分屏
+					topic.publish('closeSplitScreen', 'SplitScreen');
+					// 关闭标记
+					topic.publish('closeSign', 'Sign');
+					topic.publish('closeFlyRoute', 'FlyRoute');
+					$('.jimu-widget-CoorPosition').hide();
+					$('.jimu-widget-MapPrinting').hide();
+					// 关闭可视
+					topic.publish('closev', '');
+					// 关闭剖面
+					topic.publish ('closep', '');
+					// 关闭坡度
+					// topic.publish('closes', '');
+					$(".jimu-widget-visibleArea").hide();
+					$(".jimu-widget-profileAnalysis").hide();
+					$('.tool-y-box').stop().hide();
+
+					$(".jimu-widget-slope").show();
+					topic.publish('getbeginSlope', this.beginSlope);
+				})
+
+			},
+
+			closeToolBox: function (item) {
+				if (item != this.name) {
+					$('.tool-y-box').hide();
+				}
+			},
+
+			onOpen: function () {
+				//面板打开的时候触发 (when open this panel trigger)
+				// var domHtmls = [
+				// 	{
+				// 		name: '可视分析',
+				// 		classs: 'visibleArea-tool'
+				// 	}, {
+				// 		name: '剖面分析',
+				// 		classs: 'profileAnalysis-tool'
+				// 	}, {
+				// 		name: '坡度分析',
+				// 		classs: 'slope-tool'
+				// 	},
+				// ];
+				// var dom = $('#spatialAnalysis-main');
+				// var str = '';
+				// for (var k in domHtmls) {
+				// 	str += `<li class="${domHtmls[k].classs}"><i></i> <span>${domHtmls[k].name}</span></li>`
+				// }
+				// dom.replaceWith(str);
+			},
+
+			onClose: function () {
+				//面板关闭的时候触发 (when this panel is closed trigger)
+			},
+
+			onMinimize: function () {
+				this.resize();
+			},
+
+			onMaximize: function () {
+				this.resize();
+			},
+
+			resize: function () {
+
+			},
+
+
+			destroy: function () {
+				//销毁的时候触发
+				//todo
+				//do something before this func
+				this.inherited(arguments);
+			}
+
+		});
+	});
\ No newline at end of file
diff --git a/widgets/spatialAnalysis/css/style.css b/widgets/spatialAnalysis/css/style.css
new file mode 100644
index 0000000..1012dc7
--- /dev/null
+++ b/widgets/spatialAnalysis/css/style.css
@@ -0,0 +1,75 @@
+.jimu-widget-spatialAnalysis {
+  position: absolute !important;
+  font-size: 14px;
+  height: 398px !important;
+  width: 318px !important;
+  /* 240px */
+  background: rgb(254, 254, 254);
+  color: #838383;
+  border-radius: 6px;
+  text-align: center;
+  /* cursor: pointer; */
+  z-index: 11 !important;
+  top: 72px !important;
+  bottom: auto !important;
+  right: 60px !important;
+  left: auto !important;
+  box-shadow: 0 0 8px #fff;
+  display: none;
+}
+
+.jimu-widget-spatialAnalysis .closesspatialAnalysis {
+  position: absolute;
+  top: 0px;
+  right: 10px;
+  cursor: pointer;
+}
+
+.jimu-widget-spatialAnalysis .closesspatialAnalysis:hover {
+  color: red;
+}
+
+.jimu-widget-spatialAnalysis .heards {
+  height: 40px;
+  width: 100%;
+  background-color: #39A5FD;
+  box-shadow: 0 0 10px #39A5FD;
+  color: #fff;
+  font-size: 16px;
+  line-height: 40px;
+  border-radius: 6px 6px 0 0;
+}
+
+.jimu-widget-spatialAnalysis .main {
+  padding: 5px;
+  text-align: center;
+  overflow: hidden;
+  height: calc(100% - 40px);
+  width: 100%;
+  margin: 0;
+  overflow: auto;
+}
+
+.jimu-widget-spatialAnalysis li {
+  position: relative;
+  left: 6px;
+  top: 5px;
+  float: left;
+  cursor: pointer;
+  user-select: none;
+  min-width: 62px;
+  height: 96px;
+  width: 90px;
+  box-sizing: border-box;
+  margin: 0 10px 10px 0;
+  text-align: center;
+  padding-top: 12px;
+  border: 1px solid rgb(255, 255, 255);
+  box-shadow: 2px 2px 15px -5px #39A5FD;
+  color: #555
+}
+
+.jimu-widget-spatialAnalysis li:hover {
+  background-color: #ffffff;
+  box-shadow: 3px 3px 20px -4px #0b8af1;
+}
\ No newline at end of file
diff --git a/widgets/spatialAnalysis/manifest.json b/widgets/spatialAnalysis/manifest.json
new file mode 100644
index 0000000..9c8ed0c
--- /dev/null
+++ b/widgets/spatialAnalysis/manifest.json
@@ -0,0 +1,17 @@
+{
+  "name": "spatialAnalysis",
+  "2D": true,
+  "3D": true,
+  "platform": "HTML",
+  "version": "2.10",
+  "wabVersion": "2.10",
+  "author": "yuanjy",
+  "description": "",
+  "copyright": "",
+  "license": "",
+  "properties": {
+    "hasConfig": false,
+    "inPanel": false,
+    "hasVersionManager": false
+  }
+}
\ No newline at end of file
diff --git a/widgets/spatialAnalysis/nls/es/strings.js b/widgets/spatialAnalysis/nls/es/strings.js
new file mode 100644
index 0000000..e60f0f7
--- /dev/null
+++ b/widgets/spatialAnalysis/nls/es/strings.js
@@ -0,0 +1,5 @@
+define(
+   ({
+    _widgetLabel: "spatialAnalysis"
+  })
+);
\ No newline at end of file
diff --git a/widgets/spatialAnalysis/nls/strings.js b/widgets/spatialAnalysis/nls/strings.js
new file mode 100644
index 0000000..b96defe
--- /dev/null
+++ b/widgets/spatialAnalysis/nls/strings.js
@@ -0,0 +1,7 @@
+define({
+  root: ({
+    _widgetLabel: "spatialAnalysis"
+  }),
+  "es": 1,
+  "zh-cn": 1
+});
\ No newline at end of file
diff --git a/widgets/spatialAnalysis/nls/zh-cn/strings.js b/widgets/spatialAnalysis/nls/zh-cn/strings.js
new file mode 100644
index 0000000..8987272
--- /dev/null
+++ b/widgets/spatialAnalysis/nls/zh-cn/strings.js
@@ -0,0 +1,5 @@
+define(
+   ({
+    _widgetLabel: "空间分析"
+  })
+);
\ No newline at end of file
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 () {
 
diff --git a/widgets/visibleArea/css/style.css b/widgets/visibleArea/css/style.css
index ce45ef4..d3055f3 100644
--- a/widgets/visibleArea/css/style.css
+++ b/widgets/visibleArea/css/style.css
@@ -1,14 +1,14 @@
 .jimu-widget-visibleArea {
   position: fixed !important;
   top: 72px !important;
-  right: 60px !important;
+  right: 383px !important;
   width: 200px !important;
   height: 40px !important;
   background-color: rgb(255, 255, 255);
   font-size: 14px;
   color: rgb(0, 0, 0);
   font-size: 16px;
-  z-index: 11;
+  z-index: 12 !important;
   border-radius: 10px;
   display: none;
   box-shadow: 0 0 8px #fff;
diff --git a/widgets/visualAngle/Widget.html b/widgets/visualAngle/Widget.html
index dbef234..4f0b2e2 100644
--- a/widgets/visualAngle/Widget.html
+++ b/widgets/visualAngle/Widget.html
@@ -1,14 +1,14 @@
 <div>
-	<div class="visualAngleOnce v-a-One on">
+	<!-- <div class="visualAngleOnce v-a-One on" >
 		<img class="v-a-o-img" src="./images/自主体验-1.png" alt="">
-		<div class="v-a-o-title">自主体验</div>
-	</div>
+		<div class="v-a-o-title">自主</div>
+	</div> -->
 	<div class="visualAngleOnce v-a-Two">
 		<img class="v-a-o-img" src="./images/漫游体验.png" alt="">
-		<div class="v-a-o-title">漫游体验</div>
+		<div class="v-a-o-title">漫游</div>
 	</div>
-	<div class="visualAngleOnce v-a-Three">
+	<div class="visualAngleOnce v-a-Three" style="border-right: 1px solid #DDDDDD;">
 		<img class="v-a-o-img" src="./images/固定视角.png" alt="">
-		<div class="v-a-o-title">固定视角</div>
+		<div class="v-a-o-title">固定</div>
 	</div>
 </div>
\ No newline at end of file
diff --git a/widgets/visualAngle/Widget.js b/widgets/visualAngle/Widget.js
index 8d32cbb..5438f0e 100644
--- a/widgets/visualAngle/Widget.js
+++ b/widgets/visualAngle/Widget.js
@@ -3,16 +3,16 @@
 // 模块描述:显示坐标
 ///////////////////////////////////////////////////////////////////////////
 define([
-		'dojo/_base/declare',
-		'dojo/_base/lang',
-		'dojo/_base/array',
-		'dojo/_base/html',
-		'dojo/topic',
-		'jimu/BaseWidget',
-		'jimu/utils',
-		'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css',
-		'libs/zTree_v3/js/jquery.ztree.all'
-	],
+	'dojo/_base/declare',
+	'dojo/_base/lang',
+	'dojo/_base/array',
+	'dojo/_base/html',
+	'dojo/topic',
+	'jimu/BaseWidget',
+	'jimu/utils',
+	'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css',
+	'libs/zTree_v3/js/jquery.ztree.all'
+],
 	function (declare,
 		lang,
 		array,
@@ -29,34 +29,44 @@
 			layers: {},
 			startup: function () {
 				// 暴露在外的接口
-				var that = this;
-				$(".v-a-One").click(function () {
-					topic.publish('closeFlyRoute', 'FlyRoute');
-					$(this).addClass('on').siblings().removeClass('on');
-					// 控制视角平移:
-					that.map.scene.screenSpaceCameraController.enableRotate = true;
+				var that = this,
+					isFixed = false,
+					isFly = false
+					, noFixed = () => {
+						// $(this).addClass('on').siblings().removeClass('on');
+						// 控制视角平移:
+						that.map.scene.screenSpaceCameraController.enableRotate = true;
+						// true: 允许左键按下视角平移;
+						// false: 禁止左键按下视角平移;
+						// 控制视角缩放:
+						that.map.scene.screenSpaceCameraController.enableZoom = true;
+						// true: 允许中键缩放视角;
+						// false:禁止中键缩放视角;
+						// 控制视角旋转:
+						that.map.scene.screenSpaceCameraController.enableTilt = true;
+						// true:允许视角旋转;
+						// false:禁止视角旋转;
+					};
 
-					// true: 允许左键按下视角平移;
+				// $(".v-a-One").click(function () {
+				// 	topic.publish('closeFlyRoute', 'FlyRoute');
+				// 	$(this).addClass('on').siblings().removeClass('on');
+				// 	// 控制视角平移:
+				// 	that.map.scene.screenSpaceCameraController.enableRotate = true;
+				// 	// true: 允许左键按下视角平移;
+				// 	// false: 禁止左键按下视角平移;
+				// 	// 控制视角缩放:
+				// 	that.map.scene.screenSpaceCameraController.enableZoom = true;
+				// 	// true: 允许中键缩放视角;
+				// 	// false:禁止中键缩放视角;
+				// 	// 控制视角旋转:
+				// 	that.map.scene.screenSpaceCameraController.enableTilt = true;
+				// 	// true:允许视角旋转;
+				// 	// false:禁止视角旋转;
 
-					// false: 禁止左键按下视角平移;
-
-					// 控制视角缩放:
-					that.map.scene.screenSpaceCameraController.enableZoom = true;
-
-					// true: 允许中键缩放视角;
-
-					// false:禁止中键缩放视角;
-
-					// 控制视角旋转:
-					that.map.scene.screenSpaceCameraController.enableTilt = true;
-
-					// true:允许视角旋转;
-
-					// false:禁止视角旋转;
-
-				})
+				// })
 				$(".v-a-Two").click(function () {
-					$(this).addClass('on').siblings().removeClass('on');
+
 					// 关闭量算
 					topic.publish('closeMeasurement', 'Measurement');
 					// 关闭卷帘
@@ -68,18 +78,36 @@
 					// 飞行路线
 					$('.jimu-widget-CoorPosition').hide();
 					$('.jimu-widget-MapPrinting').hide();
-
-					topic.publish('openFlyRoute', 'FlyRoute');
-
 					$('.tool-y-box').stop().hide();
-
+					noFixed();
+					if (isFly) {
+						$(this).removeClass('on');
+						console.log('关闭飞行')
+						topic.publish('closeFlyRoute', 'FlyRoute');
+					} else {
+						$(this).addClass('on').siblings().removeClass('on');
+						console.log('开启飞行')
+						topic.publish('openFlyRoute', 'FlyRoute');
+					}
+					isFixed = false;
+					isFly = !isFly;
 				})
 				$(".v-a-Three").click(function () {
-					topic.publish('closeFlyRoute', 'FlyRoute');
-					$(this).addClass('on').siblings().removeClass('on');
-					that.map.scene.screenSpaceCameraController.enableRotate = false
-					that.map.scene.screenSpaceCameraController.enableZoom = true
-					that.map.scene.screenSpaceCameraController.enableTilt = false
+					if (isFixed) {
+						$(this).removeClass('on');
+						topic.publish('closeFlyRoute', 'FlyRoute');
+						noFixed();
+						console.log('关闭固定')
+					} else {
+						console.log('开启固定')
+						topic.publish('closeFlyRoute', 'FlyRoute');
+						$(this).addClass('on').siblings().removeClass('on');
+						that.map.scene.screenSpaceCameraController.enableRotate = false
+						that.map.scene.screenSpaceCameraController.enableZoom = true
+						that.map.scene.screenSpaceCameraController.enableTilt = false
+					}
+					isFly = false;
+					isFixed = !isFixed;
 				})
 
 			},
diff --git a/widgets/visualAngle/css/style.css b/widgets/visualAngle/css/style.css
index 1d0925f..d713e49 100644
--- a/widgets/visualAngle/css/style.css
+++ b/widgets/visualAngle/css/style.css
@@ -1,20 +1,20 @@
 .jimu-widget-visualAngle {
   position: fixed;
   font-size: 14px;
-  height: 72px !important;
+  /* height: 72px !important; */
   /* line-height  : 32px; */
-  width: 216px !important;
-  right: auto !important;
-  top: auto !important;
-  bottom: 30px !important;
-  left: calc(50% - 90px) !important;
+  /* width: 216px !important; */
+  /* right: auto !important; */
+  /* top: auto !important; */
+  /* bottom: 30px !important; */
+  /* left: calc(50% - 90px) !important; */
   /* 240px */
-  background: rgba(255, 255, 255, 1);
+  background: rgba(254, 254, 254, 1);
   /* border : 1px solid #000; */
-  border-radius: 6px;
+  border-radius: 6px 0 0 6px;
   text-align: center;
   /* cursor       : pointer; */
-  z-index: 10 !important;
+  z-index: 13 !important;
   box-sizing: border-box;
   display: flex;
   align-items: center;
@@ -25,26 +25,26 @@
   width: 72px;
   box-sizing: border-box;
   /* border: 1px solid springgreen; */
-  height: 72px;
+  height: 36px;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
-  flex-direction: column;
+  /* flex-direction: column; */
   font-size: 13px;
-
 }
 
 .jimu-widget-visualAngle .visualAngleOnce .v-a-o-title {
   color: #969696 !important;
+  position: relative;
+  left: 3px;
 }
 
 .jimu-widget-visualAngle .visualAngleOnce.on {
   background-color: #3F9DFD;
 }
 
-.jimu-widget-visualAngle .visualAngleOnce.on img,
-.jimu-widget-visualAngle .visualAngleOnce.on div {
+.jimu-widget-visualAngle .visualAngleOnce.on img, .jimu-widget-visualAngle .visualAngleOnce.on div {
   filter: grayscale(100%) brightness(200%);
 }
 
@@ -54,11 +54,14 @@
 }
 
 .jimu-widget-visualAngle .visualAngleOnce:nth-child(3) {
-  border-radius: 0 6px 6px 0;
+  /* border-radius: 0 6px 6px 0; */
   border-left: 1px solid rgba(155, 155, 155, 0.2);
 }
 
 .jimu-widget-visualAngle .v-a-o-img {
+  position: relative;
+  top: 5px;
+  left: -2px;
   width: 20px;
   margin-bottom: 8px;
 }
\ No newline at end of file

--
Gitblit v1.9.3