@kq_npm/client3d_webgl_vue 4.0.8-beta → 4.1.0-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/adddata/index.js +277 -86
- package/index.js +548 -132
- package/light/index.js +1 -1
- package/limitheightanalysis/index.js +3 -1
- package/package.json +1 -1
- package/scenceview/index.js +557 -138
- package/sceneset/index.js +393 -7
- package/videofusion/index.js +49 -15
- package/videoproject/index.js +50 -21
package/adddata/index.js
CHANGED
|
@@ -213,11 +213,15 @@ var util_ = __webpack_require__(9519);
|
|
|
213
213
|
var message = __webpack_require__(1349);
|
|
214
214
|
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/const-image"
|
|
215
215
|
var const_image_ = __webpack_require__(9702);
|
|
216
|
+
;// CONCATENATED MODULE: external "papaparse"
|
|
217
|
+
var external_papaparse_namespaceObject = require("papaparse");
|
|
218
|
+
var external_papaparse_default = /*#__PURE__*/__webpack_require__.n(external_papaparse_namespaceObject);
|
|
216
219
|
;// CONCATENATED MODULE: ./src/webgl/adddata/AddDataViewModel.js
|
|
217
220
|
|
|
218
221
|
|
|
219
222
|
|
|
220
223
|
|
|
224
|
+
|
|
221
225
|
//添加数据逻辑类
|
|
222
226
|
|
|
223
227
|
class AddDataViewModel {
|
|
@@ -241,13 +245,15 @@ class AddDataViewModel {
|
|
|
241
245
|
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
|
|
242
246
|
eyeOffset: Cesium.Cartesian3.ZERO,
|
|
243
247
|
pixelOffset: new Cesium.Cartesian2(0, -8),
|
|
244
|
-
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
248
|
+
disableDepthTestDistance: 10000000 // disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
249
|
+
|
|
245
250
|
},
|
|
246
251
|
billboard: {
|
|
247
252
|
image: const_image_.BILLBOARD_IMAGE_URL,
|
|
248
253
|
width: 12,
|
|
249
254
|
height: 12,
|
|
250
|
-
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
255
|
+
disableDepthTestDistance: 10000000 // disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
256
|
+
|
|
251
257
|
},
|
|
252
258
|
polyline: {
|
|
253
259
|
width: 2.0,
|
|
@@ -302,8 +308,7 @@ class AddDataViewModel {
|
|
|
302
308
|
that._viewer.dataSources.add(ds); // ds.autoAvoid(that._viewer);
|
|
303
309
|
|
|
304
310
|
|
|
305
|
-
that.
|
|
306
|
-
|
|
311
|
+
that.flyToLayer(ds);
|
|
307
312
|
resolve("success");
|
|
308
313
|
var layer = {
|
|
309
314
|
guid: ds.guid,
|
|
@@ -321,7 +326,7 @@ class AddDataViewModel {
|
|
|
321
326
|
cb && cb(layer);
|
|
322
327
|
});
|
|
323
328
|
} else {
|
|
324
|
-
reject(file.name + "
|
|
329
|
+
reject(file.name + " file parser error.");
|
|
325
330
|
cb && cb("error");
|
|
326
331
|
}
|
|
327
332
|
});
|
|
@@ -344,8 +349,129 @@ class AddDataViewModel {
|
|
|
344
349
|
that._viewer.dataSources.add(ds); // ds.autoAvoid(that._viewer);
|
|
345
350
|
|
|
346
351
|
|
|
347
|
-
that.
|
|
352
|
+
that.flyToLayer(ds);
|
|
353
|
+
resolve("success");
|
|
354
|
+
var layer = {
|
|
355
|
+
guid: ds.guid,
|
|
356
|
+
name: name,
|
|
357
|
+
visible: true,
|
|
358
|
+
serverType: "datasource",
|
|
359
|
+
lsType: "ls",
|
|
360
|
+
url: res,
|
|
361
|
+
addType: "geojson",
|
|
362
|
+
shapeType: that._layerManager.getShapeType(ds)
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
that._layerManager.addTempLayerNode(layer);
|
|
366
|
+
|
|
367
|
+
cb && cb(layer);
|
|
368
|
+
});
|
|
369
|
+
} else {
|
|
370
|
+
reject(file.name + " file parser error.");
|
|
371
|
+
cb && cb("error");
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
} else if (ext === "csv") {
|
|
375
|
+
(0,util_.readFile)(file, res => {
|
|
376
|
+
var features = external_papaparse_default().parse(res, {
|
|
377
|
+
skipEmptyLines: true,
|
|
378
|
+
header: true
|
|
379
|
+
}).data;
|
|
380
|
+
let _featureCollection = {
|
|
381
|
+
type: "FeatureCollection",
|
|
382
|
+
features: []
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
for (var i = 0; i < features.length; i++) {
|
|
386
|
+
let item = features[i];
|
|
387
|
+
let lat = null;
|
|
388
|
+
let lng = null;
|
|
389
|
+
let properties = {};
|
|
390
|
+
|
|
391
|
+
for (var j in item) {
|
|
392
|
+
if (j.toUpperCase().indexOf("LAT") != -1) {
|
|
393
|
+
lat = item[j];
|
|
394
|
+
} else if (j.toUpperCase().indexOf("LNG") != -1 || j.toUpperCase().indexOf("LON") != -1) {
|
|
395
|
+
lng = item[j];
|
|
396
|
+
} else if (j.toUpperCase() === "X") {
|
|
397
|
+
lat = item[j];
|
|
398
|
+
} else if (j.toUpperCase() === "Y") {
|
|
399
|
+
lng = item[j];
|
|
400
|
+
} else {
|
|
401
|
+
properties[j] = item[j];
|
|
402
|
+
}
|
|
403
|
+
} // 点数据
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
if (lat && lng) {
|
|
407
|
+
let _point = {
|
|
408
|
+
type: "Feature",
|
|
409
|
+
geometry: {
|
|
410
|
+
type: "Point",
|
|
411
|
+
coordinates: [Number(lng), Number(lat)]
|
|
412
|
+
},
|
|
413
|
+
properties: properties
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
_featureCollection.features.push(_point);
|
|
417
|
+
} else {}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
if (_featureCollection.features.length > 0) {
|
|
421
|
+
var ds = new Cesium.Kq3dGeoJsonDataSource(name);
|
|
422
|
+
ds.load(_featureCollection, that._geojsonStyle).then(ds => {
|
|
423
|
+
ds.entities.values.forEach(entity => {
|
|
424
|
+
if (entity.polygon) {
|
|
425
|
+
entity.polyline = {
|
|
426
|
+
positions: entity.polygon.hierarchy._value.positions,
|
|
427
|
+
width: that._geojsonStyle.polygon.outlineWidth,
|
|
428
|
+
material: that._geojsonStyle.polygon.outlineColor
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
that._viewer.dataSources.add(ds);
|
|
434
|
+
|
|
435
|
+
that.flyToLayer(ds);
|
|
436
|
+
resolve("success");
|
|
437
|
+
var layer = {
|
|
438
|
+
guid: ds.guid,
|
|
439
|
+
name: name,
|
|
440
|
+
visible: true,
|
|
441
|
+
serverType: "datasource",
|
|
442
|
+
lsType: "ls",
|
|
443
|
+
url: _featureCollection,
|
|
444
|
+
addType: "geojson",
|
|
445
|
+
shapeType: that._layerManager.getShapeType(ds)
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
that._layerManager.addTempLayerNode(layer);
|
|
449
|
+
|
|
450
|
+
cb && cb(layer);
|
|
451
|
+
});
|
|
452
|
+
} else {
|
|
453
|
+
reject(file.name + " file parser error.");
|
|
454
|
+
cb && cb("error");
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
} else if (ext === "xls" || ext === "xlsx") {
|
|
458
|
+
(0,util_.readExcel)(file, this._language, res => {
|
|
459
|
+
if (res) {
|
|
460
|
+
var ds = new Cesium.Kq3dGeoJsonDataSource(name);
|
|
461
|
+
ds.load(res, that._geojsonStyle).then(ds => {
|
|
462
|
+
ds.entities.values.forEach(entity => {
|
|
463
|
+
if (entity.polygon) {
|
|
464
|
+
entity.polyline = {
|
|
465
|
+
positions: entity.polygon.hierarchy._value.positions,
|
|
466
|
+
width: that._geojsonStyle.polygon.outlineWidth,
|
|
467
|
+
material: that._geojsonStyle.polygon.outlineColor
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
that._viewer.dataSources.add(ds);
|
|
348
473
|
|
|
474
|
+
that.flyToLayer(ds);
|
|
349
475
|
resolve("success");
|
|
350
476
|
var layer = {
|
|
351
477
|
guid: ds.guid,
|
|
@@ -363,7 +489,8 @@ class AddDataViewModel {
|
|
|
363
489
|
cb && cb(layer);
|
|
364
490
|
});
|
|
365
491
|
} else {
|
|
366
|
-
reject(file.name + "
|
|
492
|
+
reject(file.name + " file parser error.");
|
|
493
|
+
cb && cb("error");
|
|
367
494
|
}
|
|
368
495
|
});
|
|
369
496
|
} else {
|
|
@@ -417,8 +544,7 @@ class AddDataViewModel {
|
|
|
417
544
|
that._viewer.dataSources.add(ds); // ds.autoAvoid(that._viewer);
|
|
418
545
|
|
|
419
546
|
|
|
420
|
-
that.
|
|
421
|
-
|
|
547
|
+
that.flyToLayer(ds);
|
|
422
548
|
resolve("success");
|
|
423
549
|
var layer = {
|
|
424
550
|
guid: ds.guid,
|
|
@@ -451,8 +577,7 @@ class AddDataViewModel {
|
|
|
451
577
|
ds.load(data).then(ds => {
|
|
452
578
|
that._viewer.dataSources.add(ds);
|
|
453
579
|
|
|
454
|
-
that.
|
|
455
|
-
|
|
580
|
+
that.flyToLayer(ds);
|
|
456
581
|
resolve("success");
|
|
457
582
|
var layer = {
|
|
458
583
|
guid: ds.guid,
|
|
@@ -480,8 +605,7 @@ class AddDataViewModel {
|
|
|
480
605
|
ds.load(file).then(ds => {
|
|
481
606
|
that._viewer.dataSources.add(ds);
|
|
482
607
|
|
|
483
|
-
that.
|
|
484
|
-
|
|
608
|
+
that.flyToLayer(ds);
|
|
485
609
|
resolve("success");
|
|
486
610
|
var layer = {
|
|
487
611
|
guid: ds.guid,
|
|
@@ -513,8 +637,7 @@ class AddDataViewModel {
|
|
|
513
637
|
that._viewer.dataSources.add(Cesium.CzmlDataSource.load(ret, {
|
|
514
638
|
name: name
|
|
515
639
|
})).then(ds => {
|
|
516
|
-
that.
|
|
517
|
-
|
|
640
|
+
that.flyToLayer(ds);
|
|
518
641
|
resolve("success");
|
|
519
642
|
var layer = {
|
|
520
643
|
guid: ds.guid,
|
|
@@ -554,7 +677,7 @@ class AddDataViewModel {
|
|
|
554
677
|
} //解析数据源
|
|
555
678
|
|
|
556
679
|
|
|
557
|
-
parseDataSource(options, cb) {
|
|
680
|
+
parseDataSource(options, cb, loadCustom) {
|
|
558
681
|
options = options || {};
|
|
559
682
|
|
|
560
683
|
if (options.url && options.url !== "") {
|
|
@@ -573,13 +696,13 @@ class AddDataViewModel {
|
|
|
573
696
|
} catch (error) {
|
|
574
697
|
(0,message/* default */.Z)({
|
|
575
698
|
message: this._language.errorUrlAddress,
|
|
576
|
-
type: "
|
|
699
|
+
type: "warning"
|
|
577
700
|
});
|
|
578
701
|
return;
|
|
579
702
|
}
|
|
580
703
|
|
|
581
704
|
if (options.type === "kml") {
|
|
582
|
-
this.parseService(options, cb);
|
|
705
|
+
this.parseService(options, cb, loadCustom);
|
|
583
706
|
return;
|
|
584
707
|
}
|
|
585
708
|
|
|
@@ -589,17 +712,17 @@ class AddDataViewModel {
|
|
|
589
712
|
if (data.status !== 200) {
|
|
590
713
|
(0,message/* default */.Z)({
|
|
591
714
|
message: this._language.serviceNotAvailable,
|
|
592
|
-
type: "
|
|
715
|
+
type: "warning"
|
|
593
716
|
});
|
|
594
717
|
} else {
|
|
595
718
|
try {
|
|
596
|
-
this.parseService(options, cb);
|
|
719
|
+
this.parseService(options, cb, loadCustom);
|
|
597
720
|
} catch {}
|
|
598
721
|
}
|
|
599
722
|
}).catch(() => {
|
|
600
723
|
(0,message/* default */.Z)({
|
|
601
724
|
message: this._language.serviceNotAvailable,
|
|
602
|
-
type: "
|
|
725
|
+
type: "warning"
|
|
603
726
|
});
|
|
604
727
|
});
|
|
605
728
|
} else {
|
|
@@ -611,7 +734,7 @@ class AddDataViewModel {
|
|
|
611
734
|
} //解析服务
|
|
612
735
|
|
|
613
736
|
|
|
614
|
-
parseService(options, cb) {
|
|
737
|
+
parseService(options, cb, loadCustom) {
|
|
615
738
|
let that = this;
|
|
616
739
|
let url = options.url;
|
|
617
740
|
let type = options.type || "";
|
|
@@ -742,6 +865,7 @@ class AddDataViewModel {
|
|
|
742
865
|
break;
|
|
743
866
|
|
|
744
867
|
case "kqgis3dserver":
|
|
868
|
+
// KQGIS 三维服务
|
|
745
869
|
var geojsonStyle0 = { ...this._geojsonStyle
|
|
746
870
|
};
|
|
747
871
|
|
|
@@ -865,7 +989,7 @@ class AddDataViewModel {
|
|
|
865
989
|
children: [],
|
|
866
990
|
lsType: "ls"
|
|
867
991
|
};
|
|
868
|
-
const service = new KqGIS.Map.GetMapImageInfoService(url);
|
|
992
|
+
const service = new window.KqGIS.Map.GetMapImageInfoService(url);
|
|
869
993
|
service.init(result => {
|
|
870
994
|
if (result.resultcode === "success") {
|
|
871
995
|
let list = service.collectionInfoList;
|
|
@@ -899,31 +1023,24 @@ class AddDataViewModel {
|
|
|
899
1023
|
} else {
|
|
900
1024
|
console.log("解析服务原始信息失败.");
|
|
901
1025
|
}
|
|
902
|
-
});
|
|
903
|
-
|
|
904
|
-
// name: name,
|
|
905
|
-
// url: url,
|
|
906
|
-
// layerName: name
|
|
907
|
-
// })
|
|
908
|
-
// );
|
|
909
|
-
// this.flyToLayer(layer);
|
|
910
|
-
// node = {
|
|
911
|
-
// guid: layer.guid,
|
|
912
|
-
// name: name,
|
|
913
|
-
// visible: true,
|
|
914
|
-
// serverType: "imagerylayer",
|
|
915
|
-
// lsType: "ls",
|
|
916
|
-
// url: url,
|
|
917
|
-
// addType: type,
|
|
918
|
-
// layerName: name,
|
|
919
|
-
// type: "Image" // 图层树显示图标使用
|
|
920
|
-
// };
|
|
921
|
-
// this._layerManager.addTempLayerNode(node);
|
|
922
|
-
// cb && cb(node);
|
|
1026
|
+
});
|
|
1027
|
+
break;
|
|
923
1028
|
|
|
1029
|
+
case "kqgisdataserver":
|
|
1030
|
+
// KQGIS 数据服务
|
|
1031
|
+
// addDataServer(url, name);
|
|
924
1032
|
break;
|
|
925
1033
|
|
|
926
1034
|
case "kqgismapserver":
|
|
1035
|
+
// KQGIS 地图服务
|
|
1036
|
+
if (loadCustom) {
|
|
1037
|
+
loadCustom({
|
|
1038
|
+
name,
|
|
1039
|
+
url
|
|
1040
|
+
});
|
|
1041
|
+
return;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
927
1044
|
node = {
|
|
928
1045
|
guid: Cesium.createGuid(),
|
|
929
1046
|
name: name,
|
|
@@ -947,7 +1064,7 @@ class AddDataViewModel {
|
|
|
947
1064
|
if (mapInfo.resultcode === "error") {
|
|
948
1065
|
(0,message/* default */.Z)({
|
|
949
1066
|
message: mapInfo.message,
|
|
950
|
-
type: "
|
|
1067
|
+
type: "warning"
|
|
951
1068
|
});
|
|
952
1069
|
return;
|
|
953
1070
|
}
|
|
@@ -1000,6 +1117,7 @@ class AddDataViewModel {
|
|
|
1000
1117
|
break;
|
|
1001
1118
|
|
|
1002
1119
|
case "arcgismapserver":
|
|
1120
|
+
// ARCGIS 地图服务
|
|
1003
1121
|
layer = this._viewer.imageryLayers.addImageryProvider(new Cesium.Kq3dArcGISMapServerImageryProvider({
|
|
1004
1122
|
name: name,
|
|
1005
1123
|
url: url,
|
|
@@ -1023,6 +1141,7 @@ class AddDataViewModel {
|
|
|
1023
1141
|
break;
|
|
1024
1142
|
|
|
1025
1143
|
case "mvt":
|
|
1144
|
+
// 矢量瓦片
|
|
1026
1145
|
layer = this._viewer.imageryLayers.addImageryProvider(new Cesium.Kq3dMvtImageryProviderExt({
|
|
1027
1146
|
name: name,
|
|
1028
1147
|
style: url
|
|
@@ -1046,6 +1165,7 @@ class AddDataViewModel {
|
|
|
1046
1165
|
break;
|
|
1047
1166
|
|
|
1048
1167
|
case "kqgisdataflowserver":
|
|
1168
|
+
// KQGIS 数据流服务
|
|
1049
1169
|
let guid = Cesium.createGuid();
|
|
1050
1170
|
layer = new Cesium.Kq3dDataFlowLayer(this._viewer, {
|
|
1051
1171
|
url: url,
|
|
@@ -1113,8 +1233,10 @@ class AddDataViewModel {
|
|
|
1113
1233
|
break;
|
|
1114
1234
|
|
|
1115
1235
|
case "wmts":
|
|
1116
|
-
case "kqgistileserver":
|
|
1236
|
+
case "kqgistileserver": // KQGIS 瓦片服务
|
|
1237
|
+
|
|
1117
1238
|
case "kqgisaggregationserver":
|
|
1239
|
+
// KQGIS 聚合服务
|
|
1118
1240
|
if (type === "kqgistileserver") {
|
|
1119
1241
|
if (url.indexOf("?") > 0) {
|
|
1120
1242
|
url = url.replace("?", "/wmts?");
|
|
@@ -1178,8 +1300,7 @@ class AddDataViewModel {
|
|
|
1178
1300
|
that._viewer.dataSources.add(ds); // ds.autoAvoid(that._viewer);
|
|
1179
1301
|
|
|
1180
1302
|
|
|
1181
|
-
that.
|
|
1182
|
-
|
|
1303
|
+
that.flyToLayer(ds);
|
|
1183
1304
|
node = {
|
|
1184
1305
|
guid: ds.guid,
|
|
1185
1306
|
name: name,
|
|
@@ -1213,8 +1334,7 @@ class AddDataViewModel {
|
|
|
1213
1334
|
this._viewer.dataSources.add(ds); // ds.autoAvoid(this._viewer);
|
|
1214
1335
|
|
|
1215
1336
|
|
|
1216
|
-
|
|
1217
|
-
|
|
1337
|
+
that.flyToLayer(ds);
|
|
1218
1338
|
node = {
|
|
1219
1339
|
guid: ds.guid,
|
|
1220
1340
|
name: name,
|
|
@@ -1250,8 +1370,7 @@ class AddDataViewModel {
|
|
|
1250
1370
|
|
|
1251
1371
|
this._viewer.dataSources.add(ds);
|
|
1252
1372
|
|
|
1253
|
-
|
|
1254
|
-
|
|
1373
|
+
that.flyToLayer(ds);
|
|
1255
1374
|
node = {
|
|
1256
1375
|
guid: ds.guid,
|
|
1257
1376
|
name: name,
|
|
@@ -1278,8 +1397,7 @@ class AddDataViewModel {
|
|
|
1278
1397
|
ds.load(url).then(ds => {
|
|
1279
1398
|
this._viewer.dataSources.add(ds);
|
|
1280
1399
|
|
|
1281
|
-
|
|
1282
|
-
|
|
1400
|
+
that.flyToLayer(ds);
|
|
1283
1401
|
node = {
|
|
1284
1402
|
guid: ds.guid,
|
|
1285
1403
|
name: name,
|
|
@@ -1301,8 +1419,7 @@ class AddDataViewModel {
|
|
|
1301
1419
|
ds.load(url).then(ds => {
|
|
1302
1420
|
this._viewer.dataSources.add(ds);
|
|
1303
1421
|
|
|
1304
|
-
|
|
1305
|
-
|
|
1422
|
+
that.flyToLayer(ds);
|
|
1306
1423
|
node = {
|
|
1307
1424
|
guid: ds.guid,
|
|
1308
1425
|
name: name,
|
|
@@ -1346,6 +1463,68 @@ class AddDataViewModel {
|
|
|
1346
1463
|
default:
|
|
1347
1464
|
break;
|
|
1348
1465
|
}
|
|
1466
|
+
} // 添加数据服务
|
|
1467
|
+
|
|
1468
|
+
|
|
1469
|
+
addDataServer(url, name) {
|
|
1470
|
+
window.KqGIS.datasourceService(url).getDatasources(async e => {
|
|
1471
|
+
if (e.result.resultcode === 'success') {
|
|
1472
|
+
let datasourceList = e.result.result.datasources;
|
|
1473
|
+
|
|
1474
|
+
if (datasourceList) {
|
|
1475
|
+
for (let i = 0; i < datasourceList.length; i++) {
|
|
1476
|
+
await _getDatasetList(url, datasourceList[i].datasourceName);
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
} else {
|
|
1480
|
+
console.error(e);
|
|
1481
|
+
}
|
|
1482
|
+
}, err => {
|
|
1483
|
+
console.error(err);
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
_getDatasetList(url, dataSourceName) {
|
|
1488
|
+
let params = new window.KqGIS.Data.GetDatasetsInfoParams({
|
|
1489
|
+
datasourceName: dataSourceName
|
|
1490
|
+
});
|
|
1491
|
+
return new Promise((resolve, reject) => {
|
|
1492
|
+
window.KqGIS.datasetService(url).getDatasets(params, e => {
|
|
1493
|
+
if (e.result.resultcode === 'success') {
|
|
1494
|
+
resolve(e.result.result.datasets);
|
|
1495
|
+
} else {
|
|
1496
|
+
console.error(e);
|
|
1497
|
+
reject([]);
|
|
1498
|
+
}
|
|
1499
|
+
}, err => {
|
|
1500
|
+
console.error(err);
|
|
1501
|
+
reject([]);
|
|
1502
|
+
});
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
_getFeatureList(url, datasourceName, datasetName) {
|
|
1507
|
+
let params = new window.KqGIS.Data.GetFeaturesParamsBase({
|
|
1508
|
+
datasourceName: datasourceName,
|
|
1509
|
+
datasetName: datasetName,
|
|
1510
|
+
hasGeometry: true,
|
|
1511
|
+
returnContent: true,
|
|
1512
|
+
outSRS: 'EPSG:4326'
|
|
1513
|
+
});
|
|
1514
|
+
return new Promise((resolve, reject) => {
|
|
1515
|
+
window.KqGIS.dataFeatureService(url).getFeatureList(params, e => {
|
|
1516
|
+
if (e.result.resultcode === 'success') {
|
|
1517
|
+
e.result.result['datasetName'] = datasetName;
|
|
1518
|
+
resolve(e.result.result);
|
|
1519
|
+
} else {
|
|
1520
|
+
console.error(e);
|
|
1521
|
+
reject(null);
|
|
1522
|
+
}
|
|
1523
|
+
}, err => {
|
|
1524
|
+
console.error(err);
|
|
1525
|
+
resolve(null);
|
|
1526
|
+
});
|
|
1527
|
+
});
|
|
1349
1528
|
}
|
|
1350
1529
|
|
|
1351
1530
|
flyToLayer(layer) {
|
|
@@ -1365,7 +1544,7 @@ class AddDataViewModel {
|
|
|
1365
1544
|
destination: tileset.rectangle
|
|
1366
1545
|
});
|
|
1367
1546
|
});
|
|
1368
|
-
} else if (layer instanceof Cesium.GeoJsonDataSource || layer instanceof Cesium.Kq3dGeoJsonDataSource) {
|
|
1547
|
+
} else if (layer instanceof Cesium.GeoJsonDataSource || layer instanceof Cesium.Kq3dGeoJsonDataSource || layer instanceof Cesium.Kq3dEsriGeoJsonDataSource) {
|
|
1369
1548
|
let offset = new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-90), 0);
|
|
1370
1549
|
viewer.flyTo(layer, {
|
|
1371
1550
|
offset
|
|
@@ -1445,7 +1624,6 @@ const _hoisted_12 = {
|
|
|
1445
1624
|
|
|
1446
1625
|
|
|
1447
1626
|
|
|
1448
|
-
//accept=".zip,.geojson,.topojson,.json,.kml,.kmz,.czml,.csv,.xls,.xlsx,.txt"
|
|
1449
1627
|
|
|
1450
1628
|
const __default__ = {
|
|
1451
1629
|
name: "Kq3dAddData"
|
|
@@ -1482,6 +1660,11 @@ const __default__ = {
|
|
|
1482
1660
|
type: Function,
|
|
1483
1661
|
default: null
|
|
1484
1662
|
},
|
|
1663
|
+
// 自定义加载函数, 只对KQGIS REST服务生效, earthstudio使用
|
|
1664
|
+
loadCustom: {
|
|
1665
|
+
type: Function,
|
|
1666
|
+
default: null
|
|
1667
|
+
},
|
|
1485
1668
|
// 是否生成HeaderTemp
|
|
1486
1669
|
showHeaderTemp: {
|
|
1487
1670
|
type: Boolean,
|
|
@@ -1516,6 +1699,7 @@ const __default__ = {
|
|
|
1516
1699
|
expose
|
|
1517
1700
|
}) {
|
|
1518
1701
|
const props = __props;
|
|
1702
|
+
let accept = ".zip,.geojson,.topojson,.json,.kml,.kmz,.czml,.csv,.xls,.xlsx,.txt";
|
|
1519
1703
|
let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)({});
|
|
1520
1704
|
let selectTypeIndex = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(0); //URL服务支持的数据源类型
|
|
1521
1705
|
|
|
@@ -1574,104 +1758,111 @@ const __default__ = {
|
|
|
1574
1758
|
return [// {
|
|
1575
1759
|
// type: 'kq3dimageryfile',
|
|
1576
1760
|
// name: language.value.ImagertyTileFile,
|
|
1577
|
-
// namePlaceholder: language.value.
|
|
1761
|
+
// namePlaceholder: language.value.optional,
|
|
1578
1762
|
// urlPlaceholder: language.value.format +':http://<host>:<port>/xxx/<servername>/info.xml',
|
|
1579
1763
|
// description: language.value.imagertyTileFiledescription
|
|
1580
1764
|
// }, {
|
|
1581
1765
|
// type: 'obterrain',
|
|
1582
1766
|
// name: language.value.ObTerrainTileFile,
|
|
1583
|
-
// namePlaceholder: language.value.
|
|
1767
|
+
// namePlaceholder: language.value.optional,
|
|
1584
1768
|
// urlPlaceholder: language.value.format +':http://<host>:<port>/xxx/<servername>/info.xml',
|
|
1585
1769
|
// description: language.value.imagertyObTerrainTileFiledescription
|
|
1586
1770
|
// },
|
|
1587
1771
|
{
|
|
1588
1772
|
type: "kqgis3dserver",
|
|
1589
1773
|
name: language.value.KQGIS3DServer,
|
|
1590
|
-
namePlaceholder: language.value.
|
|
1774
|
+
namePlaceholder: language.value.optional,
|
|
1591
1775
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/kqgis/rest/services/<servername>/realspace",
|
|
1592
1776
|
description: language.value.imagerty3DServerdescription
|
|
1593
1777
|
}, {
|
|
1594
1778
|
type: "kqgismapserver",
|
|
1595
1779
|
name: language.value.KQGISMapServer,
|
|
1596
|
-
namePlaceholder: language.value.
|
|
1780
|
+
namePlaceholder: language.value.optional,
|
|
1597
1781
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/kqgis/rest/services/<servername>/map",
|
|
1598
1782
|
description: language.value.imagertyMapServerdescription
|
|
1599
|
-
}, {
|
|
1783
|
+
}, // {
|
|
1784
|
+
// type: "kqgisdataserver",
|
|
1785
|
+
// name: language.value.KQGISDataServer,
|
|
1786
|
+
// namePlaceholder: language.value.optional,
|
|
1787
|
+
// urlPlaceholder: language.value.format + ":http://<host>:<port>/kqgis/rest/services/<servername>/data",
|
|
1788
|
+
// description: language.value.imagertyDataServerdescription
|
|
1789
|
+
// },
|
|
1790
|
+
{
|
|
1600
1791
|
type: "kqgisimageserver",
|
|
1601
1792
|
name: language.value.KQGISImageServer,
|
|
1602
|
-
namePlaceholder: language.value.
|
|
1793
|
+
namePlaceholder: language.value.optional,
|
|
1603
1794
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/kqgis/rest/services/<servername>/image",
|
|
1604
1795
|
description: language.value.imagertyImageServerdescription
|
|
1605
1796
|
}, {
|
|
1606
1797
|
type: "kqgisdataflowserver",
|
|
1607
1798
|
name: language.value.KQGISDataflowServer,
|
|
1608
|
-
namePlaceholder: language.value.
|
|
1799
|
+
namePlaceholder: language.value.optional,
|
|
1609
1800
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/streaming/rest/services/<servername>/dataflow",
|
|
1610
1801
|
description: language.value.imagertyDataflowServerdescription
|
|
1611
1802
|
}, {
|
|
1612
1803
|
type: "kqgistileserver",
|
|
1613
1804
|
name: language.value.KQGISTileServer,
|
|
1614
|
-
namePlaceholder: language.value.
|
|
1805
|
+
namePlaceholder: language.value.optional,
|
|
1615
1806
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/kqgis/rest/services/<servername>/tile",
|
|
1616
1807
|
description: language.value.imagertyTileServerdescription
|
|
1617
1808
|
}, {
|
|
1618
1809
|
type: "kqgisaggregationserver",
|
|
1619
1810
|
name: language.value.KQGISAggregationServer,
|
|
1620
|
-
namePlaceholder: language.value.
|
|
1811
|
+
namePlaceholder: language.value.optional,
|
|
1621
1812
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/kqgis/rest/services/<servername>/map/wmts",
|
|
1622
1813
|
description: language.value.imagertyAggregationServerdescription
|
|
1623
1814
|
}, {
|
|
1624
1815
|
type: "s3m",
|
|
1625
1816
|
name: language.value.S3M,
|
|
1626
|
-
namePlaceholder: language.value.
|
|
1817
|
+
namePlaceholder: language.value.optional,
|
|
1627
1818
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/xxx/realspace/datas/xxx/config",
|
|
1628
1819
|
description: language.value.imagertyS3Mdescription
|
|
1629
1820
|
}, {
|
|
1630
1821
|
type: "arcgismapserver",
|
|
1631
1822
|
name: language.value.ArcGISMapServer,
|
|
1632
|
-
namePlaceholder: language.value.
|
|
1823
|
+
namePlaceholder: language.value.optional,
|
|
1633
1824
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/ArcGIS/rest/services/<servername>/MapServer",
|
|
1634
1825
|
description: language.value.imagertyArcGISMapServerdescription
|
|
1635
1826
|
}, {
|
|
1636
1827
|
type: "wms",
|
|
1637
1828
|
name: language.value.OGCWMS,
|
|
1638
|
-
namePlaceholder: language.value.
|
|
1829
|
+
namePlaceholder: language.value.optional,
|
|
1639
1830
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/kqgis/rest/services/<servername>/map/wms",
|
|
1640
1831
|
description: language.value.imagertyOGCWMSdescription
|
|
1641
1832
|
}, {
|
|
1642
1833
|
type: "wmts",
|
|
1643
1834
|
name: language.value.OGCWMTS,
|
|
1644
|
-
namePlaceholder: language.value.
|
|
1835
|
+
namePlaceholder: language.value.optional,
|
|
1645
1836
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/kqgis/rest/services/<servername>/map/wmts",
|
|
1646
1837
|
description: language.value.imagertyOGCWMTSdescription
|
|
1647
1838
|
}, {
|
|
1648
1839
|
type: "3dtiles",
|
|
1649
1840
|
name: language.value.Cesium3DTilesFile,
|
|
1650
|
-
namePlaceholder: language.value.
|
|
1841
|
+
namePlaceholder: language.value.optional,
|
|
1651
1842
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/tileset.json",
|
|
1652
1843
|
description: language.value.imagerty3DTilesFiledescription
|
|
1653
1844
|
}, {
|
|
1654
1845
|
type: "stkterrain",
|
|
1655
1846
|
name: language.value.StkTerrainTileFile,
|
|
1656
|
-
namePlaceholder: language.value.
|
|
1847
|
+
namePlaceholder: language.value.optional,
|
|
1657
1848
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/xxx/<foldername>/",
|
|
1658
1849
|
description: language.value.imagertyStkTerrainTileFiledescription
|
|
1659
1850
|
}, {
|
|
1660
1851
|
type: "geojson",
|
|
1661
1852
|
name: language.value.GeoJson,
|
|
1662
|
-
namePlaceholder: language.value.
|
|
1853
|
+
namePlaceholder: language.value.optional,
|
|
1663
1854
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/xxx.geojson",
|
|
1664
1855
|
description: language.value.imagertyGeoJsondescription
|
|
1665
1856
|
}, {
|
|
1666
1857
|
type: "arcjson",
|
|
1667
1858
|
name: language.value.ArcJson,
|
|
1668
|
-
namePlaceholder: language.value.
|
|
1859
|
+
namePlaceholder: language.value.optional,
|
|
1669
1860
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/xxx.json",
|
|
1670
1861
|
description: language.value.imagertyArcJsondescription
|
|
1671
1862
|
}, {
|
|
1672
1863
|
type: "mvt",
|
|
1673
1864
|
name: language.value.MVT,
|
|
1674
|
-
namePlaceholder: language.value.
|
|
1865
|
+
namePlaceholder: language.value.optional,
|
|
1675
1866
|
urlPlaceholder: language.value.format + ":http://<host>:<port>/mvt/style.json",
|
|
1676
1867
|
description: language.value.imagertyMVTdescription
|
|
1677
1868
|
}
|
|
@@ -1684,13 +1875,13 @@ const __default__ = {
|
|
|
1684
1875
|
}, {
|
|
1685
1876
|
type: 'kml',
|
|
1686
1877
|
name: language.value.KML,
|
|
1687
|
-
namePlaceholder: language.value.
|
|
1878
|
+
namePlaceholder: language.value.optional,
|
|
1688
1879
|
urlPlaceholder: language.value.format +': http://<host>:<port>/xxx/<servername>/xxx.kml',
|
|
1689
1880
|
description: language.value.imagertyKMLdescription
|
|
1690
1881
|
}, {
|
|
1691
1882
|
type: 'czml',
|
|
1692
1883
|
name: language.value.CZML,
|
|
1693
|
-
namePlaceholder: language.value.
|
|
1884
|
+
namePlaceholder: language.value.optional,
|
|
1694
1885
|
urlPlaceholder: language.value.format +': http://<host>:<port>/xxx/<servername>/xxx.czml',
|
|
1695
1886
|
description: language.value.imagertyCZMLdescription
|
|
1696
1887
|
}*/
|
|
@@ -1778,7 +1969,7 @@ const __default__ = {
|
|
|
1778
1969
|
type: dataSourceType.value.type,
|
|
1779
1970
|
url: dataSource.url,
|
|
1780
1971
|
name: dataSource.name
|
|
1781
|
-
}, props.loadCallback);
|
|
1972
|
+
}, props.loadCallback, props.loadCustom);
|
|
1782
1973
|
} // 重置
|
|
1783
1974
|
|
|
1784
1975
|
|
|
@@ -1861,7 +2052,7 @@ const __default__ = {
|
|
|
1861
2052
|
"auto-upload": false,
|
|
1862
2053
|
"file-list": (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(fileList),
|
|
1863
2054
|
"onUpdate:file-list": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(fileList) ? fileList.value = $event : fileList = $event),
|
|
1864
|
-
accept:
|
|
2055
|
+
accept: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(accept),
|
|
1865
2056
|
"on-change": changeFile,
|
|
1866
2057
|
ref_key: "upload_ref",
|
|
1867
2058
|
ref: upload_ref
|
|
@@ -1874,7 +2065,7 @@ const __default__ = {
|
|
|
1874
2065
|
|
|
1875
2066
|
}, 8
|
|
1876
2067
|
/* PROPS */
|
|
1877
|
-
, ["file-list"]), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(fileList).length === 0]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_4, [((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderList)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(operatorArray), (rowItem, i) => {
|
|
2068
|
+
, ["file-list", "accept"]), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(fileList).length === 0]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_4, [((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderList)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(operatorArray), (rowItem, i) => {
|
|
1878
2069
|
return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_row, {
|
|
1879
2070
|
key: i,
|
|
1880
2071
|
gutter: 20
|
|
@@ -1929,7 +2120,7 @@ const __default__ = {
|
|
|
1929
2120
|
action: "",
|
|
1930
2121
|
"show-file-list": false,
|
|
1931
2122
|
"auto-upload": false,
|
|
1932
|
-
accept:
|
|
2123
|
+
accept: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(accept),
|
|
1933
2124
|
ref_key: "upload_btn_ref",
|
|
1934
2125
|
ref: upload_btn_ref,
|
|
1935
2126
|
class: "kq3d-add-data-footer-upload",
|
|
@@ -1951,9 +2142,9 @@ const __default__ = {
|
|
|
1951
2142
|
_: 1
|
|
1952
2143
|
/* STABLE */
|
|
1953
2144
|
|
|
1954
|
-
},
|
|
1955
|
-
/*
|
|
1956
|
-
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
|
|
2145
|
+
}, 8
|
|
2146
|
+
/* PROPS */
|
|
2147
|
+
, ["accept"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
|
|
1957
2148
|
onClick: _cache[1] || (_cache[1] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => removeFiles(), ["stop"])),
|
|
1958
2149
|
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).clearFiles,
|
|
1959
2150
|
type: "primary"
|
|
@@ -2055,7 +2246,7 @@ const __default__ = {
|
|
|
2055
2246
|
|
|
2056
2247
|
}), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, null, {
|
|
2057
2248
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_form_item, {
|
|
2058
|
-
label: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).
|
|
2249
|
+
label: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).nodeName
|
|
2059
2250
|
}, {
|
|
2060
2251
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_input, {
|
|
2061
2252
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(dataSource).name,
|