From d8d0f5fb17025c8ea92ef9f03ad5cc57d18b3b16 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 24 Jun 2021 09:08:54 +0800
Subject: [PATCH] xj
---
widgets/LeftNavigationBar/Widget.js | 24 ++++++++++++------------
widgets/spatialAnalysis/Widget.js | 9 ++++-----
widgets/spatialAnalysis/Widget.html | 2 +-
3 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/widgets/LeftNavigationBar/Widget.js b/widgets/LeftNavigationBar/Widget.js
index 08f8575..7494f73 100644
--- a/widgets/LeftNavigationBar/Widget.js
+++ b/widgets/LeftNavigationBar/Widget.js
@@ -377,7 +377,7 @@
obj.data.children.forEach(item => {
Cesium.when(that[item.id], function (layer) {
topic.publish('removeTilt', 'Layermanagement', item);
- topic.publish('removeTiltS', 'Layermanagement', item);
+ topic.publish('removeTiltS', 'spatialAnalysis', item);
topic.publish('removeLayersLegends', 'legends', item);
that.map.scene.layers.remove(layer[0].name)
})
@@ -389,7 +389,7 @@
autoSetView: false //不自动定位
});
topic.publish('appendTilt', 'Layermanagement', item);
- topic.publish('appendTiltS', 'Layermanagement', item);
+ topic.publish('appendTiltS', 'spatialAnalysis', item);
topic.publish('addLayersLegends', 'legends', item);
//定位到场景
Cesium.loadJson(host + partOfUrl + '/scenes.json').then(function (scenes) {
@@ -432,7 +432,7 @@
});
});
topic.publish('appendItem', 'Layermanagement', item, that[item.id]);
- topic.publish('appendItemS', 'Layermanagement', item, that[item.id]);
+ topic.publish('appendItemS', 'spatialAnalysis', item, that[item.id]);
topic.publish('addLayersLegends', 'legends', item);
} else {
$.ajax({
@@ -446,7 +446,7 @@
url: res[0].path,
}));
topic.publish('appendItem', 'Layermanagement', item, that[item.id]);
- topic.publish('appendItemS', 'Layermanagement', item, that[item.id]);
+ topic.publish('appendItemS', 'spatialAnalysis', item, that[item.id]);
topic.publish('addLayersLegends', 'legends', item);
that[item.id].alpha = item.alpha;
that[item.id].getViewableRectangle().then(function (rectangle) {
@@ -472,7 +472,7 @@
obj.data.children.forEach(item => {
Cesium.when(that[item.id], function (layer) {
topic.publish('removeTilt', 'Layermanagement', item);
- topic.publish('removeTiltS', 'Layermanagement', item);
+ topic.publish('removeTiltS', 'spatialAnalysis', item);
topic.publish('removeLayersLegends', 'legends', item);
that.map.scene.layers.remove(layer[0].name)
})
@@ -481,7 +481,7 @@
obj.data.children.forEach(item => {
if (that[item.id]) {
topic.publish('removeItem', 'Layermanagement', item);
- topic.publish('removeItemS', 'Layermanagement', item);
+ topic.publish('removeItemS', 'spatialAnalysis', item);
topic.publish('removeLayersLegends', 'legends', item);
that[item.id].show = false;
}
@@ -500,7 +500,7 @@
if (obj.data.model) {
Cesium.when(that[obj.data.id], function (layer) {
topic.publish('removeTilt', 'Layermanagement', obj.data);
- topic.publish('removeTiltS', 'Layermanagement', obj.data);
+ topic.publish('removeTiltS', 'spatialAnalysis', obj.data);
topic.publish('removeLayersLegends', 'legends', obj.data);
that.map.scene.layers.remove(layer[0].name)
})
@@ -515,7 +515,7 @@
autoSetView: false //不自动定位
});
topic.publish('appendTilt', 'Layermanagement', obj.data);
- topic.publish('appendTiltS', 'Layermanagement', obj.data);
+ topic.publish('appendTiltS', 'spatialAnalysis', obj.data);
topic.publish('addLayersLegends', 'legends', obj.data);
//定位到场景
Cesium.loadJson(host + partOfUrl + '/scenes.json').then(function (scenes) {
@@ -553,7 +553,7 @@
});
});
topic.publish('appendItem', 'Layermanagement', obj.data, that[obj.data.id]);
- topic.publish('appendItemS', 'Layermanagement', obj.data, that[obj.data.id]);
+ topic.publish('appendItemS', 'spatialAnalysis', obj.data, that[obj.data.id]);
topic.publish('addLayersLegends', 'legends', obj.data);
} else {
$.ajax({
@@ -568,7 +568,7 @@
}));
topic.publish('appendItem', 'Layermanagement', obj.data, that[obj.data.id]);
- topic.publish('appendItemS', 'Layermanagement', obj.data, that[obj.data.id]);
+ topic.publish('appendItemS', 'spatialAnalysis', obj.data, that[obj.data.id]);
topic.publish('addLayersLegends', 'legends', obj.data);
that[obj.data.id].alpha = obj.data.alpha
@@ -593,7 +593,7 @@
Cesium.when(that[obj.data.id], function (layer) {
topic.publish('removeTilt', 'Layermanagement', obj.data);
- topic.publish('removeTiltS', 'Layermanagement', obj.data);
+ topic.publish('removeTiltS', 'spatialAnalysis', obj.data);
topic.publish('removeLayersLegends', 'legends', obj.data);
that.map.scene.layers.remove(layer[0].name)
})
@@ -602,7 +602,7 @@
if (that[obj.data.id]) {
topic.publish('removeItem', 'Layermanagement', obj.data);
- topic.publish('removeItemS', 'Layermanagement', obj.data);
+ topic.publish('removeItemS', 'spatialAnalysis', obj.data);
topic.publish('removeLayersLegends', 'legends', obj.data);
that[obj.data.id].show = false;
}
diff --git a/widgets/spatialAnalysis/Widget.html b/widgets/spatialAnalysis/Widget.html
index d69e3b9..ffaa144 100644
--- a/widgets/spatialAnalysis/Widget.html
+++ b/widgets/spatialAnalysis/Widget.html
@@ -7,7 +7,7 @@
</div>
<div id="SelectLayerTool">
选择操作图层:
- <button class="layui-btn layui-btn-primary SelectLayerTool">
+ <button class="layui-btn layui-btn-primary SelectLayerTool" title='默认:天地图影像'>
默认:天地图影像
<i class="layui-icon layui-icon-down layui-font-12"></i>
</button>
diff --git a/widgets/spatialAnalysis/Widget.js b/widgets/spatialAnalysis/Widget.js
index be0c4e2..62e479c 100644
--- a/widgets/spatialAnalysis/Widget.js
+++ b/widgets/spatialAnalysis/Widget.js
@@ -279,11 +279,10 @@
$('#SelectLayerToolItem').hide();
})
},
- fakeName: 'Layermanagement',
appendItemS: function (item, obj, layer) {
// console.log('a1')
var that = this;
- if (item == this.fakeName) {
+ if (item == this.name) {
// $("#SelectLayerToolItemTitle .no-data").stop().hide();
var flag = true;
@@ -312,7 +311,7 @@
},
removeItemS: function (item, obj) {
// console.log('r1')
- if (item == this.fakeName) {
+ if (item == this.name) {
var liList = $("#SelectLayerToolItemTitle li");
for (var i = 0; i < liList.length; i++) {
if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id + 's') {
@@ -332,7 +331,7 @@
appendTiltS: function (item, obj, layer) {
// console.log('a2')
var that = this;
- if (item == this.fakeName) {
+ if (item == this.name) {
// $("#SelectLayerToolItemTitle .no-data").stop().hide();
@@ -361,7 +360,7 @@
},
removeTiltS: function (item, obj) {
// console.log('r2')
- if (item == this.fakeName) {
+ if (item == this.name) {
var liList = $("#SelectLayerToolItemTitle li");
for (var i = 0; i < liList.length; i++) {
if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id + 's') {
--
Gitblit v1.9.3