@kq_npm/client3d_webgl_vue 3.6.9-beta → 3.7.1-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/flight/index.js +17 -11
- package/flight/style/flight.css +1 -1
- package/index.js +307 -49
- package/measure/index.js +2 -2
- package/package.json +1 -1
- package/scenceview/index.js +307 -49
- package/style.css +1 -1
package/flight/index.js
CHANGED
|
@@ -451,6 +451,7 @@ const __default__ = {
|
|
|
451
451
|
dataList = JSON.parse(JSON.stringify(dataList));
|
|
452
452
|
dataList.forEach(path => {
|
|
453
453
|
path.isPlaying = false;
|
|
454
|
+
path.isRepeat = false;
|
|
454
455
|
pathList.push(path);
|
|
455
456
|
});
|
|
456
457
|
});
|
|
@@ -536,7 +537,9 @@ const __default__ = {
|
|
|
536
537
|
}
|
|
537
538
|
|
|
538
539
|
viewModel.play();
|
|
539
|
-
item.isPlaying = true;
|
|
540
|
+
item.isPlaying = true; // 设置循环播放
|
|
541
|
+
|
|
542
|
+
viewModel.setAutoRepeat(item.isRepeat);
|
|
540
543
|
} //路径播放暂停
|
|
541
544
|
|
|
542
545
|
|
|
@@ -552,9 +555,12 @@ const __default__ = {
|
|
|
552
555
|
} //循环播放
|
|
553
556
|
|
|
554
557
|
|
|
555
|
-
function repeat() {
|
|
556
|
-
|
|
557
|
-
|
|
558
|
+
function repeat(item) {
|
|
559
|
+
item.isRepeat = !item.isRepeat;
|
|
560
|
+
|
|
561
|
+
if (item.isPlaying) {
|
|
562
|
+
viewModel.setAutoRepeat(item.isRepeat);
|
|
563
|
+
}
|
|
558
564
|
} //显示更多功能菜单
|
|
559
565
|
|
|
560
566
|
|
|
@@ -901,17 +907,17 @@ const __default__ = {
|
|
|
901
907
|
/* PROPS, DYNAMIC_SLOTS */
|
|
902
908
|
, ["onClick", "title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
|
|
903
909
|
size: 16,
|
|
904
|
-
class:
|
|
905
|
-
onClick: repeat,
|
|
910
|
+
class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)(item.isRepeat ? 'kq-icon-light' : ''),
|
|
911
|
+
onClick: $event => repeat(item),
|
|
906
912
|
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).repeat
|
|
907
913
|
}, {
|
|
908
914
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(client_icons_vue_.IconVideoRepeat))]),
|
|
909
|
-
_:
|
|
910
|
-
/*
|
|
915
|
+
_: 2
|
|
916
|
+
/* DYNAMIC */
|
|
911
917
|
|
|
912
|
-
},
|
|
913
|
-
/* PROPS */
|
|
914
|
-
, ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
|
|
918
|
+
}, 1032
|
|
919
|
+
/* PROPS, DYNAMIC_SLOTS */
|
|
920
|
+
, ["class", "onClick", "title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
|
|
915
921
|
size: 16,
|
|
916
922
|
class: "menuIcon",
|
|
917
923
|
onClick: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => showDropDownMenu(item, index), ["prevent", "stop"]),
|
package/flight/style/flight.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.kq-flight3d{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color)}.kq-flight3d .kq-flight3d-box{width:466px}.kq-flight3d p{margin:0}.kq-flight3d .kq-flight3d-btns{display:-webkit-box;display:-ms-flexbox;display:flex}.kq-flight3d .kq-flight3d-btns .kq-button{width:48px;height:48px;margin-right:12px}.kq-flight3d .kq-flight3d-btns .kq-button .kq-icon{color:var(--kq-color-primary)}.kq-flight3d .pathlist-ul{height:100%;margin-top:0;margin-bottom:0;border-right:none}.kq-flight3d .pathlist-ul
|
|
1
|
+
.kq-flight3d{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color)}.kq-flight3d .kq-flight3d-box{width:466px}.kq-flight3d p{margin:0}.kq-flight3d .kq-flight3d-btns{display:-webkit-box;display:-ms-flexbox;display:flex}.kq-flight3d .kq-flight3d-btns .kq-button{width:48px;height:48px;margin-right:12px}.kq-flight3d .kq-flight3d-btns .kq-button .kq-icon{color:var(--kq-color-primary)}.kq-flight3d .pathlist-ul{color:var(--kq-text-color-regular);height:100%;margin-top:0;margin-bottom:0;border-right:none}.kq-flight3d .pathlist-ul .kq-icon{color:var(--kq-text-color-regular);cursor:pointer}.kq-flight3d .pathlist-ul .kq-icon-light{color:var(--kq-color-primary)}.kq-flight3d .pathlist-ul li{position:relative;height:32px;line-height:32px;list-style-type:none;border-bottom:var(--kq-border-width) var(--kq-border-style) var(--kq-border-color);padding:0!important;cursor:unset}.kq-flight3d .pathlist-ul li span{text-indent:8px;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;width:100%}.kq-flight3d .dropdown-ul{width:84px;background-color:var(--kq-bg-color);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:var(--kq-box-shadow);box-shadow:var(--kq-box-shadow);text-align:center;position:fixed;z-index:9999999;border-right:none;padding:8px 0}.kq-flight3d .dropdown-ul .kq-icon{color:var(--kq-text-color-regular)}.kq-flight3d .dropdown-ul li{height:30px;padding-left:12px!important}.kq-flight3d .kq-flight3d-list-title{line-height:24px;margin:8px 0;text-align:center}.kq-flight3d .kq-flight3d-add-title,.kq-flight3d .kq-flight3d-list-title{color:var(--kq-text-color-primary);background:var(--kq-fill-color-light);font-size:16px;padding:12px 16px;font-weight:700}.kq-flight3d .kq-flight3d-add-title .kq-button{height:22px;padding:0 12px 0 0}.kq-flight3d .kq-flight3d-add-title .kq-icon{color:var(--kq-text-color-regular)}.kq-flight3d .kq-flight3d-item-name{color:var(--kq-text-color-regular);margin:8px 0}.kq-flight3d .kq-table .cell{padding:0 8px}.kq-flight3d .kq-table .kq-button{width:32px;height:32px}.kq-flight3d .kq-table .kq-button+.kq-button{margin-left:8px}.kq-flight3d .kq-table .kq-icon{color:var(--kq-text-color-regular)}.kq-flight3d .kq-flight3d-btn-add{margin:8px 0;width:100%;color:var(--kq-color-primary)}.kq-flight3d .kq-flight3d-btn-add .kq-icon{color:var(--kq-text-color-regular);margin-right:10px}.kq-flight3d .kq-flight3d-ybf{color:var(--kq-text-color-regular);background:var(--kq-fill-color-light);font-size:var(--kq-font-size-base);line-height:32px;padding:12px 16px;margin-bottom:8px!important}.kq-flight3d .kq-flight3d-ybf .kq-form-item__content{height:32px}.kq-flight3d .kq-flight3d-ybf .kq-form-item__content div{width:100%;text-align:center}.kq-flight3d .kq-flight3d-ybf .kq-icon{color:var(--kq-text-color-regular);margin:0 12px;cursor:pointer}.kq-flight3d .kq-divider{margin:0 0 16px}
|
package/index.js
CHANGED
|
@@ -599,13 +599,12 @@ class DrawManager {
|
|
|
599
599
|
text: {
|
|
600
600
|
text: "文字标注",
|
|
601
601
|
//文字内容
|
|
602
|
-
fontSize:
|
|
602
|
+
fontSize: 25,
|
|
603
603
|
//文字大小
|
|
604
|
-
|
|
605
|
-
//文字颜色
|
|
606
|
-
opacity: 0.5,
|
|
607
|
-
|
|
608
|
-
clampToGround: false //是否贴地
|
|
604
|
+
fontFamily: 'Microsoft YaHei',
|
|
605
|
+
color: "#ff0000" //文字颜色
|
|
606
|
+
// opacity: 0.5, //文字颜色透明度
|
|
607
|
+
// clampToGround: false //是否贴地
|
|
609
608
|
|
|
610
609
|
},
|
|
611
610
|
//点-图标样式
|
|
@@ -616,8 +615,9 @@ class DrawManager {
|
|
|
616
615
|
//图标宽度
|
|
617
616
|
height: 32,
|
|
618
617
|
//图标高度
|
|
619
|
-
clampToGround: true
|
|
620
|
-
|
|
618
|
+
clampToGround: true,
|
|
619
|
+
//是否贴地
|
|
620
|
+
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
621
621
|
},
|
|
622
622
|
//折线样式
|
|
623
623
|
polyline: {
|
|
@@ -758,22 +758,65 @@ class DrawManager {
|
|
|
758
758
|
transparent: true
|
|
759
759
|
});
|
|
760
760
|
return material;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
getImageWithColor(imgUrl, color, width = 32, height = 32) {
|
|
764
|
+
if (color) {
|
|
765
|
+
var svgStr = window.atob(imgUrl.split(',')[1]);
|
|
766
|
+
var regex = /#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/g; // 修改svg颜色
|
|
767
|
+
|
|
768
|
+
svgStr = svgStr.replace(regex, color); // 修改svg大小
|
|
769
|
+
|
|
770
|
+
svgStr = svgStr.replace('width="16"', 'width="' + width + '"').replace('height="16"', 'height="' + height + '"');
|
|
771
|
+
imgUrl = "data:image/svg+xml;base64," + window.btoa(svgStr);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
return imgUrl;
|
|
761
775
|
} //开始绘制
|
|
762
776
|
|
|
763
777
|
|
|
764
778
|
startDraw(type, options, callback, groupName) {
|
|
765
|
-
|
|
779
|
+
if (!options) options = {};
|
|
766
780
|
|
|
767
781
|
if (type === "point") {
|
|
768
782
|
type = "marker";
|
|
769
|
-
options.disableDepthTestDistance = Number.POSITIVE_INFINITY;
|
|
770
783
|
}
|
|
771
784
|
|
|
772
|
-
if (
|
|
773
|
-
|
|
785
|
+
if (type === "coloricon") {
|
|
786
|
+
type = "marker";
|
|
787
|
+
options.iconSize = [32, 32];
|
|
788
|
+
options.iconUrl = const_image_namespaceObject.LABEL_SVG_ICONS[0];
|
|
789
|
+
options.image = this.getImageWithColor(const_image_namespaceObject.LABEL_SVG_ICONS[0], options.color);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
if (type === "text") {
|
|
793
|
+
this._viewer.scene.globe.depthTestAgainstTerrain = false;
|
|
794
|
+
} else {
|
|
795
|
+
this._viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
var unionOptions = { ...this._drawStyle[type],
|
|
799
|
+
...options
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
if (type === "polyline") {
|
|
803
|
+
//标记组件使用
|
|
804
|
+
options.opacity = 1;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
if (type === "text") {
|
|
808
|
+
//标记组件使用
|
|
809
|
+
options.fontSize = this._drawStyle.text.fontSize;
|
|
810
|
+
options.fontFamily = this._drawStyle.text.fontFamily;
|
|
811
|
+
options.content = this._drawStyle.text.text;
|
|
812
|
+
options.is3D = true;
|
|
813
|
+
}
|
|
774
814
|
|
|
775
|
-
|
|
776
|
-
|
|
815
|
+
if (type === "polyline" || type === "polygon") {
|
|
816
|
+
//标记组件使用
|
|
817
|
+
if (unionOptions.hasOwnProperty("weight")) {
|
|
818
|
+
unionOptions.width = unionOptions.weight;
|
|
819
|
+
}
|
|
777
820
|
}
|
|
778
821
|
|
|
779
822
|
if (unionOptions.hasOwnProperty("color")) {
|
|
@@ -786,24 +829,31 @@ class DrawManager {
|
|
|
786
829
|
|
|
787
830
|
this._drawHandler.startDraw(type, type, unionOptions);
|
|
788
831
|
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
832
|
+
var that = this;
|
|
833
|
+
var removeEventListener = this.drawFinishedEvent.addEventListener(shape => {
|
|
834
|
+
if (groupName) shape.groupName = groupName;
|
|
835
|
+
|
|
836
|
+
if (shape.type === "text") {
|
|
837
|
+
setTimeout(() => {
|
|
838
|
+
shape._label.disableDepthTestDistance = Number.POSITIVE_INFINITY;
|
|
839
|
+
}, 200);
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
shape.options = options;
|
|
843
|
+
|
|
844
|
+
if (callback) {
|
|
794
845
|
var feature = that.shapeToGeoFeature(shape);
|
|
795
846
|
callback(feature.geometry, {
|
|
796
847
|
layer: shape.guid
|
|
797
848
|
});
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
removeEventListener();
|
|
852
|
+
});
|
|
801
853
|
}
|
|
802
854
|
|
|
803
855
|
stopDraw() {
|
|
804
856
|
this._drawHandler.stopDraw();
|
|
805
|
-
|
|
806
|
-
this._viewer.scene.globe.depthTestAgainstTerrain = false;
|
|
807
857
|
} //是否启用连续绘制
|
|
808
858
|
|
|
809
859
|
|
|
@@ -868,7 +918,9 @@ class DrawManager {
|
|
|
868
918
|
var that = this;
|
|
869
919
|
|
|
870
920
|
if (shape) {
|
|
871
|
-
if (shape.
|
|
921
|
+
if (shape.controlPoints && shape.controlPoints.length === 0) return shape;
|
|
922
|
+
|
|
923
|
+
if (shape.type === that._drawHandler.ShapeTypes.MARKER.type || shape.type === that._drawHandler.ShapeTypes.TEXT.type) {
|
|
872
924
|
let position = that.transformPosition(shape._position);
|
|
873
925
|
geoFeature = window.turf.point(position);
|
|
874
926
|
} else if (shape.type === that._drawHandler.ShapeTypes.CIRCLE.type) {
|
|
@@ -886,12 +938,14 @@ class DrawManager {
|
|
|
886
938
|
});
|
|
887
939
|
geoFeature = window.turf.lineStrings(position).features[0];
|
|
888
940
|
} else if (shape.type === that._drawHandler.ShapeTypes.RECTANGLE.type) {
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
941
|
+
if (shape.rectangle) {
|
|
942
|
+
let minX = shape.rectangle.west / Math.PI * 180;
|
|
943
|
+
let maxX = shape.rectangle.east / Math.PI * 180;
|
|
944
|
+
let minY = shape.rectangle.south / Math.PI * 180;
|
|
945
|
+
let maxY = shape.rectangle.north / Math.PI * 180;
|
|
946
|
+
let positions1 = [[[minX, minY], [minX, maxY], [maxX, maxY], [maxX, minY], [minX, minY]]];
|
|
947
|
+
geoFeature = window.turf.polygon(positions1);
|
|
948
|
+
}
|
|
895
949
|
} else if (shape.type === that._drawHandler.ShapeTypes.POLYGON.type) {
|
|
896
950
|
let positions = [[]];
|
|
897
951
|
let posi;
|
|
@@ -1140,24 +1194,222 @@ class DrawManager {
|
|
|
1140
1194
|
let primitive = this._drawLayer.getById(id);
|
|
1141
1195
|
|
|
1142
1196
|
if (!primitive) return;
|
|
1143
|
-
let type = primitive.
|
|
1144
|
-
|
|
1145
|
-
if (type === '
|
|
1197
|
+
let type = primitive._geoType;
|
|
1198
|
+
|
|
1199
|
+
if (primitive.type === 'text') {
|
|
1200
|
+
primitive.fontSize = style.fontSize;
|
|
1201
|
+
primitive.fontFamily = style.fontFamily;
|
|
1202
|
+
primitive.text = style.content;
|
|
1203
|
+
primitive.fillColor = Cesium.Color.fromCssColorString(style.color);
|
|
1204
|
+
} else if (type === 'point') {
|
|
1205
|
+
primitive.image = this.getImageWithColor(style.iconUrl, style.color, style.iconSize[0], style.iconSize[1]);
|
|
1206
|
+
primitive.width = style.iconSize[0];
|
|
1207
|
+
primitive.height = style.iconSize[1];
|
|
1146
1208
|
} else if (type === 'polyline' || type === 'polygon') {
|
|
1147
1209
|
if (style.weight) primitive.width = style.weight;
|
|
1148
1210
|
if (style.color) primitive.color = Cesium.Color.fromCssColorString(style.color);
|
|
1149
1211
|
if (style.dashArray) primitive.dashArray = style.dashArray;
|
|
1212
|
+
if (style.opacity) primitive.color = primitive.color.withAlpha(style.opacity);
|
|
1150
1213
|
}
|
|
1151
1214
|
|
|
1152
1215
|
if (type === 'polygon') {
|
|
1153
|
-
primitive.fill = style.fill;
|
|
1216
|
+
primitive.fill = style.fill === undefined ? true : style.fill;
|
|
1154
1217
|
|
|
1155
|
-
if (
|
|
1218
|
+
if (primitive.fill) {
|
|
1156
1219
|
let opacity = style.fillOpacity || this._drawStyle.polygon.fillOpacity;
|
|
1157
1220
|
if (style.fillColor) primitive.fillColor = Cesium.Color.fromCssColorString(style.fillColor).withAlpha(opacity);
|
|
1158
1221
|
}
|
|
1222
|
+
} // 存储绘图样式, 标记组件使用
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
primitive.options = style;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
getShapeTypeById(id) {
|
|
1229
|
+
let type = '';
|
|
1230
|
+
|
|
1231
|
+
let primitive = this._drawLayer.getById(id);
|
|
1232
|
+
|
|
1233
|
+
if (primitive) {
|
|
1234
|
+
type = primitive.type;
|
|
1235
|
+
if (type == 'marker') type = 'Marker';
|
|
1236
|
+
if (type == 'polyline') type = 'Line';
|
|
1237
|
+
if (type == 'polygon') type = 'Polygon';
|
|
1238
|
+
if (type == 'rectangle') type = 'Rectangle';
|
|
1239
|
+
if (type == 'circle') type = 'Circle';
|
|
1240
|
+
if (type == 'text') type = 'Text';
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
return type;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
getShapeStyle(id) {
|
|
1247
|
+
let primitive = this._drawLayer.getById(id);
|
|
1248
|
+
|
|
1249
|
+
if (primitive) {
|
|
1250
|
+
return primitive.options;
|
|
1159
1251
|
}
|
|
1160
1252
|
}
|
|
1253
|
+
|
|
1254
|
+
getShapeInfo(id) {
|
|
1255
|
+
let primitive = this._drawLayer.getById(id);
|
|
1256
|
+
|
|
1257
|
+
if (!primitive) return;
|
|
1258
|
+
let type = this.getShapeTypeById(id);
|
|
1259
|
+
let info = null;
|
|
1260
|
+
let options = primitive.options;
|
|
1261
|
+
|
|
1262
|
+
if (type == "Marker") {
|
|
1263
|
+
info = {
|
|
1264
|
+
coordinate: primitive.position,
|
|
1265
|
+
style: {
|
|
1266
|
+
iconSize: options.iconSize,
|
|
1267
|
+
iconUrl: options.iconUrl,
|
|
1268
|
+
color: options.color
|
|
1269
|
+
}
|
|
1270
|
+
};
|
|
1271
|
+
} else if (type == "Line") {
|
|
1272
|
+
info = {
|
|
1273
|
+
coordinate: primitive.controlPoints,
|
|
1274
|
+
style: {
|
|
1275
|
+
opacity: options.opacity,
|
|
1276
|
+
color: options.color,
|
|
1277
|
+
weight: options.weight,
|
|
1278
|
+
dashArray: options.dashArray
|
|
1279
|
+
}
|
|
1280
|
+
};
|
|
1281
|
+
} else if (type == "Polygon" || type == "Rectangle" || type == "Circle") {
|
|
1282
|
+
info = {
|
|
1283
|
+
coordinate: primitive.controlPoints,
|
|
1284
|
+
style: {
|
|
1285
|
+
fillColor: options.fillColor,
|
|
1286
|
+
fillOpacity: options.fillOpacity,
|
|
1287
|
+
color: options.color,
|
|
1288
|
+
weight: options.weight
|
|
1289
|
+
}
|
|
1290
|
+
};
|
|
1291
|
+
} else if (type == "Text") {
|
|
1292
|
+
info = {
|
|
1293
|
+
coordinate: primitive.position,
|
|
1294
|
+
style: {
|
|
1295
|
+
fontSize: options.fontSize,
|
|
1296
|
+
fontFamily: options.fontFamily,
|
|
1297
|
+
color: options.color,
|
|
1298
|
+
content: options.content,
|
|
1299
|
+
is3D: true
|
|
1300
|
+
}
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
return info;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
getJsonByLayerList(layerList) {
|
|
1308
|
+
let items = [];
|
|
1309
|
+
|
|
1310
|
+
for (let i = 0; i < layerList.length; i++) {
|
|
1311
|
+
const layer = layerList[i];
|
|
1312
|
+
const name = layer.name || "";
|
|
1313
|
+
const info = this.getShapeInfo(layer.layer);
|
|
1314
|
+
items.push({
|
|
1315
|
+
name: name,
|
|
1316
|
+
info: info,
|
|
1317
|
+
shape: layer.shape
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
return JSON.stringify(items);
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
createShapeByInfo(info, type) {
|
|
1325
|
+
let shape = null;
|
|
1326
|
+
|
|
1327
|
+
if (type == "Marker") {
|
|
1328
|
+
shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.MARKER.type, '', {
|
|
1329
|
+
position: info.coordinate,
|
|
1330
|
+
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
|
1331
|
+
width: info.style.iconSize[0],
|
|
1332
|
+
height: info.style.iconSize[1],
|
|
1333
|
+
image: this.getImageWithColor(info.style.iconUrl, info.style.color, info.style.iconSize[0], info.style.iconSize[1])
|
|
1334
|
+
});
|
|
1335
|
+
} else if (type == "Line") {
|
|
1336
|
+
shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.POLYLINE.type, '', {
|
|
1337
|
+
controlPoints: info.coordinate,
|
|
1338
|
+
color: Cesium.Color.fromCssColorString(info.style.color).withAlpha(info.style.opacity),
|
|
1339
|
+
width: info.style.weight,
|
|
1340
|
+
dashArray: info.style.dashArray,
|
|
1341
|
+
clampToGround: true
|
|
1342
|
+
});
|
|
1343
|
+
} else if (type == "Polygon") {
|
|
1344
|
+
shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.POLYGON.type, '', {
|
|
1345
|
+
controlPoints: info.coordinate,
|
|
1346
|
+
color: Cesium.Color.fromCssColorString(info.style.color),
|
|
1347
|
+
width: info.style.weight,
|
|
1348
|
+
fillColor: Cesium.Color.fromCssColorString(info.style.fillColor).withAlpha(info.style.fillOpacity),
|
|
1349
|
+
fill: true,
|
|
1350
|
+
clampToGround: true
|
|
1351
|
+
});
|
|
1352
|
+
} else if (type == "Rectangle") {
|
|
1353
|
+
shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.RECTANGLE.type, '', {
|
|
1354
|
+
controlPoints: info.coordinate,
|
|
1355
|
+
color: Cesium.Color.fromCssColorString(info.style.color),
|
|
1356
|
+
width: info.style.weight,
|
|
1357
|
+
fillColor: Cesium.Color.fromCssColorString(info.style.fillColor).withAlpha(info.style.fillOpacity),
|
|
1358
|
+
fill: true,
|
|
1359
|
+
clampToGround: true
|
|
1360
|
+
});
|
|
1361
|
+
} else if (type == "Circle") {
|
|
1362
|
+
shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.CIRCLE.type, '', {
|
|
1363
|
+
controlPoints: info.coordinate,
|
|
1364
|
+
color: Cesium.Color.fromCssColorString(info.style.color),
|
|
1365
|
+
width: info.style.weight,
|
|
1366
|
+
fillColor: Cesium.Color.fromCssColorString(info.style.fillColor).withAlpha(info.style.fillOpacity),
|
|
1367
|
+
fill: true,
|
|
1368
|
+
clampToGround: true
|
|
1369
|
+
});
|
|
1370
|
+
} else if (type == "Text") {
|
|
1371
|
+
shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.TEXT.type, '', {
|
|
1372
|
+
latlng: info.coordinate,
|
|
1373
|
+
text: info.style.content,
|
|
1374
|
+
fontSize: info.style.fontSize,
|
|
1375
|
+
fontFamily: info.style.fontFamily,
|
|
1376
|
+
color: Cesium.Color.fromCssColorString(info.style.color)
|
|
1377
|
+
});
|
|
1378
|
+
setTimeout(() => {
|
|
1379
|
+
shape._label.disableDepthTestDistance = Number.POSITIVE_INFINITY;
|
|
1380
|
+
}, 200);
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
return shape;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
createLayerListByJson(items) {
|
|
1387
|
+
let layerList = [];
|
|
1388
|
+
|
|
1389
|
+
for (let i = 0; i < items.length; i++) {
|
|
1390
|
+
const item = items[i];
|
|
1391
|
+
const type = item.shape;
|
|
1392
|
+
let shape = this.createShapeByInfo(item.info, type);
|
|
1393
|
+
|
|
1394
|
+
if (shape) {
|
|
1395
|
+
shape.options = item.info.style;
|
|
1396
|
+
|
|
1397
|
+
this._drawLayer.add(shape);
|
|
1398
|
+
|
|
1399
|
+
layerList.push({
|
|
1400
|
+
name: item.name,
|
|
1401
|
+
shape: type,
|
|
1402
|
+
layer: shape.id
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
return layerList;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
removeGeometryById(id) {
|
|
1411
|
+
this._drawLayer.removeById(id);
|
|
1412
|
+
}
|
|
1161
1413
|
/********** 地理编码通用组件使用 start ************/
|
|
1162
1414
|
// 绘制点图标自带点击弹出气泡, 地理编码通用组件使用
|
|
1163
1415
|
|
|
@@ -6934,7 +7186,7 @@ const Measurevue_type_script_setup_true_lang_js_default_ = {
|
|
|
6934
7186
|
|
|
6935
7187
|
if (res.measureResult && res.measureResult.labels && res.measureResult.labels.length > 0) {
|
|
6936
7188
|
res.measureResult.labels._labels.forEach(label => {
|
|
6937
|
-
label.text = label.text.replace('X', language.value.longitude).replace('Y', language.value.latitude).replace('Z', language.value.
|
|
7189
|
+
label.text = label.text.replace('X', language.value.longitude).replace('Y', language.value.latitude).replace('Z', language.value.elevation);
|
|
6938
7190
|
});
|
|
6939
7191
|
}
|
|
6940
7192
|
}
|
|
@@ -7307,7 +7559,7 @@ const Measurevue_type_script_setup_true_lang_js_default_ = {
|
|
|
7307
7559
|
/* TEXT */
|
|
7308
7560
|
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("p", _hoisted_28, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(result).latitude), 1
|
|
7309
7561
|
/* TEXT */
|
|
7310
|
-
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("p", _hoisted_29, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).
|
|
7562
|
+
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("p", _hoisted_29, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).elevation), 1
|
|
7311
7563
|
/* TEXT */
|
|
7312
7564
|
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("p", _hoisted_30, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(result).height) + " m", 1
|
|
7313
7565
|
/* TEXT */
|
|
@@ -7596,6 +7848,7 @@ const Flightvue_type_script_setup_true_lang_js_default_ = {
|
|
|
7596
7848
|
dataList = JSON.parse(JSON.stringify(dataList));
|
|
7597
7849
|
dataList.forEach(path => {
|
|
7598
7850
|
path.isPlaying = false;
|
|
7851
|
+
path.isRepeat = false;
|
|
7599
7852
|
pathList.push(path);
|
|
7600
7853
|
});
|
|
7601
7854
|
});
|
|
@@ -7681,7 +7934,9 @@ const Flightvue_type_script_setup_true_lang_js_default_ = {
|
|
|
7681
7934
|
}
|
|
7682
7935
|
|
|
7683
7936
|
viewModel.play();
|
|
7684
|
-
item.isPlaying = true;
|
|
7937
|
+
item.isPlaying = true; // 设置循环播放
|
|
7938
|
+
|
|
7939
|
+
viewModel.setAutoRepeat(item.isRepeat);
|
|
7685
7940
|
} //路径播放暂停
|
|
7686
7941
|
|
|
7687
7942
|
|
|
@@ -7697,9 +7952,12 @@ const Flightvue_type_script_setup_true_lang_js_default_ = {
|
|
|
7697
7952
|
} //循环播放
|
|
7698
7953
|
|
|
7699
7954
|
|
|
7700
|
-
function repeat() {
|
|
7701
|
-
|
|
7702
|
-
|
|
7955
|
+
function repeat(item) {
|
|
7956
|
+
item.isRepeat = !item.isRepeat;
|
|
7957
|
+
|
|
7958
|
+
if (item.isPlaying) {
|
|
7959
|
+
viewModel.setAutoRepeat(item.isRepeat);
|
|
7960
|
+
}
|
|
7703
7961
|
} //显示更多功能菜单
|
|
7704
7962
|
|
|
7705
7963
|
|
|
@@ -8046,17 +8304,17 @@ const Flightvue_type_script_setup_true_lang_js_default_ = {
|
|
|
8046
8304
|
/* PROPS, DYNAMIC_SLOTS */
|
|
8047
8305
|
, ["onClick", "title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
|
|
8048
8306
|
size: 16,
|
|
8049
|
-
class:
|
|
8050
|
-
onClick: repeat,
|
|
8307
|
+
class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.normalizeClass)(item.isRepeat ? 'kq-icon-light' : ''),
|
|
8308
|
+
onClick: $event => repeat(item),
|
|
8051
8309
|
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).repeat
|
|
8052
8310
|
}, {
|
|
8053
8311
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(client_icons_vue_namespaceObject.IconVideoRepeat))]),
|
|
8054
|
-
_:
|
|
8055
|
-
/*
|
|
8312
|
+
_: 2
|
|
8313
|
+
/* DYNAMIC */
|
|
8056
8314
|
|
|
8057
|
-
},
|
|
8058
|
-
/* PROPS */
|
|
8059
|
-
, ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
|
|
8315
|
+
}, 1032
|
|
8316
|
+
/* PROPS, DYNAMIC_SLOTS */
|
|
8317
|
+
, ["class", "onClick", "title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
|
|
8060
8318
|
size: 16,
|
|
8061
8319
|
class: "menuIcon",
|
|
8062
8320
|
onClick: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withModifiers)($event => showDropDownMenu(item, index), ["prevent", "stop"]),
|
package/measure/index.js
CHANGED
|
@@ -580,7 +580,7 @@ const __default__ = {
|
|
|
580
580
|
|
|
581
581
|
if (res.measureResult && res.measureResult.labels && res.measureResult.labels.length > 0) {
|
|
582
582
|
res.measureResult.labels._labels.forEach(label => {
|
|
583
|
-
label.text = label.text.replace('X', language.value.longitude).replace('Y', language.value.latitude).replace('Z', language.value.
|
|
583
|
+
label.text = label.text.replace('X', language.value.longitude).replace('Y', language.value.latitude).replace('Z', language.value.elevation);
|
|
584
584
|
});
|
|
585
585
|
}
|
|
586
586
|
}
|
|
@@ -953,7 +953,7 @@ const __default__ = {
|
|
|
953
953
|
/* TEXT */
|
|
954
954
|
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_28, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result).latitude), 1
|
|
955
955
|
/* TEXT */
|
|
956
|
-
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_29, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).
|
|
956
|
+
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_29, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).elevation), 1
|
|
957
957
|
/* TEXT */
|
|
958
958
|
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_30, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result).height) + " m", 1
|
|
959
959
|
/* TEXT */
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"3.
|
|
1
|
+
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"3.7.1-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","html2canvas":"^1.4.1","xe-utils":"^3.5.4"}}
|