qy-vue-plugins 1.0.2-beta → 1.0.2
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/dist/apply-element-plus-theme.cjs +1 -0
- package/dist/apply-element-plus-theme.mjs +22 -0
- package/dist/beijihua-map-icon/hiper-map-icon-1.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-10.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-11.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-12.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-13.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-14.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-15.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-16.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-17.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-18.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-19.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-2.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-20.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-21.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-22.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-23.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-24.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-25.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-26.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-27.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-28.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-29.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-3.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-30.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-31.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-32.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-33.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-34.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-35.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-36.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-37.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-38.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-39.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-4.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-40.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-41.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-42.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-43.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-44.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-45.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-46.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-47.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-48.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-49.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-5.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-50.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-51.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-52.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-53.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-54.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-55.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-56.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-57.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-58.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-59.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-6.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-60.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-61.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-62.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-63.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-64.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-65.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-7.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-8.png +0 -0
- package/dist/beijihua-map-icon/hiper-map-icon-9.png +0 -0
- package/dist/chunks/{EventKeys-1aL9cgT0.js → EventKeys-DZ_Hahro.js} +4 -4
- package/dist/chunks/{MapTools.vue_vue_type_style_index_0_lang-C3__NQXN.js → MapTools.vue_vue_type_style_index_0_lang-C0C9opKY.js} +1 -1
- package/dist/chunks/{MapTools.vue_vue_type_style_index_0_lang-BJi8BdV8.js → MapTools.vue_vue_type_style_index_0_lang-CZ_dEmHg.js} +2 -2
- package/dist/chunks/{ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-C8wD6gZS.js → ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-CjJ3e53H.js} +12 -13
- package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-m9hkScAC.js +1 -0
- package/dist/chunks/apply-element-plus-theme-DdN9KOhk.js +1 -0
- package/dist/chunks/apply-element-plus-theme-UHVxP4VN.js +22 -0
- package/dist/chunks/aria-B5rZ0WFy.js +5 -0
- package/dist/chunks/aria-BEkkcjlH.js +115 -0
- package/dist/chunks/constant-Bq4ASE9Q.js +1 -0
- package/dist/chunks/{constant-BqK1UnfT.js → constant-E83OJqPQ.js} +17 -36
- package/dist/chunks/debounce-CHS-N31c.js +1 -0
- package/dist/chunks/debounce-DBq5TVsN.js +55 -0
- package/dist/chunks/{el-loading-CBXyo6la.js → directive-C-4KkhaM.js} +2 -2
- package/dist/chunks/directive-DRO4tFsQ.js +1 -0
- package/dist/chunks/index-03UF6hCZ.js +14 -0
- package/dist/chunks/index-B6SD5IcP.js +1 -0
- package/dist/chunks/{index-DHO_7w-5.js → index-BCQYbM-I.js} +22 -22
- package/dist/chunks/{el-input-DCpRXscw.js → index-BdloQTv1.js} +171 -175
- package/dist/chunks/{el-overlay-BJQjrf5W.js → index-BeskO4C8.js} +76 -75
- package/dist/chunks/index-BoFuR9-k.js +2 -0
- package/dist/chunks/index-Bs9zhLlD.js +1 -0
- package/dist/chunks/index-C-WIOEu8.js +1 -0
- package/dist/chunks/index-CD-vLVPt.js +1 -0
- package/dist/chunks/index-CD4bijv7.js +1 -0
- package/dist/chunks/index-CHRyd-8X.js +1 -0
- package/dist/chunks/{el-button-Dh7ROB0R.js → index-CgKiWbxR.js} +110 -117
- package/dist/chunks/{el-popper-zUql4Vp-.js → index-Cv_K9rbv.js} +47 -46
- package/dist/chunks/{el-select-Dil0JEvg.js → index-Cyrc4mj-.js} +467 -492
- package/dist/chunks/index-DLBjU25P.js +3 -0
- package/dist/chunks/index-DgwQEHlD.js +12 -0
- package/dist/chunks/index-LWCtnbZP.js +13 -0
- package/dist/chunks/index-OtE8c8y9.js +1 -0
- package/dist/chunks/index-Qzqd5jTh.js +1 -0
- package/dist/chunks/index-VbRYJz2E.js +1 -0
- package/dist/chunks/index-YiSmXvH8.js +975 -0
- package/dist/chunks/{index-Dq3Y5qiS.js → index-_At9ftZd.js} +35 -35
- package/dist/chunks/{index-Cw_w6CLf.js → index-ieQ_IULW.js} +11 -11
- package/dist/chunks/{el-form-item-CXLLocXw.js → index-mDs-Bipv.js} +151 -150
- package/dist/chunks/mapSetting-B1a88k-v.js +635 -0
- package/dist/chunks/mapSetting-Ba76lOJd.js +1 -0
- package/dist/chunks/{base-DfCoKyyG.js → style-COMeMpO8.js} +81 -80
- package/dist/chunks/{base-DK_JFP90.js → style-DiDWGUIe.js} +1 -1
- package/dist/chunks/toNumber-CCcOx5KD.js +1 -0
- package/dist/chunks/toNumber-CDwzVyqL.js +30 -0
- package/dist/chunks/use-form-common-props-BQtZKazE.js +66 -0
- package/dist/chunks/use-form-common-props-SdGVhyVk.js +1 -0
- package/dist/chunks/{use-global-config-DXAWJFeA.js → use-global-config-Ba3i7fKX.js} +18 -17
- package/dist/chunks/use-global-config-PaSl-b_9.js +1 -0
- package/dist/chunks/utils-BJ8Lu8TY.js +516 -0
- package/dist/chunks/utils-CrwGKkIz.js +1 -0
- package/dist/chunks/vnode-CvqQoLhR.js +1 -0
- package/dist/chunks/vnode-DpjFDm4v.js +70 -0
- package/dist/element-plus-style.cjs +1 -0
- package/dist/element-plus-style.mjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +13 -10
- package/dist/manageTable/ReplaceSpeciesNameDialog.cjs +1 -1
- package/dist/manageTable/ReplaceSpeciesNameDialog.mjs +1 -1
- package/dist/manageTable/index.cjs +1 -1
- package/dist/manageTable/index.mjs +10 -8
- package/dist/manageTable/manageTable.cjs +1 -1
- package/dist/manageTable/manageTable.mjs +1 -1
- package/dist/mapbox/components/VideoDialog.cjs +1 -1
- package/dist/mapbox/components/VideoDialog.mjs +16 -17
- package/dist/mapbox/widgets/LayerAttributeDialog.cjs +1 -1
- package/dist/mapbox/widgets/LayerAttributeDialog.mjs +30 -31
- package/dist/mapbox.cjs +1 -1
- package/dist/mapbox.mjs +22 -20
- package/dist/mapboxV2/MapView.cjs +1 -1
- package/dist/mapboxV2/MapView.mjs +3728 -1256
- package/dist/mapboxV2/components/MapLegend.cjs +1 -1
- package/dist/mapboxV2/components/MapLegend.mjs +51 -167
- package/dist/mapboxV2/components/MapTools.cjs +1 -1
- package/dist/mapboxV2/components/MapTools.mjs +1 -1
- package/dist/mapboxV2/components/VideoDialog.cjs +1 -1
- package/dist/mapboxV2/components/VideoDialog.mjs +12 -13
- package/dist/mapboxV2/components/mapSetting.cjs +1 -1
- package/dist/mapboxV2/components/mapSetting.mjs +1 -1
- package/dist/mapboxV2/components/mapTopic.cjs +1 -1
- package/dist/mapboxV2/components/mapTopic.mjs +349 -446
- package/dist/mapboxV2/constant.cjs +1 -1
- package/dist/mapboxV2/constant.mjs +13 -17
- package/dist/mapboxV2/useTif.cjs +1 -1
- package/dist/mapboxV2/useTif.mjs +86 -86
- package/dist/mapboxV2/utils.cjs +1 -1
- package/dist/mapboxV2/utils.mjs +362 -279
- package/dist/mapboxV2/widgets/CustomShapeDialog.cjs +1 -1
- package/dist/mapboxV2/widgets/CustomShapeDialog.mjs +87 -67
- package/dist/mapboxV2/widgets/IconPicker.cjs +1 -1
- package/dist/mapboxV2/widgets/IconPicker.mjs +59 -48
- package/dist/mapboxV2/widgets/LayerAttributeDialog.cjs +1 -1
- package/dist/mapboxV2/widgets/LayerAttributeDialog.mjs +17 -18
- package/dist/mapboxV2/widgets/LayerDialog.cjs +1 -1
- package/dist/mapboxV2/widgets/LayerDialog.mjs +94 -86
- package/dist/mapboxV2/widgets/LegendDialogLine.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendDialogLine.mjs +95 -90
- package/dist/mapboxV2/widgets/LegendDialogPoint.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendDialogPoint.mjs +90 -85
- package/dist/mapboxV2/widgets/LegendLine.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendLine.mjs +28 -61
- package/dist/mapboxV2/widgets/LegendPoint.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendPoint.mjs +52 -66
- package/dist/mapboxV2/widgets/LegendPopInterestPoint.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendPopInterestPoint.mjs +16 -18
- package/dist/mapboxV2/widgets/LegendPopLine.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendPopLine.mjs +72 -73
- package/dist/mapboxV2/widgets/LegendPopPoint.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendPopPoint.mjs +113 -112
- package/dist/mapboxV2/widgets/LegendShape.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendShape.mjs +17 -14
- package/dist/mapboxV2/widgets/LegendSymbol.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendSymbol.mjs +5 -5
- package/dist/mapboxV2/widgets/ShapeDialog.cjs +1 -1
- package/dist/mapboxV2/widgets/ShapeDialog.mjs +1663 -1422
- package/dist/mapboxV2/widgets/TopicItemPop.cjs +1 -1
- package/dist/mapboxV2/widgets/TopicItemPop.mjs +2 -2
- package/dist/mapboxV2/widgets/TopicPop.mjs +1 -1
- package/dist/mapboxV2.cjs +3 -3
- package/dist/mapboxV2.mjs +673 -824
- package/dist/qy-vue-plugins.css +1 -1
- package/dist/types/apply-element-plus-theme.d.ts +1 -0
- package/dist/types/element-plus-style.d.ts +0 -0
- package/dist/types/manageTable/manageTable.vue.d.ts +2 -2
- package/dist/types/mapboxV2/MapView.vue.d.ts +130 -3
- package/dist/types/mapboxV2/components/mapTopic.vue.d.ts +10 -591
- package/dist/types/mapboxV2/types/map-layer.d.ts +185 -3
- package/dist/types/mapboxV2/useTif.d.ts +2 -2
- package/dist/types/mapboxV2/utils/geojsonRenderer.d.ts +123 -0
- package/dist/types/mapboxV2/utils.d.ts +5 -0
- package/dist/types/mapboxV2/widgets/IconPicker.vue.d.ts +8 -10
- package/dist/types/mapboxV2/widgets/index.d.ts +3 -0
- package/dist/types/mapboxV2/widgets/track/TrackImageDialog.vue.d.ts +11 -0
- package/dist/types/mapboxV2/widgets/track/TrackTextDialog.vue.d.ts +11 -0
- package/dist/types/mapboxV2/widgets/track/TrackVoiceDialog.vue.d.ts +11 -0
- package/dist/types/mapboxV2/widgets/track/index.d.ts +3 -0
- package/dist/types/store/mapStore.d.ts +122 -0
- package/dist/types/types/map.d.ts +111 -7
- package/package/apply-element-plus-theme.ts +23 -0
- package/package/css/common.scss +33 -0
- package/package/css/element-plus-theme.scss +30 -0
- package/package/css/map.scss +42 -0
- package/package/element-plus-style.ts +48 -0
- package/package/manageTable/index.ts +5 -0
- package/package/mapbox/index.ts +5 -0
- package/package/mapboxV2/constant.ts +4 -12
- package/package/mapboxV2/index.ts +5 -0
- package/package/mapboxV2/useTif.ts +18 -13
- package/package/mapboxV2/utils.ts +303 -143
- package/package/mapboxV2/widgets/index.ts +5 -0
- package/package/types/map.ts +129 -32
- package/package.json +27 -3
- package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-DnYed7Kh.js +0 -1
- package/dist/chunks/aria-B-Cm8P6h.js +0 -5
- package/dist/chunks/aria-GiGFrmP1.js +0 -175
- package/dist/chunks/constant-mXEWtcQf.js +0 -1
- package/dist/chunks/el-button-w9UOZkmd.js +0 -3
- package/dist/chunks/el-color-picker-panel-BWjyXHBz.js +0 -1
- package/dist/chunks/el-color-picker-panel-BfOVWDkH.js +0 -1024
- package/dist/chunks/el-form-item-ECXS8pAs.js +0 -12
- package/dist/chunks/el-input-tAiZBp5N.js +0 -1
- package/dist/chunks/el-loading-BDhLUhme.js +0 -1
- package/dist/chunks/el-overlay-BEd31jh6.js +0 -1
- package/dist/chunks/el-popper-C6hJmTeX.js +0 -1
- package/dist/chunks/el-select-BXP0YqqB.js +0 -1
- package/dist/chunks/index-BIPr63lF.js +0 -1
- package/dist/chunks/index-BIaoqnN4.js +0 -1
- package/dist/chunks/index-D9eecDRK.js +0 -2
- package/dist/chunks/mapSetting-BRasGCqk.js +0 -597
- package/dist/chunks/mapSetting-CfE-5SCc.js +0 -1
- package/dist/chunks/use-global-config-y6gk28OO.js +0 -1
- package/dist/chunks/utils-CZxmwfl_.js +0 -1
- package/dist/chunks/utils-n1i0zWzc.js +0 -454
- package/dist/chunks/vnode-CyTnPoXJ.js +0 -47
- package/dist/chunks/vnode-eKMqbqaC.js +0 -1
- package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-BRUTHTNe.js +0 -12
- package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-CksusXxb.js +0 -28
- package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-DchJeGnp.js +0 -1
- package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-yXKDlNvO.js +0 -17
package/dist/mapboxV2/utils.mjs
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { useId as
|
|
2
|
-
import { d
|
|
3
|
-
function
|
|
4
|
-
let
|
|
1
|
+
import { useId as L } from "vue";
|
|
2
|
+
import { d, a as w } from "../chunks/constant-E83OJqPQ.js";
|
|
3
|
+
function z(i, e) {
|
|
4
|
+
let t = {
|
|
5
5
|
marginTop: "-2px"
|
|
6
6
|
};
|
|
7
|
-
switch (
|
|
7
|
+
switch (i) {
|
|
8
8
|
case "solid":
|
|
9
9
|
case "solid-line":
|
|
10
|
-
|
|
10
|
+
t.borderBottom = `4px solid ${e}`;
|
|
11
11
|
break;
|
|
12
12
|
case "dash":
|
|
13
13
|
case "dotted":
|
|
14
14
|
case "simple-dash":
|
|
15
|
-
|
|
15
|
+
t.borderBottom = `4px dashed ${e}`;
|
|
16
16
|
break;
|
|
17
17
|
case "dot-dash":
|
|
18
|
-
|
|
18
|
+
t.backgroundImage = `linear-gradient(to right, ${e} 25%, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0) 50%, ${e} 50%, ${e} 75%, rgba(255, 255, 255, 0) 75%)`;
|
|
19
19
|
break;
|
|
20
20
|
case "long-dash":
|
|
21
|
-
|
|
21
|
+
t.backgroundImage = `linear-gradient(to right, ${e} 50%, rgba(255, 255, 255, 0) 50%)`;
|
|
22
22
|
break;
|
|
23
23
|
case "dot-line":
|
|
24
|
-
|
|
24
|
+
t.backgroundImage = `linear-gradient(to right, ${e} 25%, rgba(255, 255, 255, 0) 10%)`;
|
|
25
25
|
break;
|
|
26
26
|
case "complex-pattern":
|
|
27
|
-
|
|
27
|
+
t.backgroundImage = `linear-gradient(to right, ${e} 20%, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0) 40%, ${e} 40%, ${e} 60%, rgba(255, 255, 255, 0) 60%)`;
|
|
28
28
|
break;
|
|
29
29
|
default:
|
|
30
|
-
|
|
30
|
+
t.borderBottom = `4px solid ${e}`;
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return t;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
if (
|
|
37
|
-
return
|
|
35
|
+
function F(i, e) {
|
|
36
|
+
if (i && typeof i != "string")
|
|
37
|
+
return i;
|
|
38
38
|
switch (e) {
|
|
39
39
|
case "symbol":
|
|
40
40
|
// 符号图层
|
|
@@ -46,47 +46,81 @@ function z(r, e) {
|
|
|
46
46
|
case "track":
|
|
47
47
|
// 调查轨迹
|
|
48
48
|
case "interest-point":
|
|
49
|
-
return
|
|
49
|
+
return i ? JSON.parse(i || "{}") : w;
|
|
50
50
|
case "point":
|
|
51
|
-
return JSON.parse(
|
|
51
|
+
return JSON.parse(i || "{}");
|
|
52
52
|
case "line":
|
|
53
|
-
return JSON.parse(
|
|
53
|
+
return JSON.parse(i || "{}");
|
|
54
54
|
case "shape":
|
|
55
55
|
// 形状图层
|
|
56
56
|
case "shp":
|
|
57
|
-
|
|
57
|
+
// SHP 文件图层
|
|
58
|
+
case "kml":
|
|
59
|
+
// KML 文件图层
|
|
60
|
+
case "kmz":
|
|
61
|
+
// KMZ 文件图层
|
|
62
|
+
case "tif":
|
|
63
|
+
return i ? JSON.parse(i || "{}") : d;
|
|
58
64
|
default:
|
|
59
65
|
throw new Error(`Unsupported layer type: ${e}`);
|
|
60
66
|
}
|
|
61
67
|
}
|
|
62
|
-
function
|
|
68
|
+
function T(i) {
|
|
63
69
|
try {
|
|
64
|
-
return `layer-id-${
|
|
70
|
+
return `layer-id-${i.id}`;
|
|
65
71
|
} catch (e) {
|
|
66
|
-
return console.error("Error getting layer ID:", e), `layer-id-${
|
|
72
|
+
return console.error("Error getting layer ID:", e), `layer-id-${L()}`;
|
|
67
73
|
}
|
|
68
74
|
}
|
|
69
|
-
function
|
|
75
|
+
function M(i) {
|
|
70
76
|
try {
|
|
71
|
-
return `source-id-${
|
|
77
|
+
return `source-id-${i.id}`;
|
|
72
78
|
} catch (e) {
|
|
73
|
-
return console.error("Error getting source ID:", e), `source-id-${
|
|
79
|
+
return console.error("Error getting source ID:", e), `source-id-${L()}`;
|
|
74
80
|
}
|
|
75
81
|
}
|
|
76
|
-
function
|
|
82
|
+
function N(i) {
|
|
77
83
|
try {
|
|
78
|
-
|
|
84
|
+
const e = i.layerPaintConfig ? JSON.parse(i.layerPaintConfig) : d;
|
|
85
|
+
if (e && typeof e == "object") {
|
|
86
|
+
const t = e, l = {
|
|
87
|
+
...d,
|
|
88
|
+
...t
|
|
89
|
+
}, u = Array.isArray(t.symbolConfigList) ? t.symbolConfigList : [], s = Array.isArray(t.circleConfigList) ? t.circleConfigList : [];
|
|
90
|
+
return !u.length && s.length && (l.symbolConfigList = JSON.parse(
|
|
91
|
+
JSON.stringify(s)
|
|
92
|
+
)), !s.length && u.length && (l.circleConfigList = JSON.parse(
|
|
93
|
+
JSON.stringify(u)
|
|
94
|
+
)), (!Array.isArray(l.fillColorList) || l.fillColorList.length === 0) && (l.fillColorList = JSON.parse(
|
|
95
|
+
JSON.stringify(d.fillColorList || [])
|
|
96
|
+
)), (!Array.isArray(l.outlineConfigList) || l.outlineConfigList.length === 0) && (l.outlineConfigList = JSON.parse(
|
|
97
|
+
JSON.stringify(d.outlineConfigList || [])
|
|
98
|
+
)), (!Array.isArray(l.symbolConfigList) || l.symbolConfigList.length === 0) && (l.symbolConfigList = JSON.parse(
|
|
99
|
+
JSON.stringify(d.symbolConfigList || [])
|
|
100
|
+
)), (!Array.isArray(l.circleConfigList) || l.circleConfigList.length === 0) && (l.circleConfigList = JSON.parse(
|
|
101
|
+
JSON.stringify(d.circleConfigList || [])
|
|
102
|
+
)), (!l.fillOpacityConfig || typeof l.fillOpacityConfig.value != "number") && (l.fillOpacityConfig = JSON.parse(
|
|
103
|
+
JSON.stringify(d.fillOpacityConfig || { value: 1 })
|
|
104
|
+
)), l;
|
|
105
|
+
}
|
|
106
|
+
return d;
|
|
79
107
|
} catch {
|
|
80
|
-
return
|
|
108
|
+
return d;
|
|
81
109
|
}
|
|
82
110
|
}
|
|
83
|
-
|
|
111
|
+
const C = (i) => {
|
|
112
|
+
const e = i.symbolConfigList, t = i.circleConfigList;
|
|
113
|
+
return Array.isArray(e) && e.length > 0 ? JSON.parse(JSON.stringify(e)) : Array.isArray(t) && t.length > 0 ? JSON.parse(JSON.stringify(t)) : JSON.parse(JSON.stringify(d.circleConfigList || []));
|
|
114
|
+
};
|
|
115
|
+
function E(i) {
|
|
84
116
|
let e = "fill";
|
|
85
|
-
switch (
|
|
117
|
+
switch (i.layerType) {
|
|
86
118
|
case "shp":
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
119
|
+
case "kml":
|
|
120
|
+
case "kmz":
|
|
121
|
+
if (i.layerShapes) {
|
|
122
|
+
const t = i.layerShapes.split(",").map((l) => l.trim().toLowerCase());
|
|
123
|
+
t.length === 1 ? t[0] === "point" ? e = "circle" : t[0] === "line" ? e = "line" : e = "fill" : e = "fill";
|
|
90
124
|
} else
|
|
91
125
|
e = "fill";
|
|
92
126
|
break;
|
|
@@ -94,9 +128,9 @@ function w(r) {
|
|
|
94
128
|
e = "line";
|
|
95
129
|
break;
|
|
96
130
|
case "symbol":
|
|
97
|
-
if (e = "circle",
|
|
98
|
-
const
|
|
99
|
-
|
|
131
|
+
if (e = "circle", i.layerPaintConfig) {
|
|
132
|
+
const t = JSON.parse(i.layerPaintConfig), l = t.symbolConfigList || t.circleConfigList;
|
|
133
|
+
l && l?.length > 0 && l[0].circleType == "symbol" && (e = "symbol");
|
|
100
134
|
}
|
|
101
135
|
break;
|
|
102
136
|
default:
|
|
@@ -104,50 +138,61 @@ function w(r) {
|
|
|
104
138
|
}
|
|
105
139
|
return e;
|
|
106
140
|
}
|
|
107
|
-
function
|
|
108
|
-
return r ? r.filter((e) => typeof e.key == "string" && e.value) : [];
|
|
109
|
-
}
|
|
110
|
-
function v(r) {
|
|
141
|
+
function A(i) {
|
|
111
142
|
try {
|
|
112
|
-
let e =
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
let
|
|
122
|
-
|
|
143
|
+
let e = {}, t = JSON.parse(
|
|
144
|
+
JSON.stringify(i.fillColorList)
|
|
145
|
+
);
|
|
146
|
+
const l = t.find(
|
|
147
|
+
(n) => n.type === "default"
|
|
148
|
+
), u = t.filter(
|
|
149
|
+
(n) => n.type === "custom"
|
|
150
|
+
);
|
|
151
|
+
l && (t = [...u, l]), console.log("[getFillStyle] 排序后的 fillColorList:", t);
|
|
152
|
+
let s = t.filter((n) => n.type === "custom" ? n.key && n.value : !0);
|
|
153
|
+
const f = s[s.length - 1];
|
|
154
|
+
if (!f || f.type !== "default")
|
|
155
|
+
return console.warn("[getFillStyle] 未找到默认配置,使用系统默认颜色"), e["fill-color"] = "rgba(103, 194, 58, 0.6)", e["fill-outline-color"] = "rgba(103, 194, 58, 1)", e;
|
|
156
|
+
console.log("[getFillStyle] 默认颜色配置:", f);
|
|
157
|
+
let r = [];
|
|
158
|
+
if (s.forEach((n) => {
|
|
123
159
|
if (n.type == "custom") {
|
|
124
|
-
let
|
|
125
|
-
|
|
126
|
-
o.key == n.key && (
|
|
127
|
-
}),
|
|
160
|
+
let a = -1;
|
|
161
|
+
r.forEach((o, c) => {
|
|
162
|
+
o.key == n.key && (a = c);
|
|
163
|
+
}), a > -1 ? r[a].list.push(n) : r.push({
|
|
128
164
|
key: n.key,
|
|
129
165
|
list: [n]
|
|
130
166
|
});
|
|
131
167
|
}
|
|
132
|
-
}),
|
|
133
|
-
n
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
168
|
+
}), console.log("[getFillStyle] fillColorGroupList:", r), r.length > 0) {
|
|
169
|
+
let n = f.color;
|
|
170
|
+
[...r].reverse().forEach((a) => {
|
|
171
|
+
const o = [
|
|
172
|
+
"match",
|
|
173
|
+
["to-string", ["get", a.key]]
|
|
174
|
+
];
|
|
175
|
+
a.list.forEach((c) => {
|
|
176
|
+
o.push(String(c.value)), o.push(c.color);
|
|
177
|
+
}), o.push(n), n = o;
|
|
178
|
+
}), e["fill-color"] = n, console.log("[getFillStyle] 使用条件渲染,colorExpression:", n);
|
|
179
|
+
} else
|
|
180
|
+
e["fill-color"] = f.color, console.log("[getFillStyle] 使用单一颜色:", f.color);
|
|
181
|
+
return e["fill-outline-color"] = f.color, e["fill-opacity"] = i?.fillOpacityConfig?.value ?? 1, console.log("[getFillStyle] 生成 fillStyle 成功:", e), e;
|
|
137
182
|
} catch (e) {
|
|
138
|
-
console.log("生成fillStyle
|
|
183
|
+
console.log("[getFillStyle] 生成 fillStyle 失败:", e);
|
|
139
184
|
}
|
|
140
185
|
}
|
|
141
|
-
function
|
|
142
|
-
if (!
|
|
186
|
+
function B(i) {
|
|
187
|
+
if (!i || !i.showLabel)
|
|
143
188
|
return null;
|
|
144
189
|
const e = {
|
|
145
190
|
// 设置标注文本字段
|
|
146
|
-
"text-field": ["get",
|
|
191
|
+
"text-field": ["get", i.labelField || "FID"],
|
|
147
192
|
// 设置字体大小
|
|
148
|
-
"text-size":
|
|
193
|
+
"text-size": i.fontSize || 14,
|
|
149
194
|
// 设置字体颜色
|
|
150
|
-
"text-color":
|
|
195
|
+
"text-color": i.fontColor || "#000000",
|
|
151
196
|
// 设置字体 - 使用 Mapbox 默认字体
|
|
152
197
|
"text-font": ["Open Sans Regular"],
|
|
153
198
|
// 文本锚点设置为多边形中心
|
|
@@ -161,226 +206,260 @@ function F(r) {
|
|
|
161
206
|
};
|
|
162
207
|
return console.log("生成labelStyle成功---->", e), e;
|
|
163
208
|
}
|
|
164
|
-
function
|
|
209
|
+
function J(i) {
|
|
165
210
|
try {
|
|
166
|
-
let { outlineConfigList: e } =
|
|
211
|
+
let { outlineConfigList: e } = i;
|
|
167
212
|
if (!e || e.length === 0)
|
|
168
|
-
return console.warn("outlineConfigList
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
213
|
+
return console.warn("[getOutLineStyle] outlineConfigList 为空,使用默认样式"), {
|
|
214
|
+
"line-color": "rgba(103, 194, 58, 1)",
|
|
215
|
+
"line-width": 2,
|
|
216
|
+
"line-dasharray": ["literal", []]
|
|
217
|
+
};
|
|
218
|
+
let t = JSON.parse(JSON.stringify(e));
|
|
219
|
+
const l = t.find(
|
|
172
220
|
(n) => n.type === "default"
|
|
173
|
-
)
|
|
174
|
-
|
|
221
|
+
), u = t.filter(
|
|
222
|
+
(n) => n.type === "custom"
|
|
223
|
+
);
|
|
224
|
+
l && (t = [...u, l]);
|
|
225
|
+
const s = t[t.length - 1];
|
|
226
|
+
if (!s || s.type !== "default")
|
|
227
|
+
return console.warn("[getOutLineStyle] 未找到默认配置,使用系统默认值"), {
|
|
228
|
+
"line-color": "rgba(103, 194, 58, 1)",
|
|
229
|
+
"line-width": 1
|
|
230
|
+
};
|
|
231
|
+
let f = {
|
|
175
232
|
"line-color": s.outlineColor || "rgba(103, 194, 58, 1)",
|
|
176
|
-
"line-opacity": s.outlineOpacity ?? 1,
|
|
177
233
|
"line-width": s.outlineWidth ?? 1
|
|
178
234
|
};
|
|
179
|
-
s.lineStyle === "dash" ?
|
|
180
|
-
let
|
|
181
|
-
if (
|
|
182
|
-
if (n.type === "custom" && n.key) {
|
|
183
|
-
let
|
|
184
|
-
|
|
185
|
-
o.key === n.key && (
|
|
186
|
-
}),
|
|
235
|
+
s.lineStyle === "dash" ? f["line-dasharray"] = [2, 2] : f["line-dasharray"] = ["literal", []];
|
|
236
|
+
let r = [];
|
|
237
|
+
if (t.forEach((n) => {
|
|
238
|
+
if (n.type === "custom" && n.key && n.value) {
|
|
239
|
+
let a = -1;
|
|
240
|
+
r.forEach((o, c) => {
|
|
241
|
+
o.key === n.key && (a = c);
|
|
242
|
+
}), a > -1 ? r[a].list.push(n) : r.push({
|
|
187
243
|
key: n.key,
|
|
188
244
|
list: [n]
|
|
189
245
|
});
|
|
190
246
|
}
|
|
191
|
-
}),
|
|
192
|
-
const o =
|
|
193
|
-
if (
|
|
194
|
-
(
|
|
247
|
+
}), r.length > 0 && (["line-color", "line-width"].forEach((a) => {
|
|
248
|
+
const o = a === "line-color" ? "outlineColor" : "outlineWidth";
|
|
249
|
+
if (r.some(
|
|
250
|
+
(g) => g.list.some((h) => h[o] !== void 0)
|
|
195
251
|
)) {
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
252
|
+
const g = [
|
|
253
|
+
"match",
|
|
254
|
+
["to-string", ["get", r[0].key]]
|
|
255
|
+
];
|
|
256
|
+
r.forEach((h) => {
|
|
257
|
+
h.list.forEach((p) => {
|
|
258
|
+
p.value !== void 0 && p[o] !== void 0 && (g.push(String(p.value)), g.push(p[o]));
|
|
200
259
|
});
|
|
201
|
-
}),
|
|
260
|
+
}), g.push(l[o] ?? f[a]), f[a] = g;
|
|
202
261
|
}
|
|
203
|
-
}),
|
|
204
|
-
(
|
|
262
|
+
}), r.some(
|
|
263
|
+
(a) => a.list.some((o) => o.lineStyle !== void 0)
|
|
205
264
|
))) {
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
265
|
+
const a = [
|
|
266
|
+
"match",
|
|
267
|
+
["to-string", ["get", r[0].key]]
|
|
268
|
+
];
|
|
269
|
+
r.forEach((o) => {
|
|
270
|
+
o.list.forEach((c) => {
|
|
271
|
+
c.value !== void 0 && c.lineStyle && (a.push(String(c.value)), a.push(
|
|
272
|
+
c.lineStyle === "dash" ? [2, 2] : ["literal", []]
|
|
211
273
|
));
|
|
212
274
|
});
|
|
213
|
-
}),
|
|
214
|
-
|
|
215
|
-
),
|
|
275
|
+
}), a.push(
|
|
276
|
+
l.lineStyle === "dash" ? [2, 2] : ["literal", []]
|
|
277
|
+
), f["line-dasharray"] = a;
|
|
216
278
|
}
|
|
217
|
-
return
|
|
279
|
+
return f;
|
|
218
280
|
} catch (e) {
|
|
219
|
-
return console.log("生成outlineStyle失败", e), {
|
|
281
|
+
return console.log("生成outlineStyle失败", e), {
|
|
282
|
+
"line-color": "rgba(103, 194, 58, 1)",
|
|
283
|
+
"line-width": 2,
|
|
284
|
+
"line-dasharray": []
|
|
285
|
+
};
|
|
220
286
|
}
|
|
221
287
|
}
|
|
222
|
-
function
|
|
223
|
-
let
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
288
|
+
function v(i) {
|
|
289
|
+
let e = C(i), t = JSON.parse(JSON.stringify(e));
|
|
290
|
+
const l = t.find(
|
|
291
|
+
(o) => o.type === "default"
|
|
292
|
+
), u = t.filter(
|
|
293
|
+
(o) => o.type === "custom"
|
|
294
|
+
);
|
|
295
|
+
l && (t = [...u, l]), console.log(
|
|
296
|
+
"[getCircleStyle] 排序后的 circleConfigList:",
|
|
297
|
+
t
|
|
298
|
+
);
|
|
299
|
+
const s = t[t.length - 1], f = s && (s.renderMode === "color" || s.renderMode === "icon");
|
|
300
|
+
if (!s || s.type !== "default")
|
|
301
|
+
return console.warn("[getCircleStyle] 未找到默认配置,使用系统默认值"), {
|
|
302
|
+
_useNewFormat: !0,
|
|
303
|
+
_circleConfigList: [
|
|
304
|
+
{
|
|
305
|
+
type: "default",
|
|
306
|
+
renderMode: "color",
|
|
307
|
+
pointStyle: "118",
|
|
308
|
+
pointTintColor: "rgba(103, 194, 58, 0.6)",
|
|
309
|
+
pointSize: 2
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"icon-image": "custom-icon-default-118-1031945806",
|
|
313
|
+
"icon-size": 1
|
|
314
|
+
};
|
|
315
|
+
if (console.log("[getCircleStyle] 默认配置:", s), f) {
|
|
316
|
+
const o = {
|
|
227
317
|
_useNewFormat: !0,
|
|
228
318
|
// 标记使用了新格式
|
|
229
|
-
_circleConfigList:
|
|
319
|
+
_circleConfigList: t
|
|
230
320
|
// 保存完整配置列表供后续使用
|
|
231
321
|
};
|
|
232
|
-
|
|
233
|
-
const
|
|
234
|
-
(
|
|
322
|
+
o["icon-image"] = [], o["icon-size"] = [];
|
|
323
|
+
const c = t.filter(
|
|
324
|
+
(g) => g.type === "custom" && g.value !== "" && g.value != null
|
|
235
325
|
);
|
|
236
|
-
if (
|
|
237
|
-
const
|
|
238
|
-
let
|
|
239
|
-
for (const
|
|
240
|
-
if (typeof
|
|
241
|
-
|
|
326
|
+
if (c.length > 0) {
|
|
327
|
+
const g = c[0].key;
|
|
328
|
+
let h = "string";
|
|
329
|
+
for (const y of c)
|
|
330
|
+
if (typeof y.value == "number") {
|
|
331
|
+
h = "number";
|
|
242
332
|
break;
|
|
243
333
|
}
|
|
244
|
-
const p = (
|
|
245
|
-
|
|
246
|
-
let
|
|
247
|
-
if (
|
|
248
|
-
const
|
|
334
|
+
const p = (y) => h === "number" ? typeof y == "number" ? y : Number(y) : String(y), m = ["match", ["get", g]];
|
|
335
|
+
c.forEach((y) => {
|
|
336
|
+
let k;
|
|
337
|
+
if (y.renderMode === "color") {
|
|
338
|
+
const O = (y.pointTintColor || "rgba(103, 194, 58, 1)").replace(
|
|
249
339
|
/[^a-zA-Z0-9]/g,
|
|
250
340
|
""
|
|
251
341
|
);
|
|
252
|
-
|
|
342
|
+
k = `custom-icon-${y.key}-${y.pointStyle || ""}-${O}`;
|
|
253
343
|
} else
|
|
254
|
-
|
|
255
|
-
|
|
344
|
+
k = y.pointStyle || "";
|
|
345
|
+
m.push(p(y.value)), m.push(k);
|
|
256
346
|
});
|
|
257
|
-
let
|
|
258
|
-
if (
|
|
259
|
-
const
|
|
260
|
-
|
|
347
|
+
let b;
|
|
348
|
+
if (s.renderMode === "color") {
|
|
349
|
+
const y = (s.pointTintColor || "#67c23a").replace(/[^a-zA-Z0-9]/g, "");
|
|
350
|
+
b = `custom-icon-default-${s.pointStyle || ""}-${y}`;
|
|
261
351
|
} else
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}),
|
|
352
|
+
b = s.pointStyle || "";
|
|
353
|
+
m.push(b), o["icon-image"] = m;
|
|
354
|
+
const S = ["match", ["get", g]];
|
|
355
|
+
c.forEach((y) => {
|
|
356
|
+
S.push(p(y.value)), S.push((y.pointSize || 10) / 20);
|
|
357
|
+
}), S.push((s.pointSize || 10) / 20), o["icon-size"] = S;
|
|
268
358
|
} else {
|
|
269
|
-
let
|
|
270
|
-
if (
|
|
271
|
-
const
|
|
272
|
-
|
|
359
|
+
let g;
|
|
360
|
+
if (s.renderMode === "color") {
|
|
361
|
+
const h = (s.pointTintColor || "#67c23a").replace(/[^a-zA-Z0-9]/g, "");
|
|
362
|
+
g = `custom-icon-default-${s.pointStyle || ""}-${h}`;
|
|
273
363
|
} else
|
|
274
|
-
|
|
275
|
-
|
|
364
|
+
g = s.pointStyle || "";
|
|
365
|
+
o["icon-image"] = g, o["icon-size"] = (s.pointSize || 10) / 20;
|
|
276
366
|
}
|
|
277
|
-
return
|
|
367
|
+
return o;
|
|
278
368
|
}
|
|
279
|
-
const
|
|
369
|
+
const r = {
|
|
280
370
|
"circle-radius": [],
|
|
281
371
|
"circle-stroke-width": [],
|
|
282
372
|
"circle-color": [],
|
|
283
373
|
"circle-stroke-color": [],
|
|
284
|
-
"circle-opacity": [],
|
|
285
|
-
"circle-stroke-opacity": [],
|
|
286
374
|
"icon-image": []
|
|
287
375
|
};
|
|
288
376
|
e = [...e];
|
|
289
|
-
const
|
|
290
|
-
e.splice(e.length - 1, 1),
|
|
291
|
-
|
|
377
|
+
const n = e[e.length - 1];
|
|
378
|
+
e.splice(e.length - 1, 1), r["circle-radius"] = [n.circleRadius], r["circle-stroke-width"] = [n.circleStrokeWidth], r["circle-color"] = [n.circleColor], r["circle-stroke-color"] = [n.circleStrokeColor], r["icon-image"] = [
|
|
379
|
+
n.iconImageUrl || ""
|
|
292
380
|
];
|
|
293
|
-
let
|
|
294
|
-
return e.forEach((
|
|
295
|
-
if (
|
|
296
|
-
let
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}),
|
|
300
|
-
|
|
301
|
-
) :
|
|
302
|
-
key:
|
|
303
|
-
list: [
|
|
381
|
+
let a = [];
|
|
382
|
+
return e.forEach((o) => {
|
|
383
|
+
if (o.type == "custom") {
|
|
384
|
+
let c = -1;
|
|
385
|
+
a.forEach((g, h) => {
|
|
386
|
+
g.key == o.key && (c = h);
|
|
387
|
+
}), c > -1 ? a[c].list.push(
|
|
388
|
+
o
|
|
389
|
+
) : a.push({
|
|
390
|
+
key: o.key,
|
|
391
|
+
list: [o]
|
|
304
392
|
});
|
|
305
393
|
}
|
|
306
|
-
}),
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}),
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
),
|
|
313
|
-
}),
|
|
314
|
-
"get",
|
|
315
|
-
l.key
|
|
316
|
-
]), t["circle-stroke-width"].unshift("match"), l.list.forEach((o) => {
|
|
317
|
-
t["circle-color"].unshift(o.circleColor), t["circle-color"].unshift(o.value);
|
|
318
|
-
}), t["circle-color"].unshift(["get", l.key]), t["circle-color"].unshift("match"), l.list.forEach((o) => {
|
|
319
|
-
t["circle-stroke-color"].unshift(
|
|
320
|
-
o.circleStrokeColor
|
|
321
|
-
), t["circle-stroke-color"].unshift(o.value);
|
|
322
|
-
}), t["circle-stroke-color"].unshift([
|
|
394
|
+
}), a.forEach((o) => {
|
|
395
|
+
n.circleType != "symbol" && (o.list.forEach((c) => {
|
|
396
|
+
r["circle-radius"].unshift(c.circleRadius), r["circle-radius"].unshift(c.value);
|
|
397
|
+
}), r["circle-radius"].unshift(["get", o.key]), r["circle-radius"].unshift("match"), o.list.forEach((c) => {
|
|
398
|
+
r["circle-stroke-width"].unshift(
|
|
399
|
+
c.circleStrokeWidth
|
|
400
|
+
), r["circle-stroke-width"].unshift(c.value);
|
|
401
|
+
}), r["circle-stroke-width"].unshift([
|
|
323
402
|
"get",
|
|
324
|
-
|
|
325
|
-
]),
|
|
326
|
-
|
|
327
|
-
}),
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
),
|
|
331
|
-
}),
|
|
403
|
+
o.key
|
|
404
|
+
]), r["circle-stroke-width"].unshift("match"), o.list.forEach((c) => {
|
|
405
|
+
r["circle-color"].unshift(c.circleColor), r["circle-color"].unshift(c.value);
|
|
406
|
+
}), r["circle-color"].unshift(["get", o.key]), r["circle-color"].unshift("match"), o.list.forEach((c) => {
|
|
407
|
+
r["circle-stroke-color"].unshift(
|
|
408
|
+
c.circleStrokeColor
|
|
409
|
+
), r["circle-stroke-color"].unshift(c.value);
|
|
410
|
+
}), r["circle-stroke-color"].unshift([
|
|
332
411
|
"get",
|
|
333
|
-
|
|
334
|
-
]),
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
),
|
|
338
|
-
}),
|
|
339
|
-
}), e.length == 0 && (
|
|
412
|
+
o.key
|
|
413
|
+
]), r["circle-stroke-color"].unshift("match")), n.circleType == "symbol" && (o.list.forEach((c) => {
|
|
414
|
+
r["icon-image"].unshift(
|
|
415
|
+
c.iconImageUrl || ""
|
|
416
|
+
), r["icon-image"].unshift(c.value);
|
|
417
|
+
}), r["icon-image"].unshift(["get", o.key]), r["icon-image"].unshift("match"));
|
|
418
|
+
}), e.length == 0 && (r["circle-radius"] = r["circle-radius"][0], r["circle-stroke-width"] = r["circle-stroke-width"][0], r["circle-color"] = r["circle-color"][0], r["circle-stroke-color"] = r["circle-stroke-color"][0], r["icon-image"] = r["icon-image"][0]), r;
|
|
340
419
|
}
|
|
341
|
-
function
|
|
342
|
-
let
|
|
343
|
-
const
|
|
420
|
+
function I(i) {
|
|
421
|
+
let e = C(i);
|
|
422
|
+
const t = {
|
|
344
423
|
"icon-image": []
|
|
345
|
-
},
|
|
346
|
-
e.
|
|
347
|
-
|
|
424
|
+
}, l = e[e.length - 1];
|
|
425
|
+
e = e.slice(0, -1), t["icon-image"] = [
|
|
426
|
+
l.iconImageUrl || ""
|
|
348
427
|
];
|
|
349
|
-
let
|
|
350
|
-
return e.forEach((
|
|
351
|
-
if (
|
|
352
|
-
let
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}),
|
|
356
|
-
|
|
357
|
-
) :
|
|
358
|
-
key:
|
|
359
|
-
list: [
|
|
428
|
+
let u = [];
|
|
429
|
+
return e.forEach((s) => {
|
|
430
|
+
if (s.type == "custom") {
|
|
431
|
+
let f = -1;
|
|
432
|
+
u.forEach((r, n) => {
|
|
433
|
+
r.key == s.key && (f = n);
|
|
434
|
+
}), f > -1 ? u[f].list.push(
|
|
435
|
+
s
|
|
436
|
+
) : u.push({
|
|
437
|
+
key: s.key,
|
|
438
|
+
list: [s]
|
|
360
439
|
});
|
|
361
440
|
}
|
|
362
|
-
}),
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
),
|
|
367
|
-
}),
|
|
368
|
-
}), e.length == 0 && (
|
|
441
|
+
}), u.forEach((s) => {
|
|
442
|
+
l.circleType == "symbol" && (s.list.forEach((f) => {
|
|
443
|
+
t["icon-image"].unshift(
|
|
444
|
+
f.iconImageUrl || ""
|
|
445
|
+
), t["icon-image"].unshift(f.value);
|
|
446
|
+
}), t["icon-image"].unshift(["get", s.key]), t["icon-image"].unshift("match"));
|
|
447
|
+
}), e.length == 0 && (t["icon-image"] = t["icon-image"][0]), t;
|
|
369
448
|
}
|
|
370
|
-
function
|
|
371
|
-
const e =
|
|
449
|
+
function U(i) {
|
|
450
|
+
const e = N(i), t = E(i), l = {
|
|
372
451
|
"fill-color": "rgba(103, 194, 58, 0.6)",
|
|
373
452
|
// 默认填充颜色为浅绿色,半透明
|
|
374
453
|
"fill-opacity": 1,
|
|
375
454
|
// 默认填充透明度为1
|
|
376
455
|
"fill-outline-color": "rgba(103, 194, 58, 1)"
|
|
377
456
|
// 默认轮廓颜色为绿色,不透明
|
|
378
|
-
},
|
|
379
|
-
"line-width":
|
|
380
|
-
// 默认线宽为
|
|
381
|
-
"line-color": "rgba(103, 194, 58,
|
|
382
|
-
//
|
|
383
|
-
},
|
|
457
|
+
}, u = {
|
|
458
|
+
"line-width": 2,
|
|
459
|
+
// 默认线宽为2像素(与 LayerStyleEditDialog 保持一致)
|
|
460
|
+
"line-color": "rgba(103, 194, 58, 1)"
|
|
461
|
+
// 默认线颜色为绿色,不透明
|
|
462
|
+
}, s = {
|
|
384
463
|
"circle-radius": ["interpolate", ["linear"], ["zoom"], 1, 6, 10, 8, 22, 12],
|
|
385
464
|
// 根据缩放级别调整圆点半径
|
|
386
465
|
"circle-stroke-width": [
|
|
@@ -411,84 +490,88 @@ function J(r) {
|
|
|
411
490
|
// 默认圆点颜色为浅绿色,半透明
|
|
412
491
|
};
|
|
413
492
|
if (!e)
|
|
414
|
-
switch (console.warn("当前图层样式配置不存在,使用默认样式,还有执行到这里的情况?"),
|
|
493
|
+
switch (console.warn("当前图层样式配置不存在,使用默认样式,还有执行到这里的情况?"), t) {
|
|
415
494
|
case "fill":
|
|
416
|
-
return
|
|
495
|
+
return l;
|
|
417
496
|
case "line":
|
|
418
|
-
return
|
|
497
|
+
return u;
|
|
419
498
|
case "circle":
|
|
420
|
-
return
|
|
499
|
+
return s;
|
|
421
500
|
}
|
|
422
|
-
switch (
|
|
501
|
+
switch (t) {
|
|
423
502
|
case "fill":
|
|
424
|
-
const
|
|
425
|
-
return
|
|
503
|
+
const f = A(e);
|
|
504
|
+
return f || l;
|
|
426
505
|
case "line":
|
|
427
|
-
const
|
|
428
|
-
return
|
|
506
|
+
const r = J(e);
|
|
507
|
+
return r || u;
|
|
429
508
|
case "circle":
|
|
430
|
-
const
|
|
431
|
-
return
|
|
509
|
+
const n = v(e);
|
|
510
|
+
return n || s;
|
|
432
511
|
case "symbol":
|
|
433
|
-
const a =
|
|
512
|
+
const a = I(e);
|
|
434
513
|
return a || {
|
|
435
|
-
"icon-image": "
|
|
436
|
-
// 默认图标图片
|
|
514
|
+
"icon-image": ""
|
|
437
515
|
};
|
|
438
516
|
}
|
|
439
517
|
}
|
|
440
|
-
function
|
|
441
|
-
return new Promise((e,
|
|
442
|
-
const
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
},
|
|
518
|
+
function W(i) {
|
|
519
|
+
return new Promise((e, t) => {
|
|
520
|
+
const l = new FileReader();
|
|
521
|
+
l.onload = () => {
|
|
522
|
+
l.result instanceof ArrayBuffer ? e(l.result) : t(new Error("Failed to read file as ArrayBuffer"));
|
|
523
|
+
}, l.onerror = t, l.readAsArrayBuffer(i);
|
|
446
524
|
});
|
|
447
525
|
}
|
|
448
|
-
function
|
|
449
|
-
const e =
|
|
450
|
-
if (
|
|
526
|
+
function D(i) {
|
|
527
|
+
const e = i.fileDirectory || {}, t = e.ModelTiepoint || [], l = e.ModelPixelScale || [];
|
|
528
|
+
if (t.length >= 6 && l.length >= 3) {
|
|
451
529
|
console.log(
|
|
452
530
|
"情况1:使用ModelTiepoint和ModelPixelScale计算边界",
|
|
453
|
-
|
|
454
|
-
|
|
531
|
+
t,
|
|
532
|
+
l
|
|
455
533
|
);
|
|
456
|
-
const
|
|
457
|
-
return [
|
|
534
|
+
const u = t[3], s = t[4], f = l[0], r = l[1], n = i.getWidth(), a = i.getHeight(), o = u, c = s, g = u + n * f, h = s - a * Math.abs(r);
|
|
535
|
+
return [o, h, g, c];
|
|
458
536
|
} else if (e.ModelTransformation) {
|
|
459
537
|
console.log("情况2:使用ModelTransformation矩阵计算边界");
|
|
460
|
-
const
|
|
461
|
-
if (
|
|
462
|
-
const
|
|
463
|
-
return [
|
|
538
|
+
const u = e.ModelTransformation;
|
|
539
|
+
if (u && u.length >= 16) {
|
|
540
|
+
const s = i.getWidth(), f = i.getHeight(), r = u[3], n = u[7], a = r + s * u[0], o = n + f * u[5];
|
|
541
|
+
return [r, n, a, o];
|
|
464
542
|
}
|
|
465
543
|
} else if (e.GeographicTypeGeoKey)
|
|
466
544
|
return console.warn("Limited geographic information. Using approximated bounds."), [-180, -90, 180, 90];
|
|
467
545
|
return console.warn("No geographic reference found. Using default bounds."), [-180, -90, 180, 90];
|
|
468
546
|
}
|
|
469
|
-
function
|
|
470
|
-
|
|
471
|
-
let e = 0,
|
|
472
|
-
return
|
|
547
|
+
function R(i) {
|
|
548
|
+
i = i.replace(/^#/, "");
|
|
549
|
+
let e = 0, t = 0, l = 0;
|
|
550
|
+
return i.length === 3 ? (e = parseInt(i.charAt(0) + i.charAt(0), 16), t = parseInt(i.charAt(1) + i.charAt(1), 16), l = parseInt(i.charAt(2) + i.charAt(2), 16)) : i.length === 6 && (e = parseInt(i.substring(0, 2), 16), t = parseInt(i.substring(2, 4), 16), l = parseInt(i.substring(4, 6), 16)), [e, t, l];
|
|
551
|
+
}
|
|
552
|
+
function P(i, e, t) {
|
|
553
|
+
return Math.max(e, Math.min(t, i));
|
|
473
554
|
}
|
|
474
|
-
function
|
|
475
|
-
|
|
555
|
+
function X(i, e) {
|
|
556
|
+
if (i)
|
|
557
|
+
return e.find((t) => t.id === i);
|
|
476
558
|
}
|
|
477
559
|
export {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
560
|
+
D as calculateBounds,
|
|
561
|
+
P as clamp,
|
|
562
|
+
v as getCircleStyle,
|
|
563
|
+
A as getFillStyle,
|
|
564
|
+
B as getLabelStyle,
|
|
565
|
+
T as getLayerId,
|
|
566
|
+
U as getLayerStyle,
|
|
567
|
+
E as getLayerType,
|
|
568
|
+
z as getLineLegendStyle,
|
|
569
|
+
J as getOutLineStyle,
|
|
570
|
+
M as getSourceId,
|
|
571
|
+
I as getSymbolStyle,
|
|
572
|
+
R as hexToRgb,
|
|
573
|
+
F as parseLayerPaintConfig,
|
|
574
|
+
N as parseStyleConfig,
|
|
575
|
+
W as readFileAsArrayBuffer,
|
|
576
|
+
X as resolveAssetById
|
|
494
577
|
};
|