@kq_npm/client3d_webgl_vue 1.0.3-beta → 1.0.4-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -130,40 +130,39 @@ class GpuSpatialQueryViewModel {
130
130
  that._gpuSpatialQuery.finishSQ.addEventListener(function () {
131
131
  // 查询结束后的回调事件,高亮结果
132
132
  for (let l = 0; l < that._gpuSpatialQuery._layers.length; l++) {
133
- if (that._gpuSpatialQuery._layers[l].sqResult.length != 0) {
134
- const tileset = that._gpuSpatialQuery._layers[l].layer;
135
- const queryIds = that._gpuSpatialQuery._layers[l].sqResult;
136
-
137
- for (let n = 0; n < tileset._selectedTiles.length; n++) {
138
- const tile = tileset._selectedTiles[n];
139
- const content = tile.content;
140
-
141
- if (content) {
142
- for (let i = 0; i < content.featuresLength; i++) {
143
- const feature = content.getFeature(i);
144
- let bFind = false;
145
-
146
- if (feature.pickId) {
147
- const id = feature.pickId.key;
148
-
149
- for (let j = 0; j < queryIds.length; j++) {
150
- if (queryIds[j] == id) {
151
- bFind = true;
152
- }
133
+ //if (that._gpuSpatialQuery._layers[l].sqResult.length != 0) { 该代码导致无法清除高亮效果
134
+ const tileset = that._gpuSpatialQuery._layers[l].layer;
135
+ const queryIds = that._gpuSpatialQuery._layers[l].sqResult;
136
+
137
+ for (let n = 0; n < tileset._selectedTiles.length; n++) {
138
+ const tile = tileset._selectedTiles[n];
139
+ const content = tile.content;
140
+
141
+ if (content) {
142
+ for (let i = 0; i < content.featuresLength; i++) {
143
+ const feature = content.getFeature(i);
144
+ let bFind = false;
145
+
146
+ if (feature.pickId) {
147
+ const id = feature.pickId.key;
148
+
149
+ for (let j = 0; j < queryIds.length; j++) {
150
+ if (queryIds[j] == id) {
151
+ bFind = true;
153
152
  }
154
153
  }
154
+ }
155
155
 
156
- if (bFind) {
157
- feature.color = Cesium.Color.AQUA;
158
- } else {
159
- feature.color = Cesium.Color.WHITE;
160
- }
156
+ if (bFind) {
157
+ feature.color = Cesium.Color.AQUA;
158
+ } else {
159
+ feature.color = Cesium.Color.WHITE;
161
160
  }
162
161
  }
163
162
  }
164
-
165
- tileset.makeStyleDirty();
166
163
  }
164
+
165
+ tileset.makeStyleDirty(); //}
167
166
  }
168
167
  });
169
168
  } //开始绘制
package/index.js CHANGED
@@ -1739,17 +1739,16 @@ class LayerManager {
1739
1739
 
1740
1740
  if (promise) {
1741
1741
  promise.then(() => {
1742
- adjustLayerIndex(this._layerListData[i]);
1742
+ adjustLayerIndex(this._layerListData[i], this);
1743
1743
  });
1744
1744
  } else {
1745
- adjustLayerIndex(this._layerListData[i]);
1745
+ adjustLayerIndex(this._layerListData[i], this);
1746
1746
  }
1747
1747
 
1748
- var that = this;
1749
-
1750
- function adjustLayerIndex(layerData) {
1748
+ function adjustLayerIndex(layerData, that) {
1751
1749
  if (layerData.serverType === "imagerylayer") {
1752
1750
  var addIndex = that.getImageryLayerAddIndex(layerData.guid);
1751
+ if (addIndex === -1) return;
1753
1752
  layer = that.getLayerByGuid(layerData.guid, layerData.serverType);
1754
1753
 
1755
1754
  if (layer) {
@@ -5044,40 +5043,39 @@ class GpuSpatialQueryViewModel {
5044
5043
  that._gpuSpatialQuery.finishSQ.addEventListener(function () {
5045
5044
  // 查询结束后的回调事件,高亮结果
5046
5045
  for (let l = 0; l < that._gpuSpatialQuery._layers.length; l++) {
5047
- if (that._gpuSpatialQuery._layers[l].sqResult.length != 0) {
5048
- const tileset = that._gpuSpatialQuery._layers[l].layer;
5049
- const queryIds = that._gpuSpatialQuery._layers[l].sqResult;
5046
+ //if (that._gpuSpatialQuery._layers[l].sqResult.length != 0) { 该代码导致无法清除高亮效果
5047
+ const tileset = that._gpuSpatialQuery._layers[l].layer;
5048
+ const queryIds = that._gpuSpatialQuery._layers[l].sqResult;
5050
5049
 
5051
- for (let n = 0; n < tileset._selectedTiles.length; n++) {
5052
- const tile = tileset._selectedTiles[n];
5053
- const content = tile.content;
5050
+ for (let n = 0; n < tileset._selectedTiles.length; n++) {
5051
+ const tile = tileset._selectedTiles[n];
5052
+ const content = tile.content;
5054
5053
 
5055
- if (content) {
5056
- for (let i = 0; i < content.featuresLength; i++) {
5057
- const feature = content.getFeature(i);
5058
- let bFind = false;
5054
+ if (content) {
5055
+ for (let i = 0; i < content.featuresLength; i++) {
5056
+ const feature = content.getFeature(i);
5057
+ let bFind = false;
5059
5058
 
5060
- if (feature.pickId) {
5061
- const id = feature.pickId.key;
5059
+ if (feature.pickId) {
5060
+ const id = feature.pickId.key;
5062
5061
 
5063
- for (let j = 0; j < queryIds.length; j++) {
5064
- if (queryIds[j] == id) {
5065
- bFind = true;
5066
- }
5062
+ for (let j = 0; j < queryIds.length; j++) {
5063
+ if (queryIds[j] == id) {
5064
+ bFind = true;
5067
5065
  }
5068
5066
  }
5067
+ }
5069
5068
 
5070
- if (bFind) {
5071
- feature.color = Cesium.Color.AQUA;
5072
- } else {
5073
- feature.color = Cesium.Color.WHITE;
5074
- }
5069
+ if (bFind) {
5070
+ feature.color = Cesium.Color.AQUA;
5071
+ } else {
5072
+ feature.color = Cesium.Color.WHITE;
5075
5073
  }
5076
5074
  }
5077
5075
  }
5078
-
5079
- tileset.makeStyleDirty();
5080
5076
  }
5077
+
5078
+ tileset.makeStyleDirty(); //}
5081
5079
  }
5082
5080
  });
5083
5081
  } //开始绘制
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"1.0.3-beta","homepage":"","keywords":["KQGIS","webGL","Vue"],"browserslist":["> 1%","last 2 versions","not dead","not ie 11"],"author":"KQWEB GROUP","license":"Apache-2.0","dependencies":{"colorcolor":"^1.1.1","echarts":"^5.3.3","js-cookie":"^3.0.1","omit.js":"^2.0.2","save":"^2.5.0","tinycolor2":"^1.4.2","vue-i18n":"^9.2.0-beta.36","xlsx":"^0.18.5","css-vars-ponyfill":"^2.4.8","xe-utils":"^3.5.4"}}
1
+ {"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"1.0.4-beta","homepage":"","keywords":["KQGIS","webGL","Vue"],"browserslist":["> 1%","last 2 versions","not dead","not ie 11"],"author":"KQWEB GROUP","license":"Apache-2.0","dependencies":{"colorcolor":"^1.1.1","echarts":"^5.3.3","js-cookie":"^3.0.1","omit.js":"^2.0.2","save":"^2.5.0","tinycolor2":"^1.4.2","vue-i18n":"^9.2.0-beta.36","xlsx":"^0.18.5","css-vars-ponyfill":"^2.4.8","xe-utils":"^3.5.4"}}
@@ -1284,17 +1284,16 @@ class LayerManager {
1284
1284
 
1285
1285
  if (promise) {
1286
1286
  promise.then(() => {
1287
- adjustLayerIndex(this._layerListData[i]);
1287
+ adjustLayerIndex(this._layerListData[i], this);
1288
1288
  });
1289
1289
  } else {
1290
- adjustLayerIndex(this._layerListData[i]);
1290
+ adjustLayerIndex(this._layerListData[i], this);
1291
1291
  }
1292
1292
 
1293
- var that = this;
1294
-
1295
- function adjustLayerIndex(layerData) {
1293
+ function adjustLayerIndex(layerData, that) {
1296
1294
  if (layerData.serverType === "imagerylayer") {
1297
1295
  var addIndex = that.getImageryLayerAddIndex(layerData.guid);
1296
+ if (addIndex === -1) return;
1298
1297
  layer = that.getLayerByGuid(layerData.guid, layerData.serverType);
1299
1298
 
1300
1299
  if (layer) {