@kq_npm/client3d_webgl_vue 0.7.6-beta → 0.7.8-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.
- package/gpuspatialquery/index.js +27 -25
- package/index.js +122 -222
- package/isolineanalysis/index.js +4 -3
- package/package.json +1 -1
- package/scenceview/index.js +95 -198
- package/style.css +1 -1
- package/terrainoperation/style/terrainoperation.css +1 -1
package/gpuspatialquery/index.js
CHANGED
|
@@ -130,38 +130,40 @@ class GpuSpatialQueryViewModel {
|
|
|
130
130
|
that._gpuSpatialQuery.finishSQ.addEventListener(function () {
|
|
131
131
|
// 查询结束后的回调事件,高亮结果
|
|
132
132
|
for (let l = 0; l < that._gpuSpatialQuery._layers.length; l++) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
+
}
|
|
151
153
|
}
|
|
152
154
|
}
|
|
153
|
-
}
|
|
154
155
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
if (bFind) {
|
|
157
|
+
feature.color = Cesium.Color.AQUA;
|
|
158
|
+
} else {
|
|
159
|
+
feature.color = Cesium.Color.WHITE;
|
|
160
|
+
}
|
|
159
161
|
}
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
|
-
}
|
|
163
164
|
|
|
164
|
-
|
|
165
|
+
tileset.makeStyleDirty();
|
|
166
|
+
}
|
|
165
167
|
}
|
|
166
168
|
});
|
|
167
169
|
} //开始绘制
|
package/index.js
CHANGED
|
@@ -1117,8 +1117,10 @@ class LayerManager {
|
|
|
1117
1117
|
source.mapServerInfo = (0,util_namespaceObject.formatKQMapInfo)(mapInfo.result, serverUrl, serverName, token, null, true);
|
|
1118
1118
|
source.mapServerInfo.layers_old.forEach(layer_old => {
|
|
1119
1119
|
layer_old.guid = source.name + "@@@" + layer_old.id;
|
|
1120
|
-
|
|
1121
|
-
|
|
1120
|
+
layer_old.sourceName = source.name;
|
|
1121
|
+
|
|
1122
|
+
this._layerListData_old.push(layer_old);
|
|
1123
|
+
}, this);
|
|
1122
1124
|
});
|
|
1123
1125
|
sourcePromises.push(sourcePromise);
|
|
1124
1126
|
}
|
|
@@ -1131,7 +1133,20 @@ class LayerManager {
|
|
|
1131
1133
|
Promise.all(this._promises).then(() => {
|
|
1132
1134
|
this._layerTreeData = layer.layerTreeData;
|
|
1133
1135
|
|
|
1134
|
-
this._scenceView.fire("resetLayerDatas");
|
|
1136
|
+
this._scenceView.fire("resetLayerDatas"); //重置Imagerylayer图层顺序,wms和wmts异步加载导致图层顺序错乱
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
this._layerListData.forEach(layerData => {
|
|
1140
|
+
if (layerData.serverType === "imagerylayer") {
|
|
1141
|
+
var imagerylayer = this.getLayerByGuid(layerData.guid, 'imagerylayer');
|
|
1142
|
+
|
|
1143
|
+
if (imagerylayer) {
|
|
1144
|
+
this._viewer.imageryLayers.raiseToTop(imagerylayer);
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
}, this);
|
|
1148
|
+
|
|
1149
|
+
this.recordImageryLayerOriginIndex();
|
|
1135
1150
|
});
|
|
1136
1151
|
});
|
|
1137
1152
|
}
|
|
@@ -1154,6 +1169,7 @@ class LayerManager {
|
|
|
1154
1169
|
layerData.sourceType = source.serverType;
|
|
1155
1170
|
layerData.renderType = source.renderType;
|
|
1156
1171
|
layerData.url = source.url;
|
|
1172
|
+
layerData.guid = layerData.sourceName + "@@@" + (layerData.id || Math.random() * 10);
|
|
1157
1173
|
var type = layerData.renderType;
|
|
1158
1174
|
|
|
1159
1175
|
if (layerData.sourceType === "kqserver") {
|
|
@@ -1182,16 +1198,16 @@ class LayerManager {
|
|
|
1182
1198
|
type = "kqgis3dserver";
|
|
1183
1199
|
}
|
|
1184
1200
|
|
|
1185
|
-
|
|
1201
|
+
layerData.addType = type;
|
|
1186
1202
|
|
|
1187
|
-
|
|
1188
|
-
this._promises.push(promise);
|
|
1203
|
+
this._layerListData.push(layerData);
|
|
1189
1204
|
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1205
|
+
if (!this._scenceShowLayers || this._scenceShowLayers.indexOf(layerData.name) > -1) {
|
|
1206
|
+
var promise = this.addLayerData(layerData);
|
|
1207
|
+
|
|
1208
|
+
if (promise) {
|
|
1209
|
+
this._promises.push(promise);
|
|
1210
|
+
}
|
|
1195
1211
|
}
|
|
1196
1212
|
}
|
|
1197
1213
|
}
|
|
@@ -1199,7 +1215,8 @@ class LayerManager {
|
|
|
1199
1215
|
} //添加图层数据
|
|
1200
1216
|
|
|
1201
1217
|
|
|
1202
|
-
addLayerData(layerData
|
|
1218
|
+
addLayerData(layerData) {
|
|
1219
|
+
var type = layerData.addType;
|
|
1203
1220
|
let url = layerData.url;
|
|
1204
1221
|
type = type || "";
|
|
1205
1222
|
type = type.toLowerCase();
|
|
@@ -1235,15 +1252,9 @@ class LayerManager {
|
|
|
1235
1252
|
name: name,
|
|
1236
1253
|
url: url
|
|
1237
1254
|
}));
|
|
1238
|
-
layerData.guid = layer.guid;
|
|
1255
|
+
this._guidMapping[layerData.guid] = layer.guid;
|
|
1239
1256
|
layerData.visible = true;
|
|
1240
1257
|
layerData.serverType = "imagerylayer";
|
|
1241
|
-
|
|
1242
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1243
|
-
layerData.visible = false;
|
|
1244
|
-
layer.show = false;
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
1258
|
break;
|
|
1248
1259
|
|
|
1249
1260
|
case 'obterrain':
|
|
@@ -1253,18 +1264,13 @@ class LayerManager {
|
|
|
1253
1264
|
url: url
|
|
1254
1265
|
});
|
|
1255
1266
|
if (!layer.guid) layer.guid = Cesium.createGuid();
|
|
1256
|
-
layerData.guid = layer.guid;
|
|
1267
|
+
this._guidMapping[layerData.guid] = layer.guid;
|
|
1257
1268
|
layerData.visible = true;
|
|
1258
|
-
layerData.serverType = "terrainprovider";
|
|
1269
|
+
layerData.serverType = "terrainprovider";
|
|
1270
|
+
this._viewer.terrainProvider = layer;
|
|
1259
1271
|
|
|
1260
1272
|
this._terrainProviders.push(layer);
|
|
1261
1273
|
|
|
1262
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1263
|
-
layerData.visible = false;
|
|
1264
|
-
} else {
|
|
1265
|
-
this._viewer.terrainProvider = layer;
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
1274
|
break;
|
|
1269
1275
|
|
|
1270
1276
|
case 'stkterrain':
|
|
@@ -1275,20 +1281,14 @@ class LayerManager {
|
|
|
1275
1281
|
requestVertexNormals: true,
|
|
1276
1282
|
requestWaterMask: false
|
|
1277
1283
|
});
|
|
1278
|
-
if (!layer.guid) layer.guid = Cesium.createGuid();
|
|
1284
|
+
if (!layer.guid) layer.guid = Cesium.createGuid();
|
|
1285
|
+
this._viewer.terrainProvider = layer;
|
|
1279
1286
|
|
|
1280
1287
|
this._terrainProviders.push(layer);
|
|
1281
1288
|
|
|
1282
|
-
layerData.guid = layer.guid;
|
|
1289
|
+
this._guidMapping[layerData.guid] = layer.guid;
|
|
1283
1290
|
layerData.visible = true;
|
|
1284
1291
|
layerData.serverType = "terrainprovider";
|
|
1285
|
-
|
|
1286
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1287
|
-
layerData.visible = false;
|
|
1288
|
-
} else {
|
|
1289
|
-
this._viewer.terrainProvider = layer;
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
1292
|
break;
|
|
1293
1293
|
|
|
1294
1294
|
case "3dtiles":
|
|
@@ -1296,87 +1296,36 @@ class LayerManager {
|
|
|
1296
1296
|
name: name,
|
|
1297
1297
|
url: url
|
|
1298
1298
|
}));
|
|
1299
|
-
layerData.guid = layer.guid;
|
|
1299
|
+
this._guidMapping[layerData.guid] = layer.guid;
|
|
1300
1300
|
layerData.visible = true;
|
|
1301
1301
|
layerData.serverType = "3dtiles";
|
|
1302
|
-
|
|
1303
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1304
|
-
layerData.visible = false;
|
|
1305
|
-
layer.show = false;
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
1302
|
break;
|
|
1309
1303
|
|
|
1310
1304
|
case "kqgis3dserver":
|
|
1311
|
-
var hideLayer = this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1;
|
|
1312
1305
|
var that = this;
|
|
1313
1306
|
promise = this._viewer.addKq3dServerLayerGroupExt(url).then(group => {
|
|
1314
1307
|
var layers = group._addedLayers || group._layers;
|
|
1315
1308
|
|
|
1316
|
-
if (layers) {
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1309
|
+
if (layers && layers.length > 0) {
|
|
1310
|
+
layer = layers[0];
|
|
1311
|
+
var serverType = "";
|
|
1312
|
+
|
|
1313
|
+
if (layer instanceof Cesium.Cesium3DTileset) {
|
|
1314
|
+
serverType = "3dtiles";
|
|
1315
|
+
} else if (layer instanceof Cesium.ImageryLayer) {
|
|
1316
|
+
serverType = "imagerylayer";
|
|
1317
|
+
} else if (layer instanceof Cesium.Kq3dFileTerrainProvider || layer instanceof Cesium.CesiumTerrainProvider) {
|
|
1318
|
+
serverType = "terrainprovider";
|
|
1319
|
+
|
|
1320
|
+
that._terrainProviders.push(layer);
|
|
1321
|
+
} else if (layer instanceof Cesium.Kq3dGeoJsonDataSource) {
|
|
1322
|
+
serverType = "datasource";
|
|
1322
1323
|
}
|
|
1323
1324
|
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
serverType = "3dtiles";
|
|
1329
|
-
} else if (layers[i] instanceof Cesium.ImageryLayer) {
|
|
1330
|
-
serverType = "imagerylayer";
|
|
1331
|
-
} else if (layers[i] instanceof Cesium.Kq3dFileTerrainProvider || layers[i] instanceof Cesium.CesiumTerrainProvider) {
|
|
1332
|
-
serverType = "terrainprovider";
|
|
1333
|
-
|
|
1334
|
-
that._terrainProviders.push(layers[i]);
|
|
1335
|
-
} else if (layers[i] instanceof Cesium.Kq3dGeoJsonDataSource) {
|
|
1336
|
-
serverType = "datasource";
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
if (!layers[i].guid) layers[i].guid = Cesium.createGuid();
|
|
1340
|
-
|
|
1341
|
-
if (length > 1) {
|
|
1342
|
-
var child = {
|
|
1343
|
-
guid: layers[i].guid,
|
|
1344
|
-
name: layers[i].name,
|
|
1345
|
-
visible: true,
|
|
1346
|
-
serverType: serverType
|
|
1347
|
-
};
|
|
1348
|
-
|
|
1349
|
-
if (hideLayer) {
|
|
1350
|
-
child.visible = false;
|
|
1351
|
-
|
|
1352
|
-
if (serverType === "terrainprovider") {
|
|
1353
|
-
layers[i].readyPromise.then(() => {
|
|
1354
|
-
that._viewer.terrainProvider = that._emptyTerrainProvider;
|
|
1355
|
-
});
|
|
1356
|
-
} else {
|
|
1357
|
-
layers[i].show = false;
|
|
1358
|
-
}
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
layerData.children.push(child);
|
|
1362
|
-
} else {
|
|
1363
|
-
layerData.guid = layers[i].guid;
|
|
1364
|
-
layerData.visible = true;
|
|
1365
|
-
layerData.serverType = serverType;
|
|
1366
|
-
|
|
1367
|
-
if (hideLayer) {
|
|
1368
|
-
layerData.visible = false;
|
|
1369
|
-
|
|
1370
|
-
if (serverType === "terrainprovider") {
|
|
1371
|
-
layers[i].readyPromise.then(() => {
|
|
1372
|
-
that._viewer.terrainProvider = that._emptyTerrainProvider;
|
|
1373
|
-
});
|
|
1374
|
-
} else {
|
|
1375
|
-
layers[i].show = false;
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
}
|
|
1325
|
+
if (!layer.guid) layer.guid = Cesium.createGuid();
|
|
1326
|
+
this._guidMapping[layerData.guid] = layer.guid;
|
|
1327
|
+
layerData.visible = true;
|
|
1328
|
+
layerData.serverType = serverType;
|
|
1380
1329
|
}
|
|
1381
1330
|
});
|
|
1382
1331
|
break;
|
|
@@ -1387,19 +1336,12 @@ class LayerManager {
|
|
|
1387
1336
|
url: url,
|
|
1388
1337
|
layerName: layerData.layerName
|
|
1389
1338
|
}));
|
|
1390
|
-
layerData.guid = layer.guid;
|
|
1339
|
+
this._guidMapping[layerData.guid] = layer.guid;
|
|
1391
1340
|
layerData.visible = true;
|
|
1392
1341
|
layerData.serverType = "imagerylayer";
|
|
1393
|
-
|
|
1394
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1395
|
-
layerData.visible = false;
|
|
1396
|
-
layer.show = false;
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
1342
|
break;
|
|
1400
1343
|
|
|
1401
1344
|
case "kqgismapserver":
|
|
1402
|
-
layerData.guid = layerData.sourceName + "@@@" + layerData.id;
|
|
1403
1345
|
var layerInfo = layerData.sourceLayers.find(item => {
|
|
1404
1346
|
return item.id + "" == layerData.id + "";
|
|
1405
1347
|
});
|
|
@@ -1423,11 +1365,6 @@ class LayerManager {
|
|
|
1423
1365
|
|
|
1424
1366
|
this._guidMapping[layerData.guid] = layer.guid;
|
|
1425
1367
|
layerData.serverType = "imagerylayer";
|
|
1426
|
-
|
|
1427
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(layerData.name) === -1) {
|
|
1428
|
-
layerData.visible = false;
|
|
1429
|
-
layer.show = false;
|
|
1430
|
-
}
|
|
1431
1368
|
}
|
|
1432
1369
|
|
|
1433
1370
|
break;
|
|
@@ -1437,18 +1374,10 @@ class LayerManager {
|
|
|
1437
1374
|
name: name,
|
|
1438
1375
|
url: url,
|
|
1439
1376
|
layers: layerData.id + ""
|
|
1440
|
-
}));
|
|
1441
|
-
|
|
1442
|
-
layerData.guid = layerData.sourceName + "@@@" + layerData.id;
|
|
1377
|
+
}));
|
|
1443
1378
|
this._guidMapping[layerData.guid] = layer.guid;
|
|
1444
1379
|
layerData.visible = true;
|
|
1445
1380
|
layerData.serverType = "imagerylayer";
|
|
1446
|
-
|
|
1447
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1448
|
-
layerData.visible = false;
|
|
1449
|
-
layer.show = false;
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
1381
|
break;
|
|
1453
1382
|
|
|
1454
1383
|
case "wms":
|
|
@@ -1474,16 +1403,10 @@ class LayerManager {
|
|
|
1474
1403
|
}
|
|
1475
1404
|
}
|
|
1476
1405
|
|
|
1477
|
-
layerData.guid = layerData.sourceName + "@@@" + layerData.id;
|
|
1478
1406
|
this._guidMapping[layerData.guid] = layers[0].guid;
|
|
1479
1407
|
layerData.name = name || layers[0].name;
|
|
1480
1408
|
layerData.visible = true;
|
|
1481
1409
|
layerData.serverType = "imagerylayer";
|
|
1482
|
-
|
|
1483
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(layerData.name) === -1) {
|
|
1484
|
-
layerData.visible = false;
|
|
1485
|
-
layers[0].show = false;
|
|
1486
|
-
}
|
|
1487
1410
|
}
|
|
1488
1411
|
});
|
|
1489
1412
|
break;
|
|
@@ -1511,16 +1434,10 @@ class LayerManager {
|
|
|
1511
1434
|
}
|
|
1512
1435
|
}
|
|
1513
1436
|
|
|
1514
|
-
layerData.guid = layerData.sourceName + "@@@" + layerData.id;
|
|
1515
1437
|
this._guidMapping[layerData.guid] = layers[0].guid;
|
|
1516
1438
|
layerData.name = name || layers[0].name;
|
|
1517
1439
|
layerData.visible = true;
|
|
1518
1440
|
layerData.serverType = "imagerylayer";
|
|
1519
|
-
|
|
1520
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(layerData.name) === -1) {
|
|
1521
|
-
layerData.visible = false;
|
|
1522
|
-
layers[0].show = false;
|
|
1523
|
-
}
|
|
1524
1441
|
}
|
|
1525
1442
|
});
|
|
1526
1443
|
break;
|
|
@@ -1548,14 +1465,9 @@ class LayerManager {
|
|
|
1548
1465
|
this._viewer.dataSources.add(ds);
|
|
1549
1466
|
|
|
1550
1467
|
ds.autoAvoid(this._viewer);
|
|
1551
|
-
layerData.guid = ds.guid;
|
|
1468
|
+
this._guidMapping[layerData.guid] = ds.guid;
|
|
1552
1469
|
layerData.visible = true;
|
|
1553
1470
|
layerData.serverType = "datasource";
|
|
1554
|
-
|
|
1555
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1556
|
-
layerData.visible = false;
|
|
1557
|
-
ds.show = false;
|
|
1558
|
-
}
|
|
1559
1471
|
});
|
|
1560
1472
|
break;
|
|
1561
1473
|
|
|
@@ -1568,14 +1480,9 @@ class LayerManager {
|
|
|
1568
1480
|
promise = ds.load(url).then(ds => {
|
|
1569
1481
|
this._viewer.dataSources.add(ds);
|
|
1570
1482
|
|
|
1571
|
-
layerData.guid = ds.guid;
|
|
1483
|
+
this._guidMapping[layerData.guid] = ds.guid;
|
|
1572
1484
|
layerData.visible = true;
|
|
1573
1485
|
layerData.serverType = "datasource";
|
|
1574
|
-
|
|
1575
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1576
|
-
layerData.visible = false;
|
|
1577
|
-
ds.show = false;
|
|
1578
|
-
}
|
|
1579
1486
|
});
|
|
1580
1487
|
break;
|
|
1581
1488
|
|
|
@@ -1584,14 +1491,9 @@ class LayerManager {
|
|
|
1584
1491
|
promise = ds.load(url).then(ds => {
|
|
1585
1492
|
this._viewer.dataSources.add(ds);
|
|
1586
1493
|
|
|
1587
|
-
layerData.guid = ds.guid;
|
|
1494
|
+
this._guidMapping[layerData.guid] = ds.guid;
|
|
1588
1495
|
layerData.visible = true;
|
|
1589
1496
|
layerData.serverType = "datasource";
|
|
1590
|
-
|
|
1591
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1592
|
-
layerData.visible = false;
|
|
1593
|
-
ds.show = false;
|
|
1594
|
-
}
|
|
1595
1497
|
});
|
|
1596
1498
|
break;
|
|
1597
1499
|
|
|
@@ -1599,72 +1501,40 @@ class LayerManager {
|
|
|
1599
1501
|
layer = this._viewer.imageryLayers.addImageryProvider(new Cesium.Kq3dTiandituImageryProvider({
|
|
1600
1502
|
name: name,
|
|
1601
1503
|
mapStyle: layerData.layerType + "_c"
|
|
1602
|
-
}));
|
|
1603
|
-
|
|
1604
|
-
layerData.guid = layerData.sourceName + "@@@" + layerData.layerType;
|
|
1504
|
+
}));
|
|
1605
1505
|
this._guidMapping[layerData.guid] = layer.guid;
|
|
1606
1506
|
layerData.visible = true;
|
|
1607
1507
|
layerData.serverType = "imagerylayer";
|
|
1608
|
-
|
|
1609
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1610
|
-
layerData.visible = false;
|
|
1611
|
-
layer.show = false;
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
1508
|
break;
|
|
1615
1509
|
|
|
1616
1510
|
case "baidu":
|
|
1617
1511
|
layer = this._viewer.imageryLayers.addImageryProvider(new Cesium.Kq3dBaiduMapsImageryProvider({
|
|
1618
1512
|
name: name,
|
|
1619
1513
|
mapStyle: layerData.layerType
|
|
1620
|
-
}));
|
|
1621
|
-
|
|
1622
|
-
layerData.guid = layerData.sourceName + "@@@" + layerData.layerType;
|
|
1514
|
+
}));
|
|
1623
1515
|
this._guidMapping[layerData.guid] = layer.guid;
|
|
1624
1516
|
layerData.visible = true;
|
|
1625
1517
|
layerData.serverType = "imagerylayer";
|
|
1626
|
-
|
|
1627
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1628
|
-
layerData.visible = false;
|
|
1629
|
-
layer.show = false;
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
1518
|
break;
|
|
1633
1519
|
|
|
1634
1520
|
case "gaode":
|
|
1635
1521
|
layer = this._viewer.imageryLayers.addImageryProvider(new Cesium.Kq3dAMapsImageryProvider({
|
|
1636
1522
|
name: name,
|
|
1637
1523
|
mapStyle: layerData.layerType
|
|
1638
|
-
}));
|
|
1639
|
-
|
|
1640
|
-
layerData.guid = layerData.sourceName + "@@@" + layerData.layerType;
|
|
1524
|
+
}));
|
|
1641
1525
|
this._guidMapping[layerData.guid] = layer.guid;
|
|
1642
1526
|
layerData.visible = true;
|
|
1643
1527
|
layerData.serverType = "imagerylayer";
|
|
1644
|
-
|
|
1645
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1646
|
-
layerData.visible = false;
|
|
1647
|
-
layer.show = false;
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
1528
|
break;
|
|
1651
1529
|
|
|
1652
1530
|
case "tencent":
|
|
1653
1531
|
layer = this._viewer.imageryLayers.addImageryProvider(new Cesium.Kq3dQQMapsImageryProvider({
|
|
1654
1532
|
name: name,
|
|
1655
1533
|
mapStyle: layerData.layerType
|
|
1656
|
-
}));
|
|
1657
|
-
|
|
1658
|
-
layerData.guid = layerData.sourceName + "@@@" + layerData.layerType;
|
|
1534
|
+
}));
|
|
1659
1535
|
this._guidMapping[layerData.guid] = layer.guid;
|
|
1660
1536
|
layerData.visible = true;
|
|
1661
1537
|
layerData.serverType = "imagerylayer";
|
|
1662
|
-
|
|
1663
|
-
if (this._scenceShowLayers && this._scenceShowLayers.indexOf(name) === -1) {
|
|
1664
|
-
layerData.visible = false;
|
|
1665
|
-
layer.show = false;
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
1538
|
break;
|
|
1669
1539
|
|
|
1670
1540
|
default:
|
|
@@ -1825,6 +1695,33 @@ class LayerManager {
|
|
|
1825
1695
|
}
|
|
1826
1696
|
|
|
1827
1697
|
this.recordImageryLayerOriginIndex();
|
|
1698
|
+
} else if (this._layerListData[i].sourceType) {
|
|
1699
|
+
var promise = this.addLayerData(this._layerListData[i]);
|
|
1700
|
+
|
|
1701
|
+
if (promise) {
|
|
1702
|
+
promise.then(() => {
|
|
1703
|
+
adjustLayerIndex(this._layerListData[i]);
|
|
1704
|
+
});
|
|
1705
|
+
} else {
|
|
1706
|
+
adjustLayerIndex(this._layerListData[i]);
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
var that = this;
|
|
1710
|
+
|
|
1711
|
+
function adjustLayerIndex(layerData) {
|
|
1712
|
+
if (layerData.serverType === "imagerylayer") {
|
|
1713
|
+
var addIndex = that.getImageryLayerAddIndex(layerData.guid);
|
|
1714
|
+
layer = that.getLayerByGuid(layerData.guid, layerData.serverType);
|
|
1715
|
+
|
|
1716
|
+
if (layer) {
|
|
1717
|
+
var count = layer._layerIndex - addIndex;
|
|
1718
|
+
|
|
1719
|
+
for (var i = 0; i < count; i++) {
|
|
1720
|
+
that._viewer.imageryLayers.lower(layer);
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1828
1725
|
}
|
|
1829
1726
|
}
|
|
1830
1727
|
}
|
|
@@ -2044,7 +1941,7 @@ class LayerManager {
|
|
|
2044
1941
|
|
|
2045
1942
|
for (let i = 0; i < layers_checked.length; i++) {
|
|
2046
1943
|
if (layers_checked[i].combined) {
|
|
2047
|
-
getChildren(layers_checked[i]
|
|
1944
|
+
getChildren(layers_checked[i]);
|
|
2048
1945
|
} else {
|
|
2049
1946
|
layerData.push(layers_checked[i]);
|
|
2050
1947
|
}
|
|
@@ -2052,12 +1949,12 @@ class LayerManager {
|
|
|
2052
1949
|
|
|
2053
1950
|
return layerData;
|
|
2054
1951
|
|
|
2055
|
-
function getChildren(
|
|
1952
|
+
function getChildren(parent) {
|
|
2056
1953
|
for (let z = 0; z < layers_old.length; z++) {
|
|
2057
|
-
if (layers_old[z].parentLayerId ===
|
|
1954
|
+
if (layers_old[z].parentLayerId === parent.id && layers_old[z].sourceName === parent.sourceName) {
|
|
2058
1955
|
// 分组节点
|
|
2059
1956
|
if (layers_old[z].groupLayer) {
|
|
2060
|
-
getChildren(layers_old[z]
|
|
1957
|
+
getChildren(layers_old[z]);
|
|
2061
1958
|
} else {
|
|
2062
1959
|
layerData.push(layers_old[z]);
|
|
2063
1960
|
}
|
|
@@ -5173,38 +5070,40 @@ class GpuSpatialQueryViewModel {
|
|
|
5173
5070
|
that._gpuSpatialQuery.finishSQ.addEventListener(function () {
|
|
5174
5071
|
// 查询结束后的回调事件,高亮结果
|
|
5175
5072
|
for (let l = 0; l < that._gpuSpatialQuery._layers.length; l++) {
|
|
5176
|
-
|
|
5177
|
-
|
|
5073
|
+
if (that._gpuSpatialQuery._layers[l].sqResult.length != 0) {
|
|
5074
|
+
const tileset = that._gpuSpatialQuery._layers[l].layer;
|
|
5075
|
+
const queryIds = that._gpuSpatialQuery._layers[l].sqResult;
|
|
5178
5076
|
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5077
|
+
for (let n = 0; n < tileset._selectedTiles.length; n++) {
|
|
5078
|
+
const tile = tileset._selectedTiles[n];
|
|
5079
|
+
const content = tile.content;
|
|
5182
5080
|
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5081
|
+
if (content) {
|
|
5082
|
+
for (let i = 0; i < content.featuresLength; i++) {
|
|
5083
|
+
const feature = content.getFeature(i);
|
|
5084
|
+
let bFind = false;
|
|
5187
5085
|
|
|
5188
|
-
|
|
5189
|
-
|
|
5086
|
+
if (feature.pickId) {
|
|
5087
|
+
const id = feature.pickId.key;
|
|
5190
5088
|
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5089
|
+
for (let j = 0; j < queryIds.length; j++) {
|
|
5090
|
+
if (queryIds[j] == id) {
|
|
5091
|
+
bFind = true;
|
|
5092
|
+
}
|
|
5194
5093
|
}
|
|
5195
5094
|
}
|
|
5196
|
-
}
|
|
5197
5095
|
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5096
|
+
if (bFind) {
|
|
5097
|
+
feature.color = Cesium.Color.AQUA;
|
|
5098
|
+
} else {
|
|
5099
|
+
feature.color = Cesium.Color.WHITE;
|
|
5100
|
+
}
|
|
5202
5101
|
}
|
|
5203
5102
|
}
|
|
5204
5103
|
}
|
|
5205
|
-
}
|
|
5206
5104
|
|
|
5207
|
-
|
|
5105
|
+
tileset.makeStyleDirty();
|
|
5106
|
+
}
|
|
5208
5107
|
}
|
|
5209
5108
|
});
|
|
5210
5109
|
} //开始绘制
|
|
@@ -12595,13 +12494,13 @@ class IsolineAnalysisViewModel {
|
|
|
12595
12494
|
|
|
12596
12495
|
_defineProperty(this, "_colorImages", [//渐变纹理编号和图片地址对象
|
|
12597
12496
|
{
|
|
12598
|
-
value: 0,
|
|
12497
|
+
value: "0",
|
|
12599
12498
|
src: const_image_namespaceObject.RED_TO_PURPLE_URL
|
|
12600
12499
|
}, {
|
|
12601
|
-
value: 1,
|
|
12500
|
+
value: "1",
|
|
12602
12501
|
src: const_image_namespaceObject.PURPLE_TO_YELLOW_URL
|
|
12603
12502
|
}, {
|
|
12604
|
-
value: 2,
|
|
12503
|
+
value: "2",
|
|
12605
12504
|
src: const_image_namespaceObject.GREEN_TO_BLUE_URL
|
|
12606
12505
|
}]);
|
|
12607
12506
|
|
|
@@ -12611,6 +12510,7 @@ class IsolineAnalysisViewModel {
|
|
|
12611
12510
|
this._options.viewer = scenceView._viewer;
|
|
12612
12511
|
this._options.viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
12613
12512
|
this._options.colorImage = this.getImagePath(this._options.colorImage);
|
|
12513
|
+
this._surfaceColorImage = this._options.colorImage;
|
|
12614
12514
|
|
|
12615
12515
|
if (options.firstCurve.color) {
|
|
12616
12516
|
options.firstCurve.color = Cesium.Color.fromCssColorString(options.firstCurve.color);
|
package/isolineanalysis/index.js
CHANGED
|
@@ -103,13 +103,13 @@ class IsolineAnalysisViewModel {
|
|
|
103
103
|
|
|
104
104
|
_defineProperty(this, "_colorImages", [//渐变纹理编号和图片地址对象
|
|
105
105
|
{
|
|
106
|
-
value: 0,
|
|
106
|
+
value: "0",
|
|
107
107
|
src: const_image_namespaceObject.RED_TO_PURPLE_URL
|
|
108
108
|
}, {
|
|
109
|
-
value: 1,
|
|
109
|
+
value: "1",
|
|
110
110
|
src: const_image_namespaceObject.PURPLE_TO_YELLOW_URL
|
|
111
111
|
}, {
|
|
112
|
-
value: 2,
|
|
112
|
+
value: "2",
|
|
113
113
|
src: const_image_namespaceObject.GREEN_TO_BLUE_URL
|
|
114
114
|
}]);
|
|
115
115
|
|
|
@@ -119,6 +119,7 @@ class IsolineAnalysisViewModel {
|
|
|
119
119
|
this._options.viewer = scenceView._viewer;
|
|
120
120
|
this._options.viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
121
121
|
this._options.colorImage = this.getImagePath(this._options.colorImage);
|
|
122
|
+
this._surfaceColorImage = this._options.colorImage;
|
|
122
123
|
|
|
123
124
|
if (options.firstCurve.color) {
|
|
124
125
|
options.firstCurve.color = Cesium.Color.fromCssColorString(options.firstCurve.color);
|