@kq_npm/client3d_webgl_vue 4.3.4 → 4.3.6
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/index.js +1846 -429
- package/measure/index.js +122 -11
- package/package.json +1 -1
- package/sceneview/index.js +1567 -116
- package/slopeanalysis/index.js +16 -11
- package/slopeaspectanalysis/index.js +1512 -0
- package/slopeaspectanalysis/style/index.js +3 -0
- package/slopeaspectanalysis/style/slopeaspectanalysis.css +1 -0
- package/style.css +1 -1
package/measure/index.js
CHANGED
|
@@ -511,6 +511,22 @@ const _hoisted_32 = {
|
|
|
511
511
|
const _hoisted_33 = {
|
|
512
512
|
class: "res"
|
|
513
513
|
};
|
|
514
|
+
const _hoisted_34 = {
|
|
515
|
+
class: "tit"
|
|
516
|
+
};
|
|
517
|
+
const _hoisted_35 = {
|
|
518
|
+
class: "res"
|
|
519
|
+
};
|
|
520
|
+
const _hoisted_36 = {
|
|
521
|
+
key: 3,
|
|
522
|
+
class: "result"
|
|
523
|
+
};
|
|
524
|
+
const _hoisted_37 = {
|
|
525
|
+
class: "tit"
|
|
526
|
+
};
|
|
527
|
+
const _hoisted_38 = {
|
|
528
|
+
class: "res"
|
|
529
|
+
};
|
|
514
530
|
|
|
515
531
|
|
|
516
532
|
|
|
@@ -574,6 +590,7 @@ const __default__ = {
|
|
|
574
590
|
|
|
575
591
|
let isActive = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
|
|
576
592
|
let isResult = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
|
|
593
|
+
let isTips = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
|
|
577
594
|
let distanceValue = null; // 默认显示距离的单位
|
|
578
595
|
|
|
579
596
|
let distanceUnit = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(props.settingParams && props.settingParams.distanceUnit || ""); // 海里单位选择
|
|
@@ -581,7 +598,7 @@ const __default__ = {
|
|
|
581
598
|
let nauticalMileUnit = props.settingParams && props.settingParams.nauticalMileUnit || "nmi"; // 面积单位
|
|
582
599
|
|
|
583
600
|
let areaUnit = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(props.settingParams && props.settingParams.areaUnit || "");
|
|
584
|
-
let result = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(
|
|
601
|
+
let result = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(0);
|
|
585
602
|
let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)({});
|
|
586
603
|
let mode = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("space");
|
|
587
604
|
let modeList = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
|
|
@@ -687,7 +704,10 @@ const __default__ = {
|
|
|
687
704
|
}
|
|
688
705
|
} else if (measureType.value === "azimuth" && res) {
|
|
689
706
|
if (res.positions && res.positions.length > 0) {
|
|
690
|
-
result.value =
|
|
707
|
+
result.value = {
|
|
708
|
+
azimuth: res.azimuth.toFixed(4),
|
|
709
|
+
distance: res.distance.toFixed(2)
|
|
710
|
+
};
|
|
691
711
|
} else result.value = 0;
|
|
692
712
|
} else if (measureType.value === "slope" && res) {
|
|
693
713
|
if (res.positions && res.positions.length > 0) {
|
|
@@ -712,8 +732,6 @@ const __default__ = {
|
|
|
712
732
|
};
|
|
713
733
|
}
|
|
714
734
|
|
|
715
|
-
viewModel.stopMeasure();
|
|
716
|
-
|
|
717
735
|
if (res.measureResult && res.measureResult.labels && res.measureResult.labels.length > 0) {
|
|
718
736
|
res.measureResult.labels._labels.forEach(label => {
|
|
719
737
|
label.text = label.text.replace('X', language.value.longitude).replace('Y', language.value.latitude).replace('Z', language.value.elevation).replace(/\n/g, '°\n');
|
|
@@ -728,12 +746,52 @@ const __default__ = {
|
|
|
728
746
|
});
|
|
729
747
|
viewModel.activeEvent.addEventListener(function (active) {
|
|
730
748
|
if (!active) {
|
|
731
|
-
isActive.value = null;
|
|
749
|
+
// isActive.value = null;
|
|
750
|
+
isTips.value = false;
|
|
751
|
+
if (result.value === 0) return;
|
|
732
752
|
if (measureType.value === "height" && result.value.angle === 0) return;
|
|
733
753
|
if (measureType.value === "azimuth" && result.value === 0) return;
|
|
734
754
|
isResult.value = true;
|
|
735
755
|
}
|
|
736
756
|
});
|
|
757
|
+
let handler = new Cesium.ScreenSpaceEventHandler(scenceView._viewer.scene.canvas);
|
|
758
|
+
handler.setInputAction(function () {
|
|
759
|
+
if (!viewModel._measureHandler.active) return;
|
|
760
|
+
let isDrawing = viewModel._measureHandler.isDrawing;
|
|
761
|
+
|
|
762
|
+
if (!isDrawing) {
|
|
763
|
+
let measureResults = viewModel._measureHandler.measureResults;
|
|
764
|
+
|
|
765
|
+
if (measureResults && measureResults.length > 0) {
|
|
766
|
+
measureResults[0].destroy();
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
if (measureType.value === "coordinate") {
|
|
770
|
+
isTips.value = false;
|
|
771
|
+
isResult.value = true;
|
|
772
|
+
} else {
|
|
773
|
+
isTips.value = true;
|
|
774
|
+
isResult.value = false;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
if (isDrawing) {
|
|
779
|
+
if (measureType.value !== 'distance' && measureType.value !== 'area') {
|
|
780
|
+
continueMeasure();
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
784
|
+
handler.setInputAction(function () {
|
|
785
|
+
let isDrawing = viewModel._measureHandler.isDrawing;
|
|
786
|
+
|
|
787
|
+
if (!isDrawing) {
|
|
788
|
+
isActive.value = null;
|
|
789
|
+
viewModel.stopMeasure();
|
|
790
|
+
} else {
|
|
791
|
+
continueMeasure();
|
|
792
|
+
}
|
|
793
|
+
}, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
|
|
794
|
+
window.measureClickHandler = handler;
|
|
737
795
|
}
|
|
738
796
|
});
|
|
739
797
|
}); // 经纬度转度分秒
|
|
@@ -860,6 +918,11 @@ const __default__ = {
|
|
|
860
918
|
|
|
861
919
|
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
|
|
862
920
|
clearMeasure();
|
|
921
|
+
|
|
922
|
+
if (window.measureClickHandler) {
|
|
923
|
+
window.measureClickHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
924
|
+
window.measureClickHandler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK);
|
|
925
|
+
}
|
|
863
926
|
}); //开始测量
|
|
864
927
|
|
|
865
928
|
function startMeasure(type) {
|
|
@@ -884,6 +947,8 @@ const __default__ = {
|
|
|
884
947
|
}
|
|
885
948
|
|
|
886
949
|
viewModel.clear();
|
|
950
|
+
result.value = 0;
|
|
951
|
+
isTips.value = true;
|
|
887
952
|
isResult.value = false;
|
|
888
953
|
measureType.value = type;
|
|
889
954
|
isActive.value = type;
|
|
@@ -922,6 +987,44 @@ const __default__ = {
|
|
|
922
987
|
break;
|
|
923
988
|
}
|
|
924
989
|
}
|
|
990
|
+
|
|
991
|
+
function continueMeasure() {
|
|
992
|
+
setTimeout(() => {
|
|
993
|
+
switch (measureType.value) {
|
|
994
|
+
case "distance":
|
|
995
|
+
viewModel.distanceMeasure(mode.value);
|
|
996
|
+
break;
|
|
997
|
+
|
|
998
|
+
case "area":
|
|
999
|
+
viewModel.areaMeasure(mode.value);
|
|
1000
|
+
break;
|
|
1001
|
+
|
|
1002
|
+
case "height":
|
|
1003
|
+
viewModel.heightMeasure();
|
|
1004
|
+
break;
|
|
1005
|
+
|
|
1006
|
+
case "coordinate":
|
|
1007
|
+
viewModel.coordinateMeasure();
|
|
1008
|
+
break;
|
|
1009
|
+
|
|
1010
|
+
case "azimuth":
|
|
1011
|
+
viewModel.azimuthMeasure();
|
|
1012
|
+
break;
|
|
1013
|
+
|
|
1014
|
+
case "slope":
|
|
1015
|
+
if (mode.value === "ground") {
|
|
1016
|
+
viewModel.terrainSlopeMeasure();
|
|
1017
|
+
} else if (mode.value === "model") {
|
|
1018
|
+
viewModel.sceneSlopeMeasure();
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
break;
|
|
1022
|
+
|
|
1023
|
+
default:
|
|
1024
|
+
break;
|
|
1025
|
+
}
|
|
1026
|
+
}, 300);
|
|
1027
|
+
}
|
|
925
1028
|
/**
|
|
926
1029
|
* 清除测量
|
|
927
1030
|
*/
|
|
@@ -931,6 +1034,7 @@ const __default__ = {
|
|
|
931
1034
|
viewModel && viewModel.clear();
|
|
932
1035
|
measureType.value = null;
|
|
933
1036
|
isActive.value = null;
|
|
1037
|
+
isTips.value = false;
|
|
934
1038
|
isResult.value = false;
|
|
935
1039
|
}
|
|
936
1040
|
|
|
@@ -968,8 +1072,7 @@ const __default__ = {
|
|
|
968
1072
|
/* TEXT */
|
|
969
1073
|
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_select, {
|
|
970
1074
|
modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(mode),
|
|
971
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(mode) ? mode.value = $event : mode = $event)
|
|
972
|
-
disabled: !!(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive)
|
|
1075
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(mode) ? mode.value = $event : mode = $event)
|
|
973
1076
|
}, {
|
|
974
1077
|
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [((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)(modeList), item => {
|
|
975
1078
|
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_option, {
|
|
@@ -987,7 +1090,7 @@ const __default__ = {
|
|
|
987
1090
|
|
|
988
1091
|
}, 8
|
|
989
1092
|
/* PROPS */
|
|
990
|
-
, ["modelValue"
|
|
1093
|
+
, ["modelValue"])])]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_5, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
|
|
991
1094
|
onClick: _cache[1] || (_cache[1] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => startMeasure('distance'), ["stop"])),
|
|
992
1095
|
class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive) == 'distance' ? 'is-active' : null),
|
|
993
1096
|
title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).distance
|
|
@@ -1115,7 +1218,7 @@ const __default__ = {
|
|
|
1115
1218
|
|
|
1116
1219
|
}, 8
|
|
1117
1220
|
/* PROPS */
|
|
1118
|
-
, ["onClick", "title"])]),
|
|
1221
|
+
, ["onClick", "title"])]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isTips) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_6, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_divider), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(measureType) === 'height' || (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(measureType) === 'azimuth' ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("p", _hoisted_7, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).measureTips1), 1
|
|
1119
1222
|
/* TEXT */
|
|
1120
1223
|
)) : ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("p", _hoisted_8, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).measureTips), 1
|
|
1121
1224
|
/* TEXT */
|
|
@@ -1195,9 +1298,17 @@ const __default__ = {
|
|
|
1195
1298
|
/* TEXT */
|
|
1196
1299
|
), (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
|
|
1197
1300
|
/* TEXT */
|
|
1198
|
-
)])) : ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_31, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_32, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language)
|
|
1301
|
+
)])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(measureType) === 'azimuth' ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_31, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_32, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).azimuth), 1
|
|
1302
|
+
/* TEXT */
|
|
1303
|
+
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_33, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result).azimuth) + " °", 1
|
|
1304
|
+
/* TEXT */
|
|
1305
|
+
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_34, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).distance), 1
|
|
1306
|
+
/* TEXT */
|
|
1307
|
+
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_35, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result).distance) + " m", 1
|
|
1308
|
+
/* TEXT */
|
|
1309
|
+
)])) : ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_36, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_37, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language)[(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(measureType)]), 1
|
|
1199
1310
|
/* TEXT */
|
|
1200
|
-
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p",
|
|
1311
|
+
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_38, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result)), 1
|
|
1201
1312
|
/* TEXT */
|
|
1202
1313
|
)]))])])])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true)])], 2
|
|
1203
1314
|
/* CLASS */
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"4.3.
|
|
1
|
+
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"4.3.6","homepage":"","keywords":["KQGIS","webGL","Vue"],"restrictedVersion":true,"browserslist":["> 1%","last 2 versions","not dead","not ie 11"],"author":"KQWEB GROUP","license":"Apache-2.0","dependencies":{"colorcolor":"1.1.1","echarts":"4.9.0","echarts-stat":"1.2.0","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","@kq_npm/client_icons_vue":"0.7.9-beta","css-vars-ponyfill":"2.4.8","html2canvas":"1.4.1","xe-utils":"3.5.4"}}
|