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.
Files changed (246) hide show
  1. package/dist/apply-element-plus-theme.cjs +1 -0
  2. package/dist/apply-element-plus-theme.mjs +22 -0
  3. package/dist/beijihua-map-icon/hiper-map-icon-1.png +0 -0
  4. package/dist/beijihua-map-icon/hiper-map-icon-10.png +0 -0
  5. package/dist/beijihua-map-icon/hiper-map-icon-11.png +0 -0
  6. package/dist/beijihua-map-icon/hiper-map-icon-12.png +0 -0
  7. package/dist/beijihua-map-icon/hiper-map-icon-13.png +0 -0
  8. package/dist/beijihua-map-icon/hiper-map-icon-14.png +0 -0
  9. package/dist/beijihua-map-icon/hiper-map-icon-15.png +0 -0
  10. package/dist/beijihua-map-icon/hiper-map-icon-16.png +0 -0
  11. package/dist/beijihua-map-icon/hiper-map-icon-17.png +0 -0
  12. package/dist/beijihua-map-icon/hiper-map-icon-18.png +0 -0
  13. package/dist/beijihua-map-icon/hiper-map-icon-19.png +0 -0
  14. package/dist/beijihua-map-icon/hiper-map-icon-2.png +0 -0
  15. package/dist/beijihua-map-icon/hiper-map-icon-20.png +0 -0
  16. package/dist/beijihua-map-icon/hiper-map-icon-21.png +0 -0
  17. package/dist/beijihua-map-icon/hiper-map-icon-22.png +0 -0
  18. package/dist/beijihua-map-icon/hiper-map-icon-23.png +0 -0
  19. package/dist/beijihua-map-icon/hiper-map-icon-24.png +0 -0
  20. package/dist/beijihua-map-icon/hiper-map-icon-25.png +0 -0
  21. package/dist/beijihua-map-icon/hiper-map-icon-26.png +0 -0
  22. package/dist/beijihua-map-icon/hiper-map-icon-27.png +0 -0
  23. package/dist/beijihua-map-icon/hiper-map-icon-28.png +0 -0
  24. package/dist/beijihua-map-icon/hiper-map-icon-29.png +0 -0
  25. package/dist/beijihua-map-icon/hiper-map-icon-3.png +0 -0
  26. package/dist/beijihua-map-icon/hiper-map-icon-30.png +0 -0
  27. package/dist/beijihua-map-icon/hiper-map-icon-31.png +0 -0
  28. package/dist/beijihua-map-icon/hiper-map-icon-32.png +0 -0
  29. package/dist/beijihua-map-icon/hiper-map-icon-33.png +0 -0
  30. package/dist/beijihua-map-icon/hiper-map-icon-34.png +0 -0
  31. package/dist/beijihua-map-icon/hiper-map-icon-35.png +0 -0
  32. package/dist/beijihua-map-icon/hiper-map-icon-36.png +0 -0
  33. package/dist/beijihua-map-icon/hiper-map-icon-37.png +0 -0
  34. package/dist/beijihua-map-icon/hiper-map-icon-38.png +0 -0
  35. package/dist/beijihua-map-icon/hiper-map-icon-39.png +0 -0
  36. package/dist/beijihua-map-icon/hiper-map-icon-4.png +0 -0
  37. package/dist/beijihua-map-icon/hiper-map-icon-40.png +0 -0
  38. package/dist/beijihua-map-icon/hiper-map-icon-41.png +0 -0
  39. package/dist/beijihua-map-icon/hiper-map-icon-42.png +0 -0
  40. package/dist/beijihua-map-icon/hiper-map-icon-43.png +0 -0
  41. package/dist/beijihua-map-icon/hiper-map-icon-44.png +0 -0
  42. package/dist/beijihua-map-icon/hiper-map-icon-45.png +0 -0
  43. package/dist/beijihua-map-icon/hiper-map-icon-46.png +0 -0
  44. package/dist/beijihua-map-icon/hiper-map-icon-47.png +0 -0
  45. package/dist/beijihua-map-icon/hiper-map-icon-48.png +0 -0
  46. package/dist/beijihua-map-icon/hiper-map-icon-49.png +0 -0
  47. package/dist/beijihua-map-icon/hiper-map-icon-5.png +0 -0
  48. package/dist/beijihua-map-icon/hiper-map-icon-50.png +0 -0
  49. package/dist/beijihua-map-icon/hiper-map-icon-51.png +0 -0
  50. package/dist/beijihua-map-icon/hiper-map-icon-52.png +0 -0
  51. package/dist/beijihua-map-icon/hiper-map-icon-53.png +0 -0
  52. package/dist/beijihua-map-icon/hiper-map-icon-54.png +0 -0
  53. package/dist/beijihua-map-icon/hiper-map-icon-55.png +0 -0
  54. package/dist/beijihua-map-icon/hiper-map-icon-56.png +0 -0
  55. package/dist/beijihua-map-icon/hiper-map-icon-57.png +0 -0
  56. package/dist/beijihua-map-icon/hiper-map-icon-58.png +0 -0
  57. package/dist/beijihua-map-icon/hiper-map-icon-59.png +0 -0
  58. package/dist/beijihua-map-icon/hiper-map-icon-6.png +0 -0
  59. package/dist/beijihua-map-icon/hiper-map-icon-60.png +0 -0
  60. package/dist/beijihua-map-icon/hiper-map-icon-61.png +0 -0
  61. package/dist/beijihua-map-icon/hiper-map-icon-62.png +0 -0
  62. package/dist/beijihua-map-icon/hiper-map-icon-63.png +0 -0
  63. package/dist/beijihua-map-icon/hiper-map-icon-64.png +0 -0
  64. package/dist/beijihua-map-icon/hiper-map-icon-65.png +0 -0
  65. package/dist/beijihua-map-icon/hiper-map-icon-7.png +0 -0
  66. package/dist/beijihua-map-icon/hiper-map-icon-8.png +0 -0
  67. package/dist/beijihua-map-icon/hiper-map-icon-9.png +0 -0
  68. package/dist/chunks/{EventKeys-1aL9cgT0.js → EventKeys-DZ_Hahro.js} +4 -4
  69. 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
  70. 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
  71. 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
  72. package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-m9hkScAC.js +1 -0
  73. package/dist/chunks/apply-element-plus-theme-DdN9KOhk.js +1 -0
  74. package/dist/chunks/apply-element-plus-theme-UHVxP4VN.js +22 -0
  75. package/dist/chunks/aria-B5rZ0WFy.js +5 -0
  76. package/dist/chunks/aria-BEkkcjlH.js +115 -0
  77. package/dist/chunks/constant-Bq4ASE9Q.js +1 -0
  78. package/dist/chunks/{constant-BqK1UnfT.js → constant-E83OJqPQ.js} +17 -36
  79. package/dist/chunks/debounce-CHS-N31c.js +1 -0
  80. package/dist/chunks/debounce-DBq5TVsN.js +55 -0
  81. package/dist/chunks/{el-loading-CBXyo6la.js → directive-C-4KkhaM.js} +2 -2
  82. package/dist/chunks/directive-DRO4tFsQ.js +1 -0
  83. package/dist/chunks/index-03UF6hCZ.js +14 -0
  84. package/dist/chunks/index-B6SD5IcP.js +1 -0
  85. package/dist/chunks/{index-DHO_7w-5.js → index-BCQYbM-I.js} +22 -22
  86. package/dist/chunks/{el-input-DCpRXscw.js → index-BdloQTv1.js} +171 -175
  87. package/dist/chunks/{el-overlay-BJQjrf5W.js → index-BeskO4C8.js} +76 -75
  88. package/dist/chunks/index-BoFuR9-k.js +2 -0
  89. package/dist/chunks/index-Bs9zhLlD.js +1 -0
  90. package/dist/chunks/index-C-WIOEu8.js +1 -0
  91. package/dist/chunks/index-CD-vLVPt.js +1 -0
  92. package/dist/chunks/index-CD4bijv7.js +1 -0
  93. package/dist/chunks/index-CHRyd-8X.js +1 -0
  94. package/dist/chunks/{el-button-Dh7ROB0R.js → index-CgKiWbxR.js} +110 -117
  95. package/dist/chunks/{el-popper-zUql4Vp-.js → index-Cv_K9rbv.js} +47 -46
  96. package/dist/chunks/{el-select-Dil0JEvg.js → index-Cyrc4mj-.js} +467 -492
  97. package/dist/chunks/index-DLBjU25P.js +3 -0
  98. package/dist/chunks/index-DgwQEHlD.js +12 -0
  99. package/dist/chunks/index-LWCtnbZP.js +13 -0
  100. package/dist/chunks/index-OtE8c8y9.js +1 -0
  101. package/dist/chunks/index-Qzqd5jTh.js +1 -0
  102. package/dist/chunks/index-VbRYJz2E.js +1 -0
  103. package/dist/chunks/index-YiSmXvH8.js +975 -0
  104. package/dist/chunks/{index-Dq3Y5qiS.js → index-_At9ftZd.js} +35 -35
  105. package/dist/chunks/{index-Cw_w6CLf.js → index-ieQ_IULW.js} +11 -11
  106. package/dist/chunks/{el-form-item-CXLLocXw.js → index-mDs-Bipv.js} +151 -150
  107. package/dist/chunks/mapSetting-B1a88k-v.js +635 -0
  108. package/dist/chunks/mapSetting-Ba76lOJd.js +1 -0
  109. package/dist/chunks/{base-DfCoKyyG.js → style-COMeMpO8.js} +81 -80
  110. package/dist/chunks/{base-DK_JFP90.js → style-DiDWGUIe.js} +1 -1
  111. package/dist/chunks/toNumber-CCcOx5KD.js +1 -0
  112. package/dist/chunks/toNumber-CDwzVyqL.js +30 -0
  113. package/dist/chunks/use-form-common-props-BQtZKazE.js +66 -0
  114. package/dist/chunks/use-form-common-props-SdGVhyVk.js +1 -0
  115. package/dist/chunks/{use-global-config-DXAWJFeA.js → use-global-config-Ba3i7fKX.js} +18 -17
  116. package/dist/chunks/use-global-config-PaSl-b_9.js +1 -0
  117. package/dist/chunks/utils-BJ8Lu8TY.js +516 -0
  118. package/dist/chunks/utils-CrwGKkIz.js +1 -0
  119. package/dist/chunks/vnode-CvqQoLhR.js +1 -0
  120. package/dist/chunks/vnode-DpjFDm4v.js +70 -0
  121. package/dist/element-plus-style.cjs +1 -0
  122. package/dist/element-plus-style.mjs +1 -0
  123. package/dist/index.cjs +1 -1
  124. package/dist/index.mjs +13 -10
  125. package/dist/manageTable/ReplaceSpeciesNameDialog.cjs +1 -1
  126. package/dist/manageTable/ReplaceSpeciesNameDialog.mjs +1 -1
  127. package/dist/manageTable/index.cjs +1 -1
  128. package/dist/manageTable/index.mjs +10 -8
  129. package/dist/manageTable/manageTable.cjs +1 -1
  130. package/dist/manageTable/manageTable.mjs +1 -1
  131. package/dist/mapbox/components/VideoDialog.cjs +1 -1
  132. package/dist/mapbox/components/VideoDialog.mjs +16 -17
  133. package/dist/mapbox/widgets/LayerAttributeDialog.cjs +1 -1
  134. package/dist/mapbox/widgets/LayerAttributeDialog.mjs +30 -31
  135. package/dist/mapbox.cjs +1 -1
  136. package/dist/mapbox.mjs +22 -20
  137. package/dist/mapboxV2/MapView.cjs +1 -1
  138. package/dist/mapboxV2/MapView.mjs +3728 -1256
  139. package/dist/mapboxV2/components/MapLegend.cjs +1 -1
  140. package/dist/mapboxV2/components/MapLegend.mjs +51 -167
  141. package/dist/mapboxV2/components/MapTools.cjs +1 -1
  142. package/dist/mapboxV2/components/MapTools.mjs +1 -1
  143. package/dist/mapboxV2/components/VideoDialog.cjs +1 -1
  144. package/dist/mapboxV2/components/VideoDialog.mjs +12 -13
  145. package/dist/mapboxV2/components/mapSetting.cjs +1 -1
  146. package/dist/mapboxV2/components/mapSetting.mjs +1 -1
  147. package/dist/mapboxV2/components/mapTopic.cjs +1 -1
  148. package/dist/mapboxV2/components/mapTopic.mjs +349 -446
  149. package/dist/mapboxV2/constant.cjs +1 -1
  150. package/dist/mapboxV2/constant.mjs +13 -17
  151. package/dist/mapboxV2/useTif.cjs +1 -1
  152. package/dist/mapboxV2/useTif.mjs +86 -86
  153. package/dist/mapboxV2/utils.cjs +1 -1
  154. package/dist/mapboxV2/utils.mjs +362 -279
  155. package/dist/mapboxV2/widgets/CustomShapeDialog.cjs +1 -1
  156. package/dist/mapboxV2/widgets/CustomShapeDialog.mjs +87 -67
  157. package/dist/mapboxV2/widgets/IconPicker.cjs +1 -1
  158. package/dist/mapboxV2/widgets/IconPicker.mjs +59 -48
  159. package/dist/mapboxV2/widgets/LayerAttributeDialog.cjs +1 -1
  160. package/dist/mapboxV2/widgets/LayerAttributeDialog.mjs +17 -18
  161. package/dist/mapboxV2/widgets/LayerDialog.cjs +1 -1
  162. package/dist/mapboxV2/widgets/LayerDialog.mjs +94 -86
  163. package/dist/mapboxV2/widgets/LegendDialogLine.cjs +1 -1
  164. package/dist/mapboxV2/widgets/LegendDialogLine.mjs +95 -90
  165. package/dist/mapboxV2/widgets/LegendDialogPoint.cjs +1 -1
  166. package/dist/mapboxV2/widgets/LegendDialogPoint.mjs +90 -85
  167. package/dist/mapboxV2/widgets/LegendLine.cjs +1 -1
  168. package/dist/mapboxV2/widgets/LegendLine.mjs +28 -61
  169. package/dist/mapboxV2/widgets/LegendPoint.cjs +1 -1
  170. package/dist/mapboxV2/widgets/LegendPoint.mjs +52 -66
  171. package/dist/mapboxV2/widgets/LegendPopInterestPoint.cjs +1 -1
  172. package/dist/mapboxV2/widgets/LegendPopInterestPoint.mjs +16 -18
  173. package/dist/mapboxV2/widgets/LegendPopLine.cjs +1 -1
  174. package/dist/mapboxV2/widgets/LegendPopLine.mjs +72 -73
  175. package/dist/mapboxV2/widgets/LegendPopPoint.cjs +1 -1
  176. package/dist/mapboxV2/widgets/LegendPopPoint.mjs +113 -112
  177. package/dist/mapboxV2/widgets/LegendShape.cjs +1 -1
  178. package/dist/mapboxV2/widgets/LegendShape.mjs +17 -14
  179. package/dist/mapboxV2/widgets/LegendSymbol.cjs +1 -1
  180. package/dist/mapboxV2/widgets/LegendSymbol.mjs +5 -5
  181. package/dist/mapboxV2/widgets/ShapeDialog.cjs +1 -1
  182. package/dist/mapboxV2/widgets/ShapeDialog.mjs +1663 -1422
  183. package/dist/mapboxV2/widgets/TopicItemPop.cjs +1 -1
  184. package/dist/mapboxV2/widgets/TopicItemPop.mjs +2 -2
  185. package/dist/mapboxV2/widgets/TopicPop.mjs +1 -1
  186. package/dist/mapboxV2.cjs +3 -3
  187. package/dist/mapboxV2.mjs +673 -824
  188. package/dist/qy-vue-plugins.css +1 -1
  189. package/dist/types/apply-element-plus-theme.d.ts +1 -0
  190. package/dist/types/element-plus-style.d.ts +0 -0
  191. package/dist/types/manageTable/manageTable.vue.d.ts +2 -2
  192. package/dist/types/mapboxV2/MapView.vue.d.ts +130 -3
  193. package/dist/types/mapboxV2/components/mapTopic.vue.d.ts +10 -591
  194. package/dist/types/mapboxV2/types/map-layer.d.ts +185 -3
  195. package/dist/types/mapboxV2/useTif.d.ts +2 -2
  196. package/dist/types/mapboxV2/utils/geojsonRenderer.d.ts +123 -0
  197. package/dist/types/mapboxV2/utils.d.ts +5 -0
  198. package/dist/types/mapboxV2/widgets/IconPicker.vue.d.ts +8 -10
  199. package/dist/types/mapboxV2/widgets/index.d.ts +3 -0
  200. package/dist/types/mapboxV2/widgets/track/TrackImageDialog.vue.d.ts +11 -0
  201. package/dist/types/mapboxV2/widgets/track/TrackTextDialog.vue.d.ts +11 -0
  202. package/dist/types/mapboxV2/widgets/track/TrackVoiceDialog.vue.d.ts +11 -0
  203. package/dist/types/mapboxV2/widgets/track/index.d.ts +3 -0
  204. package/dist/types/store/mapStore.d.ts +122 -0
  205. package/dist/types/types/map.d.ts +111 -7
  206. package/package/apply-element-plus-theme.ts +23 -0
  207. package/package/css/common.scss +33 -0
  208. package/package/css/element-plus-theme.scss +30 -0
  209. package/package/css/map.scss +42 -0
  210. package/package/element-plus-style.ts +48 -0
  211. package/package/manageTable/index.ts +5 -0
  212. package/package/mapbox/index.ts +5 -0
  213. package/package/mapboxV2/constant.ts +4 -12
  214. package/package/mapboxV2/index.ts +5 -0
  215. package/package/mapboxV2/useTif.ts +18 -13
  216. package/package/mapboxV2/utils.ts +303 -143
  217. package/package/mapboxV2/widgets/index.ts +5 -0
  218. package/package/types/map.ts +129 -32
  219. package/package.json +27 -3
  220. package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-DnYed7Kh.js +0 -1
  221. package/dist/chunks/aria-B-Cm8P6h.js +0 -5
  222. package/dist/chunks/aria-GiGFrmP1.js +0 -175
  223. package/dist/chunks/constant-mXEWtcQf.js +0 -1
  224. package/dist/chunks/el-button-w9UOZkmd.js +0 -3
  225. package/dist/chunks/el-color-picker-panel-BWjyXHBz.js +0 -1
  226. package/dist/chunks/el-color-picker-panel-BfOVWDkH.js +0 -1024
  227. package/dist/chunks/el-form-item-ECXS8pAs.js +0 -12
  228. package/dist/chunks/el-input-tAiZBp5N.js +0 -1
  229. package/dist/chunks/el-loading-BDhLUhme.js +0 -1
  230. package/dist/chunks/el-overlay-BEd31jh6.js +0 -1
  231. package/dist/chunks/el-popper-C6hJmTeX.js +0 -1
  232. package/dist/chunks/el-select-BXP0YqqB.js +0 -1
  233. package/dist/chunks/index-BIPr63lF.js +0 -1
  234. package/dist/chunks/index-BIaoqnN4.js +0 -1
  235. package/dist/chunks/index-D9eecDRK.js +0 -2
  236. package/dist/chunks/mapSetting-BRasGCqk.js +0 -597
  237. package/dist/chunks/mapSetting-CfE-5SCc.js +0 -1
  238. package/dist/chunks/use-global-config-y6gk28OO.js +0 -1
  239. package/dist/chunks/utils-CZxmwfl_.js +0 -1
  240. package/dist/chunks/utils-n1i0zWzc.js +0 -454
  241. package/dist/chunks/vnode-CyTnPoXJ.js +0 -47
  242. package/dist/chunks/vnode-eKMqbqaC.js +0 -1
  243. package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-BRUTHTNe.js +0 -12
  244. package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-CksusXxb.js +0 -28
  245. package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-DchJeGnp.js +0 -1
  246. package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-yXKDlNvO.js +0 -17
@@ -1,40 +1,40 @@
1
- import { useId as k } from "vue";
2
- import { d as m, a as b } from "../chunks/constant-BqK1UnfT.js";
3
- function T(r, e) {
4
- let i = {
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 (r) {
7
+ switch (i) {
8
8
  case "solid":
9
9
  case "solid-line":
10
- i.borderBottom = `4px solid ${e}`;
10
+ t.borderBottom = `4px solid ${e}`;
11
11
  break;
12
12
  case "dash":
13
13
  case "dotted":
14
14
  case "simple-dash":
15
- i.borderBottom = `4px dashed ${e}`;
15
+ t.borderBottom = `4px dashed ${e}`;
16
16
  break;
17
17
  case "dot-dash":
18
- i.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%)`;
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
- i.backgroundImage = `linear-gradient(to right, ${e} 50%, rgba(255, 255, 255, 0) 50%)`;
21
+ t.backgroundImage = `linear-gradient(to right, ${e} 50%, rgba(255, 255, 255, 0) 50%)`;
22
22
  break;
23
23
  case "dot-line":
24
- i.backgroundImage = `linear-gradient(to right, ${e} 25%, rgba(255, 255, 255, 0) 10%)`;
24
+ t.backgroundImage = `linear-gradient(to right, ${e} 25%, rgba(255, 255, 255, 0) 10%)`;
25
25
  break;
26
26
  case "complex-pattern":
27
- i.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%)`;
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
- i.borderBottom = `4px solid ${e}`;
30
+ t.borderBottom = `4px solid ${e}`;
31
31
  break;
32
32
  }
33
- return i;
33
+ return t;
34
34
  }
35
- function z(r, e) {
36
- if (r && typeof r != "string")
37
- return r;
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 r ? JSON.parse(r || "{}") : b;
49
+ return i ? JSON.parse(i || "{}") : w;
50
50
  case "point":
51
- return JSON.parse(r || "{}");
51
+ return JSON.parse(i || "{}");
52
52
  case "line":
53
- return JSON.parse(r || "{}");
53
+ return JSON.parse(i || "{}");
54
54
  case "shape":
55
55
  // 形状图层
56
56
  case "shp":
57
- return r ? JSON.parse(r || "{}") : m;
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 M(r) {
68
+ function T(i) {
63
69
  try {
64
- return `layer-id-${r.id}`;
70
+ return `layer-id-${i.id}`;
65
71
  } catch (e) {
66
- return console.error("Error getting layer ID:", e), `layer-id-${k()}`;
72
+ return console.error("Error getting layer ID:", e), `layer-id-${L()}`;
67
73
  }
68
74
  }
69
- function A(r) {
75
+ function M(i) {
70
76
  try {
71
- return `source-id-${r.id}`;
77
+ return `source-id-${i.id}`;
72
78
  } catch (e) {
73
- return console.error("Error getting source ID:", e), `source-id-${k()}`;
79
+ return console.error("Error getting source ID:", e), `source-id-${L()}`;
74
80
  }
75
81
  }
76
- function L(r) {
82
+ function N(i) {
77
83
  try {
78
- return r.layerPaintConfig ? JSON.parse(r.layerPaintConfig) : m;
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 m;
108
+ return d;
81
109
  }
82
110
  }
83
- function w(r) {
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 (r.layerType) {
117
+ switch (i.layerType) {
86
118
  case "shp":
87
- if (r.layerShapes) {
88
- const i = r.layerShapes.split(",");
89
- i.length === 1 ? i[0] === "point" ? e = "circle" : i[0] === "line" ? e = "line" : e = "fill" : e = "fill";
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", r.layerPaintConfig) {
98
- const i = JSON.parse(r.layerPaintConfig);
99
- i.circleConfigList && i.circleConfigList?.length > 0 && i.circleConfigList[0].circleType == "symbol" && (e = "symbol");
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 E(r) {
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
- ...E(
114
- JSON.parse(JSON.stringify(r.fillColorList))
115
- )
116
- ], i = {};
117
- const s = JSON.parse(
118
- JSON.stringify(r.fillColorList)
119
- ), t = s[s.length - 1];
120
- i["fill-color"] = [t.color], i["fill-opacity"] = t.opacity, i["fill-outline-color"] = t.color;
121
- let c = [];
122
- return r.fillOpacityConfig && r.fillOpacityConfig.value != null && (i["fill-opacity"] = r.fillOpacityConfig.value), e.forEach((n) => {
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 l = -1;
125
- c.forEach((o, a) => {
126
- o.key == n.key && (l = a);
127
- }), l > -1 ? c[l].list.push(n) : c.push({
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
- }), c.length && c.forEach((n) => {
133
- n.list.forEach((l) => {
134
- i["fill-color"].unshift(l.color), i["fill-color"].unshift(l.value);
135
- }), i["fill-color"].unshift(["get", n.key]), i["fill-color"].unshift("match");
136
- }), i["fill-color"].length == 1 && (i["fill-color"] = i["fill-color"][0]), console.log("生成fillStyle成功---->", i), i;
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失败", e);
183
+ console.log("[getFillStyle] 生成 fillStyle 失败:", e);
139
184
  }
140
185
  }
141
- function F(r) {
142
- if (!r || !r.showLabel)
186
+ function B(i) {
187
+ if (!i || !i.showLabel)
143
188
  return null;
144
189
  const e = {
145
190
  // 设置标注文本字段
146
- "text-field": ["get", r.labelField || "FID"],
191
+ "text-field": ["get", i.labelField || "FID"],
147
192
  // 设置字体大小
148
- "text-size": r.fontSize || 14,
193
+ "text-size": i.fontSize || 14,
149
194
  // 设置字体颜色
150
- "text-color": r.fontColor || "#000000",
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 I(r) {
209
+ function J(i) {
165
210
  try {
166
- let { outlineConfigList: e } = r;
211
+ let { outlineConfigList: e } = i;
167
212
  if (!e || e.length === 0)
168
- return console.warn("outlineConfigList 为空"), {};
169
- const i = JSON.parse(
170
- JSON.stringify(e)
171
- ), s = i.find(
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
- ) || i[i.length - 1];
174
- let t = {
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" ? t["line-dasharray"] = [2, 2] : t["line-dasharray"] = ["literal", []];
180
- let c = [];
181
- if (e.forEach((n) => {
182
- if (n.type === "custom" && n.key) {
183
- let l = -1;
184
- c.forEach((o, a) => {
185
- o.key === n.key && (l = a);
186
- }), l > -1 ? c[l].list.push(n) : c.push({
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
- }), c.length > 0 && (["line-color", "line-opacity", "line-width"].forEach((l) => {
192
- const o = l === "line-color" ? "outlineColor" : l === "line-opacity" ? "outlineOpacity" : "outlineWidth";
193
- if (c.some(
194
- (f) => f.list.some((p) => p[o] !== void 0)
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 f = ["match", ["get", c[0].key]];
197
- c.forEach((p) => {
198
- p.list.forEach((h) => {
199
- h.value !== void 0 && h[o] !== void 0 && (f.push(h.value), f.push(h[o]));
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
- }), f.push(s[o] ?? t[l]), t[l] = f;
260
+ }), g.push(l[o] ?? f[a]), f[a] = g;
202
261
  }
203
- }), c.some(
204
- (l) => l.list.some((o) => o.lineStyle !== void 0)
262
+ }), r.some(
263
+ (a) => a.list.some((o) => o.lineStyle !== void 0)
205
264
  ))) {
206
- const l = ["match", ["get", c[0].key]];
207
- c.forEach((o) => {
208
- o.list.forEach((a) => {
209
- a.value !== void 0 && a.lineStyle && (l.push(a.value), l.push(
210
- a.lineStyle === "dash" ? [2, 2] : ["literal", []]
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
- }), l.push(
214
- s.lineStyle === "dash" ? [2, 2] : ["literal", []]
215
- ), t["line-dasharray"] = l;
275
+ }), a.push(
276
+ l.lineStyle === "dash" ? [2, 2] : ["literal", []]
277
+ ), f["line-dasharray"] = a;
216
278
  }
217
- return console.log("outlineStyle--->", t), t;
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 O(r) {
223
- let { circleConfigList: e } = r;
224
- const i = e[e.length - 1];
225
- if (i && (i.renderMode === "color" || i.renderMode === "icon")) {
226
- const l = {
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: e
319
+ _circleConfigList: t
230
320
  // 保存完整配置列表供后续使用
231
321
  };
232
- l["icon-image"] = [], l["icon-size"] = [];
233
- const o = e.filter(
234
- (a) => a.type === "custom" && a.value !== "" && a.value != null
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 (o.length > 0) {
237
- const a = o[0].key;
238
- let f = "string";
239
- for (const u of o)
240
- if (typeof u.value == "number") {
241
- f = "number";
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 = (u) => f === "number" ? typeof u == "number" ? u : Number(u) : String(u), h = ["match", ["get", a]];
245
- o.forEach((u) => {
246
- let g;
247
- if (u.renderMode === "color") {
248
- const S = (u.pointTintColor || "#67c23a").replace(
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
- g = `custom-icon-${u.key}-${(u.pointStyle || "地图点.svg").replace(".svg", "")}-${S}`;
342
+ k = `custom-icon-${y.key}-${y.pointStyle || ""}-${O}`;
253
343
  } else
254
- g = u.iconImageName || "hiper-map-icon-1.png";
255
- h.push(p(u.value)), h.push(g);
344
+ k = y.pointStyle || "";
345
+ m.push(p(y.value)), m.push(k);
256
346
  });
257
- let y;
258
- if (i.renderMode === "color") {
259
- const u = (i.pointTintColor || "#67c23a").replace(/[^a-zA-Z0-9]/g, "");
260
- y = `custom-icon-default-${(i.pointStyle || "地图点.svg").replace(".svg", "")}-${u}`;
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
- y = i.iconImageName || "hiper-map-icon-1.png";
263
- h.push(y), l["icon-image"] = h;
264
- const d = ["match", ["get", a]];
265
- o.forEach((u) => {
266
- d.push(p(u.value)), d.push((u.pointSize || 10) / 20);
267
- }), d.push((i.pointSize || 10) / 20), l["icon-size"] = d;
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 a;
270
- if (i.renderMode === "color") {
271
- const f = (i.pointTintColor || "#67c23a").replace(/[^a-zA-Z0-9]/g, "");
272
- a = `custom-icon-default-${(i.pointStyle || "地图点.svg").replace(".svg", "")}-${f}`;
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
- a = i.iconImageName || "hiper-map-icon-1.png";
275
- l["icon-image"] = a, l["icon-size"] = (i.pointSize || 10) / 20;
364
+ g = s.pointStyle || "";
365
+ o["icon-image"] = g, o["icon-size"] = (s.pointSize || 10) / 20;
276
366
  }
277
- return l;
367
+ return o;
278
368
  }
279
- const t = {
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 c = e[e.length - 1];
290
- e.splice(e.length - 1, 1), t["circle-radius"] = [c.circleRadius], t["circle-stroke-width"] = [c.circleStrokeWidth], t["circle-color"] = [c.circleColor], t["circle-stroke-color"] = [c.circleStrokeColor], t["circle-opacity"] = [c.circleOpacity], t["circle-stroke-opacity"] = [c.circleStrokeOpacity], t["icon-image"] = [
291
- c.iconImageUrl || "hiper-map-icon-1.png"
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 n = [];
294
- return e.forEach((l) => {
295
- if (l.type == "custom") {
296
- let o = -1;
297
- n.forEach((a, f) => {
298
- a.key == l.key && (o = f);
299
- }), o > -1 ? n[o].list.push(
300
- l
301
- ) : n.push({
302
- key: l.key,
303
- list: [l]
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
- }), n.forEach((l) => {
307
- c.circleType != "symbol" && (l.list.forEach((o) => {
308
- t["circle-radius"].unshift(o.circleRadius), t["circle-radius"].unshift(o.value);
309
- }), t["circle-radius"].unshift(["get", l.key]), t["circle-radius"].unshift("match"), l.list.forEach((o) => {
310
- t["circle-stroke-width"].unshift(
311
- o.circleStrokeWidth
312
- ), t["circle-stroke-width"].unshift(o.value);
313
- }), t["circle-stroke-width"].unshift([
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
- l.key
325
- ]), t["circle-stroke-color"].unshift("match"), l.list.forEach((o) => {
326
- t["circle-opacity"].unshift(o.circleOpacity), t["circle-opacity"].unshift(o.value);
327
- }), t["circle-opacity"].unshift(["get", l.key]), t["circle-opacity"].unshift("match"), l.list.forEach((o) => {
328
- t["circle-stroke-opacity"].unshift(
329
- o.circleStrokeOpacity
330
- ), t["circle-stroke-opacity"].unshift(o.value);
331
- }), t["circle-stroke-opacity"].unshift([
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
- l.key
334
- ]), t["circle-stroke-opacity"].unshift("match")), c.circleType == "symbol" && (l.list.forEach((o) => {
335
- t["icon-image"].unshift(
336
- o.iconImageUrl || "hiper-map-icon-1.png"
337
- ), t["icon-image"].unshift(o.value);
338
- }), t["icon-image"].unshift(["get", l.key]), t["icon-image"].unshift("match"));
339
- }), e.length == 0 && (t["circle-radius"] = t["circle-radius"][0], t["circle-stroke-width"] = t["circle-stroke-width"][0], t["circle-color"] = t["circle-color"][0], t["circle-stroke-color"] = t["circle-stroke-color"][0], t["circle-opacity"] = t["circle-opacity"][0], t["circle-stroke-opacity"] = t["circle-stroke-opacity"][0], t["icon-image"] = t["icon-image"][0]), t;
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 x(r) {
342
- let { circleConfigList: e } = r;
343
- const i = {
420
+ function I(i) {
421
+ let e = C(i);
422
+ const t = {
344
423
  "icon-image": []
345
- }, s = e[e.length - 1];
346
- e.splice(e.length - 1, 1), i["icon-image"] = [
347
- s.iconImageUrl || "hiper-map-icon-1.png"
424
+ }, l = e[e.length - 1];
425
+ e = e.slice(0, -1), t["icon-image"] = [
426
+ l.iconImageUrl || ""
348
427
  ];
349
- let t = [];
350
- return e.forEach((c) => {
351
- if (c.type == "custom") {
352
- let n = -1;
353
- t.forEach((l, o) => {
354
- l.key == c.key && (n = o);
355
- }), n > -1 ? t[n].list.push(
356
- c
357
- ) : t.push({
358
- key: c.key,
359
- list: [c]
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
- }), t.forEach((c) => {
363
- s.circleType == "symbol" && (c.list.forEach((n) => {
364
- i["icon-image"].unshift(
365
- n.iconImageUrl || "hiper-map-icon-1.png"
366
- ), i["icon-image"].unshift(n.value);
367
- }), i["icon-image"].unshift(["get", c.key]), i["icon-image"].unshift("match"));
368
- }), e.length == 0 && (i["icon-image"] = i["icon-image"][0]), i;
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 J(r) {
371
- const e = L(r), i = w(r), s = {
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
- }, t = {
379
- "line-width": 1,
380
- // 默认线宽为1像素
381
- "line-color": "rgba(103, 194, 58, 0.6)"
382
- // 默认线颜色为浅绿色,半透明
383
- }, c = {
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("当前图层样式配置不存在,使用默认样式,还有执行到这里的情况?"), i) {
493
+ switch (console.warn("当前图层样式配置不存在,使用默认样式,还有执行到这里的情况?"), t) {
415
494
  case "fill":
416
- return s;
495
+ return l;
417
496
  case "line":
418
- return t;
497
+ return u;
419
498
  case "circle":
420
- return c;
499
+ return s;
421
500
  }
422
- switch (i) {
501
+ switch (t) {
423
502
  case "fill":
424
- const n = v(e);
425
- return n || s;
503
+ const f = A(e);
504
+ return f || l;
426
505
  case "line":
427
- const l = I(e);
428
- return l || t;
506
+ const r = J(e);
507
+ return r || u;
429
508
  case "circle":
430
- const o = O(e);
431
- return o || c;
509
+ const n = v(e);
510
+ return n || s;
432
511
  case "symbol":
433
- const a = x(e);
512
+ const a = I(e);
434
513
  return a || {
435
- "icon-image": "hiper-map-icon-1.png"
436
- // 默认图标图片
514
+ "icon-image": ""
437
515
  };
438
516
  }
439
517
  }
440
- function C(r) {
441
- return new Promise((e, i) => {
442
- const s = new FileReader();
443
- s.onload = () => {
444
- s.result instanceof ArrayBuffer ? e(s.result) : i(new Error("Failed to read file as ArrayBuffer"));
445
- }, s.onerror = i, s.readAsArrayBuffer(r);
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 B(r) {
449
- const e = r.fileDirectory || {}, i = e.ModelTiepoint || [], s = e.ModelPixelScale || [];
450
- if (i.length >= 6 && s.length >= 3) {
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
- i,
454
- s
531
+ t,
532
+ l
455
533
  );
456
- const t = i[3], c = i[4], n = s[0], l = s[1], o = r.getWidth(), a = r.getHeight(), f = t, p = c, h = t + o * n, y = c - a * Math.abs(l);
457
- return [f, y, h, p];
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 t = e.ModelTransformation;
461
- if (t && t.length >= 16) {
462
- const c = r.getWidth(), n = r.getHeight(), l = t[3], o = t[7], a = l + c * t[0], f = o + n * t[5];
463
- return [l, o, a, f];
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 U(r) {
470
- r = r.replace(/^#/, "");
471
- let e = 0, i = 0, s = 0;
472
- return r.length === 3 ? (e = parseInt(r.charAt(0) + r.charAt(0), 16), i = parseInt(r.charAt(1) + r.charAt(1), 16), s = parseInt(r.charAt(2) + r.charAt(2), 16)) : r.length === 6 && (e = parseInt(r.substring(0, 2), 16), i = parseInt(r.substring(2, 4), 16), s = parseInt(r.substring(4, 6), 16)), [e, i, s];
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 W(r, e, i) {
475
- return Math.max(e, Math.min(i, r));
555
+ function X(i, e) {
556
+ if (i)
557
+ return e.find((t) => t.id === i);
476
558
  }
477
559
  export {
478
- B as calculateBounds,
479
- W as clamp,
480
- O as getCircleStyle,
481
- v as getFillStyle,
482
- F as getLabelStyle,
483
- M as getLayerId,
484
- J as getLayerStyle,
485
- w as getLayerType,
486
- T as getLineLegendStyle,
487
- I as getOutLineStyle,
488
- A as getSourceId,
489
- x as getSymbolStyle,
490
- U as hexToRgb,
491
- z as parseLayerPaintConfig,
492
- L as parseStyleConfig,
493
- C as readFileAsArrayBuffer
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
  };