leiting-bim 2.1.48 → 2.1.52

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 (410) hide show
  1. package/package.json +16 -2
  2. package/plugins/cesium-core/dist/cesium-core.mjs +587 -535
  3. package/plugins/cesium-core/dist/cesium-core.mjs.map +1 -0
  4. package/plugins/cesium-core/dist/cesium-core.umd.js +19 -18
  5. package/plugins/cesium-core/dist/cesium-core.umd.js.map +1 -0
  6. package/plugins/cesium-core/dist/components/BufferedHierarchicalAggregator.d.ts +76 -73
  7. package/plugins/cesium-vue/dist/_commonjsHelpers-DaMA6jEr.js +1 -0
  8. package/plugins/cesium-vue/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  9. package/plugins/cesium-vue/dist/components/basic-audio.js +3 -2
  10. package/plugins/cesium-vue/dist/components/basic-audio.js.map +1 -0
  11. package/plugins/cesium-vue/dist/components/basic-video.js +3 -2
  12. package/plugins/cesium-vue/dist/components/basic-video.js.map +1 -0
  13. package/plugins/cesium-vue/dist/components/card-carousel.js +2 -1
  14. package/plugins/cesium-vue/dist/components/card-carousel.js.map +1 -0
  15. package/plugins/cesium-vue/dist/components/card-content.js +13 -12
  16. package/plugins/cesium-vue/dist/components/card-content.js.map +1 -0
  17. package/plugins/cesium-vue/dist/components/card-page.js +2 -1
  18. package/plugins/cesium-vue/dist/components/card-page.js.map +1 -0
  19. package/plugins/cesium-vue/dist/components/carousel-img.js +6 -5
  20. package/plugins/cesium-vue/dist/components/carousel-img.js.map +1 -0
  21. package/plugins/cesium-vue/dist/components/echarts-pro.js +2 -1
  22. package/plugins/cesium-vue/dist/components/echarts-pro.js.map +1 -0
  23. package/plugins/cesium-vue/dist/components/marker-bubble.js +5 -4
  24. package/plugins/cesium-vue/dist/components/marker-bubble.js.map +1 -0
  25. package/plugins/cesium-vue/dist/components/marker-default.js +6 -5
  26. package/plugins/cesium-vue/dist/components/marker-default.js.map +1 -0
  27. package/plugins/cesium-vue/dist/components/marker-html.js +6 -5
  28. package/plugins/cesium-vue/dist/components/marker-html.js.map +1 -0
  29. package/plugins/cesium-vue/dist/components/marker-manage.js +112 -94
  30. package/plugins/cesium-vue/dist/components/marker-manage.js.map +1 -0
  31. package/plugins/cesium-vue/dist/components/marker-text.js +6 -5
  32. package/plugins/cesium-vue/dist/components/marker-text.js.map +1 -0
  33. package/plugins/cesium-vue/dist/components/measurement.js +4 -3
  34. package/plugins/cesium-vue/dist/components/measurement.js.map +1 -0
  35. package/plugins/cesium-vue/dist/components/position-picker/index.d.ts +58 -0
  36. package/plugins/cesium-vue/dist/components/position-picker.d.ts +6 -0
  37. package/plugins/cesium-vue/dist/components/position-picker.js +243 -0
  38. package/plugins/cesium-vue/dist/components/position-picker.js.map +1 -0
  39. package/plugins/cesium-vue/dist/create-DynflqE1.js +1 -0
  40. package/plugins/cesium-vue/dist/create-DynflqE1.js.map +1 -0
  41. package/plugins/cesium-vue/dist/{index-B03tSn8_.js → index-C0pspk3x.js} +3 -2
  42. package/plugins/cesium-vue/dist/index-C0pspk3x.js.map +1 -0
  43. package/plugins/cesium-vue/dist/index-CUs_hd1V.js +1 -0
  44. package/plugins/cesium-vue/dist/index-CUs_hd1V.js.map +1 -0
  45. package/plugins/cesium-vue/dist/index.d.ts +3 -1
  46. package/plugins/cesium-vue/dist/index.js +31 -27
  47. package/plugins/cesium-vue/dist/index.js.map +1 -0
  48. package/plugins/cesium-vue/package.json +4 -0
  49. package/plugins/theme-chalk/dist/debug.log +1 -0
  50. package/plugins/.gitmodules +0 -4
  51. package/plugins/README.md +0 -2
  52. package/plugins/build.cjs +0 -63
  53. package/plugins/cesium-core/pnpm-lock.yaml +0 -872
  54. package/plugins/cesium-core/src/components/BufferedHierarchicalAggregator.ts +0 -546
  55. package/plugins/cesium-core/src/components/HtmlOverlayLabelPool.ts +0 -489
  56. package/plugins/cesium-core/src/components/MarkerEvent.ts +0 -92
  57. package/plugins/cesium-core/src/components/Material/MaterialManager.ts +0 -129
  58. package/plugins/cesium-core/src/components/Material/help/PolylineFlowMaterialProperty.ts +0 -116
  59. package/plugins/cesium-core/src/components/Material/help/dynamicImgMaterial.ts +0 -236
  60. package/plugins/cesium-core/src/components/Material/index.ts +0 -3
  61. package/plugins/cesium-core/src/components/TooltipManager.ts +0 -52
  62. package/plugins/cesium-core/src/components/draw/DrawTool.ts +0 -55
  63. package/plugins/cesium-core/src/components/draw/handlers/CircleDrawer.ts +0 -159
  64. package/plugins/cesium-core/src/components/draw/handlers/LineDrawer.ts +0 -113
  65. package/plugins/cesium-core/src/components/draw/handlers/PointDrawer.ts +0 -70
  66. package/plugins/cesium-core/src/components/draw/handlers/PolygonDrawer.ts +0 -112
  67. package/plugins/cesium-core/src/components/draw/handlers/RectangleDrawer.ts +0 -115
  68. package/plugins/cesium-core/src/components/draw/types.ts +0 -28
  69. package/plugins/cesium-core/src/components/entity/EntityLayer.ts +0 -453
  70. package/plugins/cesium-core/src/components/gltf/GLTFManage.ts +0 -799
  71. package/plugins/cesium-core/src/components/gltf/index.ts +0 -1
  72. package/plugins/cesium-core/src/components/measurement/MeasurementTool.ts +0 -416
  73. package/plugins/cesium-core/src/components/measurement/handlers/AreaMeasure.ts +0 -552
  74. package/plugins/cesium-core/src/components/measurement/handlers/CircleMeasure.ts +0 -289
  75. package/plugins/cesium-core/src/components/measurement/handlers/CoordinateMeasure.ts +0 -139
  76. package/plugins/cesium-core/src/components/measurement/handlers/HorizontalMeasure.ts +0 -427
  77. package/plugins/cesium-core/src/components/measurement/handlers/PolylineDistanceMeasure.ts +0 -356
  78. package/plugins/cesium-core/src/components/measurement/handlers/RectangleMeasure.ts +0 -516
  79. package/plugins/cesium-core/src/components/measurement/handlers/RegularPolygonMeasure.ts +0 -472
  80. package/plugins/cesium-core/src/components/measurement/handlers/SpaceMeasure.ts +0 -250
  81. package/plugins/cesium-core/src/components/measurement/handlers/TerrainHeightMeasure.ts +0 -185
  82. package/plugins/cesium-core/src/components/measurement/handlers/TriangleMeasure.ts +0 -561
  83. package/plugins/cesium-core/src/components/measurement/handlers/VerticalMeasure.ts +0 -361
  84. package/plugins/cesium-core/src/components/measurement/index.ts +0 -13
  85. package/plugins/cesium-core/src/components/measurement/types.ts +0 -57
  86. package/plugins/cesium-core/src/components/primitive/PrimitiveManager.ts +0 -556
  87. package/plugins/cesium-core/src/components/roaming/CameraRoamTool.ts +0 -286
  88. package/plugins/cesium-core/src/components/roaming/PathRoamTool.ts +0 -174
  89. package/plugins/cesium-core/src/components/roaming/index.ts +0 -3
  90. package/plugins/cesium-core/src/components/roaming/types.ts +0 -71
  91. package/plugins/cesium-core/src/components/utils/convertGeoJsonToEntityData.ts +0 -98
  92. package/plugins/cesium-core/src/components/utils/uuid.ts +0 -7
  93. package/plugins/cesium-core/src/index.ts +0 -17
  94. package/plugins/cesium-core/src/test/measurement/index.html +0 -166
  95. package/plugins/cesium-core/src/test/roaming/c.gltf +0 -1
  96. package/plugins/cesium-core/src/test/roaming/f87cc3ea918a4b76bff2c88a3655eb1f.bin +0 -0
  97. package/plugins/cesium-core/src/test/roaming/index.html +0 -51
  98. package/plugins/cesium-core/src/test/roaming/path.html +0 -448
  99. package/plugins/cesium-core/src/test/roaming/view.html +0 -520
  100. package/plugins/cesium-core/stats.html +0 -4949
  101. package/plugins/cesium-core/tsconfig.json +0 -14
  102. package/plugins/cesium-core/vite.config.ts +0 -35
  103. package/plugins/cesium-vue/src/assets/icons/icon-001.png +0 -0
  104. package/plugins/cesium-vue/src/assets/icons/icon-002.png +0 -0
  105. package/plugins/cesium-vue/src/assets/icons/icon-003.png +0 -0
  106. package/plugins/cesium-vue/src/assets/icons/icon-004.png +0 -0
  107. package/plugins/cesium-vue/src/assets/icons/icon-005.png +0 -0
  108. package/plugins/cesium-vue/src/assets/icons/icon-006.png +0 -0
  109. package/plugins/cesium-vue/src/assets/icons/icon-007.png +0 -0
  110. package/plugins/cesium-vue/src/assets/icons/icon-008.png +0 -0
  111. package/plugins/cesium-vue/src/assets/icons/icon-009.png +0 -0
  112. package/plugins/cesium-vue/src/assets/icons/icon-010.png +0 -0
  113. package/plugins/cesium-vue/src/assets/icons/icon-011.png +0 -0
  114. package/plugins/cesium-vue/src/assets/icons/icon-012.png +0 -0
  115. package/plugins/cesium-vue/src/assets/img/Card3-BG.png +0 -0
  116. package/plugins/cesium-vue/src/assets/img/card_bg3.png +0 -0
  117. package/plugins/cesium-vue/src/components/basic-audio/index.ts +0 -6
  118. package/plugins/cesium-vue/src/components/basic-audio/src/BasicAudio.vue +0 -119
  119. package/plugins/cesium-vue/src/components/basic-audio/src/basicAudio.ts +0 -6
  120. package/plugins/cesium-vue/src/components/basic-video/index.ts +0 -7
  121. package/plugins/cesium-vue/src/components/basic-video/src/BasicVideo.vue +0 -58
  122. package/plugins/cesium-vue/src/components/basic-video/src/basicVideo.ts +0 -14
  123. package/plugins/cesium-vue/src/components/card-carousel/index.ts +0 -7
  124. package/plugins/cesium-vue/src/components/card-carousel/src/CardCarousel.vue +0 -124
  125. package/plugins/cesium-vue/src/components/card-carousel/src/cardCarousel.ts +0 -60
  126. package/plugins/cesium-vue/src/components/card-content/index.ts +0 -7
  127. package/plugins/cesium-vue/src/components/card-content/src/CardContent.vue +0 -41
  128. package/plugins/cesium-vue/src/components/card-content/src/cardContent.ts +0 -22
  129. package/plugins/cesium-vue/src/components/card-page/index.ts +0 -7
  130. package/plugins/cesium-vue/src/components/card-page/src/CardPage.vue +0 -102
  131. package/plugins/cesium-vue/src/components/card-page/src/cardPage.ts +0 -37
  132. package/plugins/cesium-vue/src/components/carousel-img/index.ts +0 -7
  133. package/plugins/cesium-vue/src/components/carousel-img/src/CarouselImg.vue +0 -84
  134. package/plugins/cesium-vue/src/components/carousel-img/src/carouselImg.ts +0 -8
  135. package/plugins/cesium-vue/src/components/echarts-pro/index.ts +0 -7
  136. package/plugins/cesium-vue/src/components/echarts-pro/src/EchartsPro.vue +0 -107
  137. package/plugins/cesium-vue/src/components/echarts-pro/src/echartsPro.ts +0 -12
  138. package/plugins/cesium-vue/src/components/echarts-pro/src/hook/useECharts.ts +0 -55
  139. package/plugins/cesium-vue/src/components/marker-bubble/index.ts +0 -7
  140. package/plugins/cesium-vue/src/components/marker-bubble/src/MarkerBubble.vue +0 -235
  141. package/plugins/cesium-vue/src/components/marker-bubble/src/markerBubble.ts +0 -35
  142. package/plugins/cesium-vue/src/components/marker-default/index.ts +0 -7
  143. package/plugins/cesium-vue/src/components/marker-default/src/MarkerDefault.vue +0 -19
  144. package/plugins/cesium-vue/src/components/marker-default/src/markerDefault.ts +0 -12
  145. package/plugins/cesium-vue/src/components/marker-html/index.ts +0 -7
  146. package/plugins/cesium-vue/src/components/marker-html/src/MarkerHtml.vue +0 -21
  147. package/plugins/cesium-vue/src/components/marker-html/src/markerHtml.ts +0 -12
  148. package/plugins/cesium-vue/src/components/marker-manage/index.ts +0 -9
  149. package/plugins/cesium-vue/src/components/marker-manage/src/components/MarkerManage.vue +0 -106
  150. package/plugins/cesium-vue/src/components/marker-manage/src/config/theme.ts +0 -8
  151. package/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManage.ts +0 -466
  152. package/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManagerCore.ts +0 -148
  153. package/plugins/cesium-vue/src/components/marker-manage/src/hook/useMarkerManage.ts +0 -45
  154. package/plugins/cesium-vue/src/components/marker-manage/src/type/markerManage.ts +0 -75
  155. package/plugins/cesium-vue/src/components/marker-manage/src/utils/themeTool.ts +0 -154
  156. package/plugins/cesium-vue/src/components/marker-text/index.ts +0 -7
  157. package/plugins/cesium-vue/src/components/marker-text/src/MarkerText.vue +0 -14
  158. package/plugins/cesium-vue/src/components/marker-text/src/markerText.ts +0 -10
  159. package/plugins/cesium-vue/src/components/measurement/index.ts +0 -7
  160. package/plugins/cesium-vue/src/components/measurement/src/Measurement.vue +0 -183
  161. package/plugins/cesium-vue/src/components/measurement/src/measurement.ts +0 -20
  162. package/plugins/cesium-vue/src/index.ts +0 -89
  163. package/plugins/cesium-vue/stats.html +0 -4949
  164. package/plugins/cesium-vue/tsconfig.json +0 -18
  165. package/plugins/cesium-vue/vite.config.ts +0 -62
  166. package/plugins/plugins/README.md +0 -2
  167. package/plugins/plugins/build.cjs +0 -63
  168. package/plugins/plugins/cesium-core/dist/cesium-core.mjs +0 -5881
  169. package/plugins/plugins/cesium-core/dist/cesium-core.mjs.map +0 -1
  170. package/plugins/plugins/cesium-core/dist/cesium-core.umd.js +0 -77
  171. package/plugins/plugins/cesium-core/dist/cesium-core.umd.js.map +0 -1
  172. package/plugins/plugins/cesium-core/dist/components/BufferedHierarchicalAggregator.d.ts +0 -73
  173. package/plugins/plugins/cesium-core/dist/components/HtmlOverlayLabelPool.d.ts +0 -152
  174. package/plugins/plugins/cesium-core/dist/components/MarkerEvent.d.ts +0 -38
  175. package/plugins/plugins/cesium-core/dist/components/Material/MaterialManager.d.ts +0 -49
  176. package/plugins/plugins/cesium-core/dist/components/Material/help/PolylineFlowMaterialProperty.d.ts +0 -10
  177. package/plugins/plugins/cesium-core/dist/components/Material/help/dynamicImgMaterial.d.ts +0 -16
  178. package/plugins/plugins/cesium-core/dist/components/Material/index.d.ts +0 -3
  179. package/plugins/plugins/cesium-core/dist/components/TooltipManager.d.ts +0 -11
  180. package/plugins/plugins/cesium-core/dist/components/draw/DrawTool.d.ts +0 -10
  181. package/plugins/plugins/cesium-core/dist/components/draw/handlers/CircleDrawer.d.ts +0 -16
  182. package/plugins/plugins/cesium-core/dist/components/draw/handlers/LineDrawer.d.ts +0 -14
  183. package/plugins/plugins/cesium-core/dist/components/draw/handlers/PointDrawer.d.ts +0 -12
  184. package/plugins/plugins/cesium-core/dist/components/draw/handlers/PolygonDrawer.d.ts +0 -14
  185. package/plugins/plugins/cesium-core/dist/components/draw/handlers/RectangleDrawer.d.ts +0 -13
  186. package/plugins/plugins/cesium-core/dist/components/draw/types.d.ts +0 -29
  187. package/plugins/plugins/cesium-core/dist/components/entity/EntityLayer.d.ts +0 -65
  188. package/plugins/plugins/cesium-core/dist/components/gltf/GLTFManage.d.ts +0 -141
  189. package/plugins/plugins/cesium-core/dist/components/gltf/index.d.ts +0 -1
  190. package/plugins/plugins/cesium-core/dist/components/measurement/MeasurementTool.d.ts +0 -34
  191. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/AreaMeasure.d.ts +0 -23
  192. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/CircleMeasure.d.ts +0 -21
  193. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/CoordinateMeasure.d.ts +0 -16
  194. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/HorizontalMeasure.d.ts +0 -25
  195. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/PolylineDistanceMeasure.d.ts +0 -24
  196. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/RectangleMeasure.d.ts +0 -22
  197. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/RegularPolygonMeasure.d.ts +0 -23
  198. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/SpaceMeasure.d.ts +0 -20
  199. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/TerrainHeightMeasure.d.ts +0 -18
  200. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/TriangleMeasure.d.ts +0 -24
  201. package/plugins/plugins/cesium-core/dist/components/measurement/handlers/VerticalMeasure.d.ts +0 -23
  202. package/plugins/plugins/cesium-core/dist/components/measurement/index.d.ts +0 -13
  203. package/plugins/plugins/cesium-core/dist/components/measurement/types.d.ts +0 -42
  204. package/plugins/plugins/cesium-core/dist/components/primitive/PrimitiveManager.d.ts +0 -50
  205. package/plugins/plugins/cesium-core/dist/components/roaming/CameraRoamTool.d.ts +0 -27
  206. package/plugins/plugins/cesium-core/dist/components/roaming/PathRoamTool.d.ts +0 -23
  207. package/plugins/plugins/cesium-core/dist/components/roaming/index.d.ts +0 -3
  208. package/plugins/plugins/cesium-core/dist/components/roaming/types.d.ts +0 -66
  209. package/plugins/plugins/cesium-core/dist/components/utils/convertGeoJsonToEntityData.d.ts +0 -1
  210. package/plugins/plugins/cesium-core/dist/components/utils/uuid.d.ts +0 -1
  211. package/plugins/plugins/cesium-core/dist/index.d.ts +0 -12
  212. package/plugins/plugins/cesium-core/package.json +0 -26
  213. package/plugins/plugins/cesium-core/pnpm-lock.yaml +0 -872
  214. package/plugins/plugins/cesium-core/src/components/BufferedHierarchicalAggregator.ts +0 -546
  215. package/plugins/plugins/cesium-core/src/components/HtmlOverlayLabelPool.ts +0 -489
  216. package/plugins/plugins/cesium-core/src/components/MarkerEvent.ts +0 -92
  217. package/plugins/plugins/cesium-core/src/components/Material/MaterialManager.ts +0 -129
  218. package/plugins/plugins/cesium-core/src/components/Material/help/PolylineFlowMaterialProperty.ts +0 -116
  219. package/plugins/plugins/cesium-core/src/components/Material/help/dynamicImgMaterial.ts +0 -236
  220. package/plugins/plugins/cesium-core/src/components/Material/index.ts +0 -3
  221. package/plugins/plugins/cesium-core/src/components/TooltipManager.ts +0 -52
  222. package/plugins/plugins/cesium-core/src/components/draw/DrawTool.ts +0 -55
  223. package/plugins/plugins/cesium-core/src/components/draw/handlers/CircleDrawer.ts +0 -159
  224. package/plugins/plugins/cesium-core/src/components/draw/handlers/LineDrawer.ts +0 -113
  225. package/plugins/plugins/cesium-core/src/components/draw/handlers/PointDrawer.ts +0 -70
  226. package/plugins/plugins/cesium-core/src/components/draw/handlers/PolygonDrawer.ts +0 -112
  227. package/plugins/plugins/cesium-core/src/components/draw/handlers/RectangleDrawer.ts +0 -115
  228. package/plugins/plugins/cesium-core/src/components/draw/types.ts +0 -28
  229. package/plugins/plugins/cesium-core/src/components/entity/EntityLayer.ts +0 -453
  230. package/plugins/plugins/cesium-core/src/components/gltf/GLTFManage.ts +0 -799
  231. package/plugins/plugins/cesium-core/src/components/gltf/index.ts +0 -1
  232. package/plugins/plugins/cesium-core/src/components/measurement/MeasurementTool.ts +0 -416
  233. package/plugins/plugins/cesium-core/src/components/measurement/handlers/AreaMeasure.ts +0 -451
  234. package/plugins/plugins/cesium-core/src/components/measurement/handlers/CircleMeasure.ts +0 -267
  235. package/plugins/plugins/cesium-core/src/components/measurement/handlers/CoordinateMeasure.ts +0 -139
  236. package/plugins/plugins/cesium-core/src/components/measurement/handlers/HorizontalMeasure.ts +0 -418
  237. package/plugins/plugins/cesium-core/src/components/measurement/handlers/PolylineDistanceMeasure.ts +0 -352
  238. package/plugins/plugins/cesium-core/src/components/measurement/handlers/RectangleMeasure.ts +0 -388
  239. package/plugins/plugins/cesium-core/src/components/measurement/handlers/RegularPolygonMeasure.ts +0 -379
  240. package/plugins/plugins/cesium-core/src/components/measurement/handlers/SpaceMeasure.ts +0 -246
  241. package/plugins/plugins/cesium-core/src/components/measurement/handlers/TerrainHeightMeasure.ts +0 -185
  242. package/plugins/plugins/cesium-core/src/components/measurement/handlers/TriangleMeasure.ts +0 -541
  243. package/plugins/plugins/cesium-core/src/components/measurement/handlers/VerticalMeasure.ts +0 -360
  244. package/plugins/plugins/cesium-core/src/components/measurement/index.ts +0 -13
  245. package/plugins/plugins/cesium-core/src/components/measurement/types.ts +0 -57
  246. package/plugins/plugins/cesium-core/src/components/primitive/PrimitiveManager.ts +0 -556
  247. package/plugins/plugins/cesium-core/src/components/roaming/CameraRoamTool.ts +0 -286
  248. package/plugins/plugins/cesium-core/src/components/roaming/PathRoamTool.ts +0 -174
  249. package/plugins/plugins/cesium-core/src/components/roaming/index.ts +0 -3
  250. package/plugins/plugins/cesium-core/src/components/roaming/types.ts +0 -71
  251. package/plugins/plugins/cesium-core/src/components/utils/convertGeoJsonToEntityData.ts +0 -98
  252. package/plugins/plugins/cesium-core/src/components/utils/uuid.ts +0 -7
  253. package/plugins/plugins/cesium-core/src/index.ts +0 -17
  254. package/plugins/plugins/cesium-core/src/test/measurement/index.html +0 -166
  255. package/plugins/plugins/cesium-core/src/test/roaming/c.gltf +0 -1
  256. package/plugins/plugins/cesium-core/src/test/roaming/f87cc3ea918a4b76bff2c88a3655eb1f.bin +0 -0
  257. package/plugins/plugins/cesium-core/src/test/roaming/index.html +0 -51
  258. package/plugins/plugins/cesium-core/src/test/roaming/path.html +0 -448
  259. package/plugins/plugins/cesium-core/src/test/roaming/view.html +0 -520
  260. package/plugins/plugins/cesium-core/stats.html +0 -4949
  261. package/plugins/plugins/cesium-core/tsconfig.json +0 -14
  262. package/plugins/plugins/cesium-core/vite.config.ts +0 -35
  263. package/plugins/plugins/cesium-vue/dist/components/basic-audio/index.d.ts +0 -18
  264. package/plugins/plugins/cesium-vue/dist/components/basic-audio/index.d.ts.map +0 -1
  265. package/plugins/plugins/cesium-vue/dist/components/basic-video/index.d.ts +0 -92
  266. package/plugins/plugins/cesium-vue/dist/components/basic-video/index.d.ts.map +0 -1
  267. package/plugins/plugins/cesium-vue/dist/components/camera-roam/index.d.ts +0 -82
  268. package/plugins/plugins/cesium-vue/dist/components/camera-roam/index.d.ts.map +0 -1
  269. package/plugins/plugins/cesium-vue/dist/components/card-carousel/index.d.ts +0 -152
  270. package/plugins/plugins/cesium-vue/dist/components/card-carousel/index.d.ts.map +0 -1
  271. package/plugins/plugins/cesium-vue/dist/components/card-content/index.d.ts +0 -21
  272. package/plugins/plugins/cesium-vue/dist/components/card-content/index.d.ts.map +0 -1
  273. package/plugins/plugins/cesium-vue/dist/components/card-page/index.d.ts +0 -69
  274. package/plugins/plugins/cesium-vue/dist/components/card-page/index.d.ts.map +0 -1
  275. package/plugins/plugins/cesium-vue/dist/components/carousel-img/index.d.ts +0 -21
  276. package/plugins/plugins/cesium-vue/dist/components/carousel-img/index.d.ts.map +0 -1
  277. package/plugins/plugins/cesium-vue/dist/components/echarts-pro/index.d.ts +0 -68
  278. package/plugins/plugins/cesium-vue/dist/components/echarts-pro/index.d.ts.map +0 -1
  279. package/plugins/plugins/cesium-vue/dist/components/marker-bubble/index.d.ts +0 -78
  280. package/plugins/plugins/cesium-vue/dist/components/marker-bubble/index.d.ts.map +0 -1
  281. package/plugins/plugins/cesium-vue/dist/components/marker-default/index.d.ts +0 -48
  282. package/plugins/plugins/cesium-vue/dist/components/marker-default/index.d.ts.map +0 -1
  283. package/plugins/plugins/cesium-vue/dist/components/marker-html/index.d.ts +0 -48
  284. package/plugins/plugins/cesium-vue/dist/components/marker-html/index.d.ts.map +0 -1
  285. package/plugins/plugins/cesium-vue/dist/components/marker-manage/index.d.ts +0 -164
  286. package/plugins/plugins/cesium-vue/dist/components/marker-manage/index.d.ts.map +0 -1
  287. package/plugins/plugins/cesium-vue/dist/components/marker-text/index.d.ts +0 -30
  288. package/plugins/plugins/cesium-vue/dist/components/marker-text/index.d.ts.map +0 -1
  289. package/plugins/plugins/cesium-vue/dist/components/measurement/index.d.ts +0 -78
  290. package/plugins/plugins/cesium-vue/dist/components/measurement/index.d.ts.map +0 -1
  291. package/plugins/plugins/cesium-vue/dist/components/path-roam/index.d.ts +0 -82
  292. package/plugins/plugins/cesium-vue/dist/components/path-roam/index.d.ts.map +0 -1
  293. package/plugins/plugins/cesium-vue/dist/components/test/index.d.ts +0 -67
  294. package/plugins/plugins/cesium-vue/dist/components/test/index.d.ts.map +0 -1
  295. package/plugins/plugins/cesium-vue/dist/index.css +0 -1
  296. package/plugins/plugins/cesium-vue/dist/index.d.ts +0 -30
  297. package/plugins/plugins/cesium-vue/dist/index.d.ts.map +0 -1
  298. package/plugins/plugins/cesium-vue/dist/index.js +0 -10087
  299. package/plugins/plugins/cesium-vue/dist/index.js.map +0 -1
  300. package/plugins/plugins/cesium-vue/dist/index.umd.cjs +0 -46
  301. package/plugins/plugins/cesium-vue/dist/index.umd.cjs.map +0 -1
  302. package/plugins/plugins/cesium-vue/package.json +0 -48
  303. package/plugins/plugins/cesium-vue/src/assets/icons/icon-001.png +0 -0
  304. package/plugins/plugins/cesium-vue/src/assets/icons/icon-002.png +0 -0
  305. package/plugins/plugins/cesium-vue/src/assets/icons/icon-003.png +0 -0
  306. package/plugins/plugins/cesium-vue/src/assets/icons/icon-004.png +0 -0
  307. package/plugins/plugins/cesium-vue/src/assets/icons/icon-005.png +0 -0
  308. package/plugins/plugins/cesium-vue/src/assets/icons/icon-006.png +0 -0
  309. package/plugins/plugins/cesium-vue/src/assets/icons/icon-007.png +0 -0
  310. package/plugins/plugins/cesium-vue/src/assets/icons/icon-008.png +0 -0
  311. package/plugins/plugins/cesium-vue/src/assets/icons/icon-009.png +0 -0
  312. package/plugins/plugins/cesium-vue/src/assets/icons/icon-010.png +0 -0
  313. package/plugins/plugins/cesium-vue/src/assets/icons/icon-011.png +0 -0
  314. package/plugins/plugins/cesium-vue/src/assets/icons/icon-012.png +0 -0
  315. package/plugins/plugins/cesium-vue/src/assets/img/Card3-BG.png +0 -0
  316. package/plugins/plugins/cesium-vue/src/assets/img/card_bg3.png +0 -0
  317. package/plugins/plugins/cesium-vue/src/components/basic-audio/index.ts +0 -11
  318. package/plugins/plugins/cesium-vue/src/components/basic-audio/src/BasicAudio.vue +0 -110
  319. package/plugins/plugins/cesium-vue/src/components/basic-audio/src/basicAudio.ts +0 -6
  320. package/plugins/plugins/cesium-vue/src/components/basic-video/index.ts +0 -12
  321. package/plugins/plugins/cesium-vue/src/components/basic-video/src/BasicVideo.vue +0 -99
  322. package/plugins/plugins/cesium-vue/src/components/basic-video/src/basicVideo.ts +0 -13
  323. package/plugins/plugins/cesium-vue/src/components/camera-roam/index.ts +0 -4
  324. package/plugins/plugins/cesium-vue/src/components/camera-roam/src/CameraRoam.vue +0 -434
  325. package/plugins/plugins/cesium-vue/src/components/camera-roam/src/cameraRoam.ts +0 -28
  326. package/plugins/plugins/cesium-vue/src/components/card-carousel/index.ts +0 -12
  327. package/plugins/plugins/cesium-vue/src/components/card-carousel/src/CardCarousel.vue +0 -124
  328. package/plugins/plugins/cesium-vue/src/components/card-carousel/src/cardCarousel.ts +0 -60
  329. package/plugins/plugins/cesium-vue/src/components/card-content/index.ts +0 -12
  330. package/plugins/plugins/cesium-vue/src/components/card-content/src/CardContent.vue +0 -41
  331. package/plugins/plugins/cesium-vue/src/components/card-content/src/cardContent.ts +0 -22
  332. package/plugins/plugins/cesium-vue/src/components/card-page/index.ts +0 -12
  333. package/plugins/plugins/cesium-vue/src/components/card-page/src/CardPage.vue +0 -102
  334. package/plugins/plugins/cesium-vue/src/components/card-page/src/cardPage.ts +0 -37
  335. package/plugins/plugins/cesium-vue/src/components/carousel-img/index.ts +0 -12
  336. package/plugins/plugins/cesium-vue/src/components/carousel-img/src/CarouselImg.vue +0 -15
  337. package/plugins/plugins/cesium-vue/src/components/carousel-img/src/carouselImg.ts +0 -6
  338. package/plugins/plugins/cesium-vue/src/components/echarts-pro/index.ts +0 -12
  339. package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/EchartsPro.vue +0 -107
  340. package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/echartsPro.ts +0 -12
  341. package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/hook/useECharts.ts +0 -55
  342. package/plugins/plugins/cesium-vue/src/components/marker-bubble/index.ts +0 -12
  343. package/plugins/plugins/cesium-vue/src/components/marker-bubble/src/MarkerBubble.vue +0 -235
  344. package/plugins/plugins/cesium-vue/src/components/marker-bubble/src/markerBubble.ts +0 -35
  345. package/plugins/plugins/cesium-vue/src/components/marker-default/index.ts +0 -12
  346. package/plugins/plugins/cesium-vue/src/components/marker-default/src/MarkerDefault.vue +0 -19
  347. package/plugins/plugins/cesium-vue/src/components/marker-default/src/markerDefault.ts +0 -12
  348. package/plugins/plugins/cesium-vue/src/components/marker-html/index.ts +0 -12
  349. package/plugins/plugins/cesium-vue/src/components/marker-html/src/MarkerHtml.vue +0 -21
  350. package/plugins/plugins/cesium-vue/src/components/marker-html/src/markerHtml.ts +0 -12
  351. package/plugins/plugins/cesium-vue/src/components/marker-manage/index.ts +0 -14
  352. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/components/MarkerManage.vue +0 -106
  353. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/config/theme.ts +0 -8
  354. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManage.ts +0 -466
  355. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManagerCore.ts +0 -148
  356. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/hook/useMarkerManage.ts +0 -45
  357. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/type/markerManage.ts +0 -75
  358. package/plugins/plugins/cesium-vue/src/components/marker-manage/src/utils/themeTool.ts +0 -154
  359. package/plugins/plugins/cesium-vue/src/components/marker-text/index.ts +0 -12
  360. package/plugins/plugins/cesium-vue/src/components/marker-text/src/MarkerText.vue +0 -14
  361. package/plugins/plugins/cesium-vue/src/components/marker-text/src/markerText.ts +0 -10
  362. package/plugins/plugins/cesium-vue/src/components/measurement/index.ts +0 -12
  363. package/plugins/plugins/cesium-vue/src/components/measurement/src/Measurement.vue +0 -183
  364. package/plugins/plugins/cesium-vue/src/components/measurement/src/measurement.ts +0 -20
  365. package/plugins/plugins/cesium-vue/src/components/path-roam/index.ts +0 -4
  366. package/plugins/plugins/cesium-vue/src/components/path-roam/src/PathRoam.vue +0 -429
  367. package/plugins/plugins/cesium-vue/src/components/path-roam/src/pathRoam.ts +0 -28
  368. package/plugins/plugins/cesium-vue/src/components/test/CardMarker.vue +0 -150
  369. package/plugins/plugins/cesium-vue/src/components/test/CesiumMarker.vue +0 -34
  370. package/plugins/plugins/cesium-vue/src/components/test/CesiumViewer.vue +0 -77
  371. package/plugins/plugins/cesium-vue/src/components/test/MyLabel.vue +0 -25
  372. package/plugins/plugins/cesium-vue/src/components/test/index.ts +0 -28
  373. package/plugins/plugins/cesium-vue/src/index.ts +0 -83
  374. package/plugins/plugins/cesium-vue/stats.html +0 -4949
  375. package/plugins/plugins/cesium-vue/tsconfig.json +0 -18
  376. package/plugins/plugins/cesium-vue/vite.config.ts +0 -56
  377. package/plugins/plugins/theme-chalk/dist/theme-chalk.css +0 -819
  378. package/plugins/plugins/theme-chalk/index.less +0 -11
  379. package/plugins/plugins/theme-chalk/package.json +0 -27
  380. package/plugins/plugins/theme-chalk/src/basicAudio.less +0 -41
  381. package/plugins/plugins/theme-chalk/src/basicVideo.less +0 -17
  382. package/plugins/plugins/theme-chalk/src/cameraRoam.less +0 -239
  383. package/plugins/plugins/theme-chalk/src/cardCarousel.less +0 -71
  384. package/plugins/plugins/theme-chalk/src/cardContent.less +0 -73
  385. package/plugins/plugins/theme-chalk/src/cardPage.less +0 -61
  386. package/plugins/plugins/theme-chalk/src/carouselImg.less +0 -34
  387. package/plugins/plugins/theme-chalk/src/marker.less +0 -107
  388. package/plugins/plugins/theme-chalk/src/markerManage.less +0 -25
  389. package/plugins/plugins/theme-chalk/src/measurement.less +0 -106
  390. package/plugins/plugins/theme-chalk/src/mixins/config.less +0 -4
  391. package/plugins/plugins/theme-chalk/src/mixins/mixins.less +0 -64
  392. package/plugins/plugins/theme-chalk/src/pathRoam.less +0 -198
  393. package/plugins/plugins/utils/create.ts +0 -45
  394. package/plugins/plugins/utils/package.json +0 -12
  395. package/plugins/plugins/utils/uuid.ts +0 -43
  396. package/plugins/plugins/utils/with-install.ts +0 -10
  397. package/plugins/theme-chalk/index.less +0 -11
  398. package/plugins/theme-chalk/src/basicAudio.less +0 -44
  399. package/plugins/theme-chalk/src/basicVideo.less +0 -17
  400. package/plugins/theme-chalk/src/cameraRoam.less +0 -239
  401. package/plugins/theme-chalk/src/cardCarousel.less +0 -71
  402. package/plugins/theme-chalk/src/cardContent.less +0 -73
  403. package/plugins/theme-chalk/src/cardPage.less +0 -61
  404. package/plugins/theme-chalk/src/carouselImg.less +0 -66
  405. package/plugins/theme-chalk/src/marker.less +0 -107
  406. package/plugins/theme-chalk/src/markerManage.less +0 -25
  407. package/plugins/theme-chalk/src/measurement.less +0 -106
  408. package/plugins/theme-chalk/src/mixins/config.less +0 -4
  409. package/plugins/theme-chalk/src/mixins/mixins.less +0 -64
  410. package/plugins/theme-chalk/src/pathRoam.less +0 -198
@@ -1,556 +0,0 @@
1
- import { EntityLayerManager } from '../entity/EntityLayer';
2
- import { MaterialManager } from '../Material/MaterialManager';
3
- import { cloneDeep } from 'lodash-es';
4
- export class PrimitiveManager {
5
- private Cesium: any;
6
- private viewer: any; // Cesium.Viewer
7
- private layerMap: Map<string, Map<string, any>>;
8
- private hideLayerMap: Map<string, Set<string>>;
9
- entityLayerManager: EntityLayerManager;
10
- private PrimitiveThemeMap: Map<
11
- string,
12
- {
13
- Primitive: any;
14
- ids: Map<string, any>;
15
- geometryInstances: Map<string, any>;
16
- appearance: any;
17
- }
18
- >; // theme -> 合并后的 Primitive 和图元 ID 的映射
19
- materialManager: MaterialManager;
20
-
21
- constructor(options: {
22
- Cesium: any;
23
- viewer: any;
24
- materialManager: MaterialManager;
25
- entityLayerManager: EntityLayerManager;
26
- }) {
27
- let { Cesium, viewer, materialManager, entityLayerManager } = options;
28
- this.Cesium = Cesium;
29
- this.viewer = viewer;
30
- this.layerMap = new Map();
31
- this.PrimitiveThemeMap = new Map(); // 存储 theme -> { Primitive, ids, geometryInstances }
32
- this.hideLayerMap = new Map();
33
- this.materialManager = materialManager;
34
- this.entityLayerManager = entityLayerManager;
35
- }
36
-
37
- //创建图元
38
- private createGeometryInstance(item: any): any {
39
- let geometryInstance: any;
40
- if (item.category === 'polyline' && item.positions) {
41
- geometryInstance = this.createPolyline(item);
42
- } else if (item.category === 'polygon' && item.hierarchy) {
43
- geometryInstance = this.createPolygon(item);
44
- }
45
- return geometryInstance;
46
- }
47
-
48
- // 创建或获取 材质图元组
49
- private carateThemePrimitive(_item: any) {
50
- let item = cloneDeep(_item);
51
- let themePrimitive = this.PrimitiveThemeMap.get(item.theme);
52
- if (!themePrimitive) {
53
- this.initTheme(item);
54
- // 如果没有,则初始化一个新的 entry
55
- let appearance = this.createAppearance(item);
56
- themePrimitive = {
57
- Primitive: null,
58
- ids: new Map(),
59
- appearance: appearance,
60
- geometryInstances: new Map(),
61
- };
62
- this.PrimitiveThemeMap.set(item.theme, themePrimitive);
63
- }
64
- return themePrimitive;
65
- }
66
-
67
- //注册主题
68
- initTheme(item: any) {
69
- let materialManager = this.materialManager;
70
- let Cesium = this.Cesium;
71
- if (item.category == 'polyline') {
72
- const isDashed =
73
- item.properties?.lineType?.pattern && item.properties?.lineType?.patternLength;
74
- let lineMaterialKey = '';
75
- if (isDashed) {
76
- const dashPattern = item.properties?.lineType?.pattern || [0.25, -0.125];
77
- const dashLength = item.properties?.lineType?.patternLength || 0.375;
78
- let cesiumDash = this.convertCadPatternToCesiumDash(dashPattern, dashLength);
79
- lineMaterialKey = `DashedLineMaterial_pattern_${cesiumDash.dashPattern}_dashLength_${cesiumDash.dashLength}_color_${item.properties?.color}`;
80
- if (!materialManager.has(lineMaterialKey)) {
81
- materialManager.register({
82
- themeKey: lineMaterialKey,
83
- material: Cesium.Material.fromType('PolylineDash', {
84
- color: Cesium.Color.fromCssColorString(item.properties.color || '#FFFFFF').withAlpha(
85
- 0.8,
86
- ),
87
- dashLength: cesiumDash.dashLength, // ← 注意,这里填总长度
88
- dashPattern: cesiumDash.dashPattern, // ← 这里才是 16-bit 掩码
89
- }),
90
- });
91
- }
92
- } else {
93
- lineMaterialKey = `LineMaterial_color_${item.properties?.color}`;
94
- if (!materialManager.has(lineMaterialKey)) {
95
- materialManager.register({
96
- themeKey: lineMaterialKey,
97
- material: Cesium.Material.fromType('Color', {
98
- color: Cesium.Color.fromCssColorString(item.properties.color || '#FFFFFF').withAlpha(
99
- 0.8,
100
- ),
101
- }),
102
- });
103
- }
104
- }
105
- } else if (item.category == 'polygon') {
106
- let polygonMaterialKey = `polygonMaterial_color_${item.properties?.color}`;
107
- if (!materialManager.has(polygonMaterialKey)) {
108
- materialManager.register({
109
- themeKey: polygonMaterialKey,
110
- material: Cesium.Material.fromType('Color', {
111
- color: Cesium.Color.fromCssColorString(item.properties?.color || '#FFFFFF').withAlpha(
112
- 0.8,
113
- ),
114
- }),
115
- });
116
- }
117
- }
118
- }
119
-
120
- convertCadPatternToCesiumDash(pattern: Array<number>, patternLength: number) {
121
- const segmentCount = 16;
122
- const unitLength = patternLength / segmentCount;
123
-
124
- // 第一步:先用 floor 分配位数,统计已经分配的位数
125
- let dashBits = [] as Array<number>;
126
- let assigned = 0;
127
- for (let len of pattern) {
128
- const count = Math.floor(Math.abs(len) / unitLength);
129
- const bit = len >= 0 ? 1 : 0;
130
- for (let i = 0; i < count; i++) {
131
- dashBits.push(bit);
132
- assigned++;
133
- if (assigned >= segmentCount) break;
134
- }
135
- if (assigned >= segmentCount) break;
136
- }
137
-
138
- // 如果分配不到 16 位,用 “空” 填满;如果多了,则截断
139
- while (dashBits.length < segmentCount) {
140
- dashBits.push(0);
141
- }
142
- if (dashBits.length > segmentCount) {
143
- dashBits.length = segmentCount;
144
- }
145
-
146
- // 第二步:把 16 位数组变成一个整数
147
- let dashPattern = 0;
148
- for (let i = 0; i < segmentCount; i++) {
149
- dashPattern = (dashPattern << 1) | dashBits[i];
150
- }
151
-
152
- return {
153
- dashPattern: dashPattern,
154
- dashLength: patternLength,
155
- };
156
- }
157
-
158
- // 创建或更新图层并添加几何体
159
- public async processBatch(data: Array<{ layerId: string; dataList: any[] }>): Promise<void> {
160
- const materialThemes = new Map(); // 用于记录所有出现的材质 theme
161
- data.forEach((item) => {
162
- let { layerId, dataList } = item;
163
- let batch = cloneDeep(dataList);
164
- batch.forEach((item) => {
165
- let geometryInstance = this.createGeometryInstance(item);
166
-
167
- if (geometryInstance) {
168
- // 检查是否已有相同 theme 的 Primitive
169
- let themePrimitive = this.carateThemePrimitive(item);
170
-
171
- // 将当前 item 的 id 添加到 themePrimitive.ids 中
172
- themePrimitive.ids.set(item.id, item);
173
- themePrimitive.geometryInstances.set(item.id, geometryInstance); // 添加到几何实例集合中
174
-
175
- const layer = this.layerMap.get(layerId);
176
- if (layer) {
177
- layer.set(item.id, item);
178
- } else {
179
- let map = new Map();
180
- this.layerMap.set(layerId, map);
181
- map.set(item.id, item);
182
- }
183
-
184
- // 记录 materialTheme
185
- materialThemes.set(item.theme, item);
186
- }
187
- });
188
- });
189
- // 循环结束后,统一调用 updatePrimitive
190
- materialThemes.forEach((item) => {
191
- this.updatePrimitive(item);
192
- });
193
- }
194
-
195
- // 创建折线几何体(不再获取材质)
196
- private createPolyline(item: any): any {
197
- const positions = Array.isArray(item.positions[0]) ? item.positions.flat() : item.positions;
198
- return new this.Cesium.GeometryInstance({
199
- id: item.id,
200
- geometry: new this.Cesium.GroundPolylineGeometry({
201
- positions: this.Cesium.Cartesian3.fromDegreesArrayHeights(positions),
202
- // width: 10,
203
- width: Math.max(item.width || 2, 2),
204
- }),
205
- });
206
- }
207
-
208
- // 创建多边形几何体(不再获取材质)
209
- private createPolygon(item: any): any {
210
- const outerRing = Array.isArray(item.hierarchy[0]) ? item.hierarchy.flat() : item.hierarchy;
211
- const outerCartesian = this.Cesium.Cartesian3.fromDegreesArrayHeights(outerRing);
212
- const holes =
213
- item.holes?.map((hole: any) => {
214
- let _hole = Array.isArray(hole[0]) ? hole.flat() : hole;
215
- let _holeDegrees = this.Cesium.Cartesian3.fromDegreesArrayHeights(_hole.flat());
216
- return new this.Cesium.PolygonHierarchy(_holeDegrees);
217
- }) || [];
218
-
219
- const polygonHierarchy = new this.Cesium.PolygonHierarchy(outerCartesian, holes);
220
-
221
- return new this.Cesium.GeometryInstance({
222
- id: item.id,
223
- geometry: new this.Cesium.PolygonGeometry({
224
- polygonHierarchy: polygonHierarchy,
225
- }),
226
- });
227
- }
228
-
229
- // 获取材质(在 updatePrimitive 中处理)
230
- private getMaterial(item: any): any {
231
- let material = this.materialManager.get({
232
- themeKey: item.theme,
233
- options: item,
234
- });
235
-
236
- if (!material) {
237
- material = this.Cesium.Material.fromType('Color', {
238
- color: new this.Cesium.Color(1.0, 0.0, 0.0, 1.0), // 默认红色
239
- });
240
- }
241
-
242
- return material;
243
- }
244
-
245
- // 更新图元
246
- public updateGeometryInstance(_item: any): void {
247
- let item = cloneDeep(_item);
248
-
249
- const layer = this.layerMap.get(item.layerId);
250
- if (!layer) {
251
- console.warn(`没有找到图层 ${item.layerId}`);
252
- return;
253
- }
254
-
255
- let geometryInstanceInfo = layer.get(item.id);
256
- layer.set(item.id, item);
257
- if (!geometryInstanceInfo) {
258
- console.warn(`没有找到图元 ${item.id} 在图层 ${item.layerId} 中`);
259
- return;
260
- }
261
- if (geometryInstanceInfo.theme !== item.theme) {
262
- //更新旧的主题
263
- let oldThemePrimitive = this.PrimitiveThemeMap.get(geometryInstanceInfo.theme);
264
- oldThemePrimitive?.geometryInstances.delete(item.id);
265
- oldThemePrimitive?.ids.delete(item.id);
266
- this.updatePrimitive(geometryInstanceInfo);
267
- }
268
- //更新新的主题
269
- let themePrimitive = this.carateThemePrimitive(item);
270
- if (themePrimitive) {
271
- const geometryInstance = this.createGeometryInstance(item);
272
- themePrimitive.geometryInstances.set(item.id, geometryInstance);
273
- themePrimitive.ids.set(item.id, item);
274
- // 调用更新图元的方法
275
- this.updatePrimitive(item);
276
- }
277
- }
278
-
279
- // 删除图元
280
- public deleteGeometryInstance(data: Array<{ layerId: string; ids: string[] }>): void {
281
- let themeMap = new Set();
282
- data.forEach((item) => {
283
- let { layerId, ids } = item;
284
- const layer = this.layerMap.get(layerId);
285
- if (!layer) {
286
- console.warn(`没有找到图层 ${layerId}`);
287
- return;
288
- }
289
- ids.forEach((id) => {
290
- let geometryInstanceInfo = layer.get(id);
291
-
292
- if (!geometryInstanceInfo) {
293
- console.warn(`没有找到图元 ${id} 在图层 ${layerId} 中`);
294
- return;
295
- }
296
-
297
- //更新新的主题
298
- let themePrimitive = this.PrimitiveThemeMap.get(geometryInstanceInfo.theme);
299
- if (themePrimitive) {
300
- themePrimitive.geometryInstances.delete(geometryInstanceInfo.id);
301
- themePrimitive.ids.delete(geometryInstanceInfo.id);
302
- // 调用更新图元的方法
303
- themeMap.add(geometryInstanceInfo);
304
- }
305
- });
306
- });
307
- Array.from(themeMap.values()).forEach((item) => {
308
- this.updatePrimitive(item);
309
- });
310
- }
311
- // 添加图元
312
- public addGeometryInstance(_item: any): void {
313
- let item = cloneDeep(_item);
314
-
315
- const layer = this.layerMap.get(item.layerId);
316
- if (!layer) {
317
- console.warn(`没有找到图层 ${item.layerId}`);
318
- return;
319
- }
320
-
321
- let geometryInstanceInfo = layer.get(item.id);
322
-
323
- if (geometryInstanceInfo) {
324
- console.warn(`图元 ${item.id} 已经存在图层 ${item.layerId} 中`);
325
- return;
326
- }
327
- layer.set(item.id, item);
328
- //更新新的主题
329
- let themePrimitive = this.carateThemePrimitive(item);
330
- if (themePrimitive) {
331
- const geometryInstance = this.createGeometryInstance(item);
332
- themePrimitive.geometryInstances.set(item.id, geometryInstance);
333
- themePrimitive.ids.set(item.id, item);
334
- // 调用更新图元的方法
335
- this.updatePrimitive(item);
336
- }
337
- }
338
-
339
- // 创建外观
340
- private createAppearance(item: any) {
341
- let material = this.getMaterial({ theme: item.theme });
342
- let appearance;
343
- if (item.category === 'polyline') {
344
- appearance = new this.Cesium.PolylineMaterialAppearance({
345
- material: material, // 传入材质
346
- translucent: true,
347
- });
348
- } else if (item.category === 'polygon') {
349
- appearance = new this.Cesium.MaterialAppearance({
350
- material: material,
351
- translucent: true,
352
- });
353
- }
354
- return appearance;
355
- }
356
-
357
- // 根据 theme 更新对应的 Primitive
358
- private updatePrimitive(item: any): void {
359
- const themePrimitive = this.PrimitiveThemeMap.get(item.theme);
360
- if (!themePrimitive) {
361
- return;
362
- }
363
-
364
- // 如果当前没有创建 Primitive,则创建新的
365
- if (themePrimitive.Primitive) {
366
- this.viewer.scene.primitives.remove(themePrimitive.Primitive);
367
- themePrimitive.Primitive = null;
368
- }
369
- // 更新已存在的 Primitive
370
- let arrayFromMap = Array.from(themePrimitive.geometryInstances, ([key, value]) => ({
371
- key,
372
- value,
373
- }));
374
- // let layer = this.hideLayerMap.get(item.layerId);
375
- let geometryInstances = arrayFromMap
376
- .filter((n) => {
377
- return !Array.from(this.hideLayerMap.values()).some((layer) => layer.has(n.key));
378
- })
379
- .map((n) => {
380
- return n.value;
381
- });
382
- if (geometryInstances.length <= 0) return;
383
- if (item.category === 'polyline') {
384
- themePrimitive.Primitive = new this.Cesium.GroundPolylinePrimitive({
385
- geometryInstances: geometryInstances, // 使用所有的 GeometryInstance
386
- appearance: themePrimitive.appearance,
387
- });
388
- this.viewer.scene.primitives.add(themePrimitive.Primitive); // 添加到场景
389
- } else {
390
- themePrimitive.Primitive = new this.Cesium.GroundPrimitive({
391
- geometryInstances: geometryInstances, // 使用所有的 GeometryInstance
392
- appearance: themePrimitive.appearance,
393
- });
394
-
395
- this.viewer.scene.primitives.add(themePrimitive.Primitive); // 添加到场景
396
- }
397
- }
398
-
399
- //隐藏
400
- public hideByLayerAndId(data: Array<{ layerId: string; ids: string[] }>) {
401
- let themeMap = new Map();
402
-
403
- data.forEach((item) => {
404
- let { layerId, ids } = item;
405
- let layer = this.hideLayerMap.get(layerId);
406
- if (!layer) {
407
- layer = new Set();
408
- this.hideLayerMap.set(layerId, layer);
409
- }
410
- ids.forEach((value) => {
411
- layer.add(value);
412
- let info = this.getGeometryInstanceInfo(layerId, value);
413
- if (info) themeMap.set(info.theme, info);
414
- });
415
- });
416
- Array.from(themeMap.values()).forEach((item) => {
417
- this.updatePrimitive(item);
418
- });
419
- }
420
-
421
- //显示
422
- public showByLayerAndId(data: Array<{ layerId: string; ids: string[] }>) {
423
- let themeMap = new Map();
424
- data.forEach((item) => {
425
- let { layerId, ids } = item;
426
- let layer = this.hideLayerMap.get(layerId);
427
- if (!layer) {
428
- layer = new Set();
429
- this.hideLayerMap.set(layerId, layer);
430
- }
431
- ids.forEach((value) => {
432
- layer.delete(value);
433
- let info = this.getGeometryInstanceInfo(layerId, value);
434
- if (info) themeMap.set(info.theme, info);
435
- });
436
- });
437
- Array.from(themeMap.values()).forEach((item) => {
438
- this.updatePrimitive(item);
439
- });
440
- }
441
-
442
- //查询是否存在图元
443
- public hasGeometryInstance(layerId: string, id: string) {
444
- // 获取图层
445
- const layer = this.layerMap.get(layerId);
446
- if (!layer) {
447
- return false;
448
- }
449
-
450
- // 获取图元
451
- const geometryInstanceInfo = layer.get(id);
452
- if (!geometryInstanceInfo) {
453
- return false;
454
- }
455
-
456
- let themePrimitive = this.PrimitiveThemeMap.get(geometryInstanceInfo.theme);
457
- if (!themePrimitive) {
458
- return false;
459
- }
460
- // 获取图元的几何体
461
- const geometryInstance = themePrimitive.geometryInstances.get(id);
462
- if (!geometryInstance) {
463
- return false;
464
- }
465
-
466
- return true;
467
- }
468
-
469
- //查询图元信息
470
- public getGeometryInstanceInfo(layerId: string, id: string) {
471
- // 获取图层
472
- const layer = this.layerMap.get(layerId);
473
- if (!layer) {
474
- return null;
475
- }
476
-
477
- // 获取图元
478
- const geometryInstanceInfo = layer.get(id);
479
- return geometryInstanceInfo;
480
- }
481
-
482
- public focusOnGeometryInstance(layerId: string, id: string): void {
483
- // 获取图层
484
- const layer = this.layerMap.get(layerId);
485
- if (!layer) {
486
- console.warn(`图层 ${layerId} 不存在`);
487
- return;
488
- }
489
-
490
- // 获取图元
491
- const geometryInstanceInfo = layer.get(id);
492
- if (!geometryInstanceInfo) {
493
- console.warn(`没有找到图元 ${id} 在图层 ${layerId} 中`);
494
- return;
495
- }
496
-
497
- let themePrimitive = this.PrimitiveThemeMap.get(geometryInstanceInfo.theme);
498
- if (!themePrimitive) {
499
- console.warn(`没有找到 ${id} 图元相关的Primitive`);
500
- return;
501
- }
502
- // 获取图元的几何体
503
- const geometryInstance = themePrimitive.geometryInstances.get(id);
504
- if (!geometryInstance) {
505
- console.warn(`没有找到图元的几何体 ${id}`);
506
- return;
507
- }
508
-
509
- const geometry = geometryInstance.geometry;
510
- const positions = geometry._positions || geometry._polygonHierarchy.positions;
511
-
512
- if (positions && positions.length > 0) {
513
- // 计算包围盒的最小和最大点
514
- let minX = positions[0].x,
515
- minY = positions[0].y,
516
- minZ = positions[0].z;
517
- let maxX = positions[0].x,
518
- maxY = positions[0].y,
519
- maxZ = positions[0].z;
520
-
521
- positions.forEach((position: any) => {
522
- minX = Math.min(minX, position.x);
523
- minY = Math.min(minY, position.y);
524
- minZ = Math.min(minZ, position.z);
525
-
526
- maxX = Math.max(maxX, position.x);
527
- maxY = Math.max(maxY, position.y);
528
- maxZ = Math.max(maxZ, position.z);
529
- });
530
-
531
- // 计算包围盒的中心和尺寸
532
- const center = new this.Cesium.Cartesian3(
533
- (minX + maxX) / 2,
534
- (minY + maxY) / 2,
535
- (minZ + maxZ) / 2,
536
- );
537
- const dimensions = new this.Cesium.Cartesian3(maxX - minX, maxY - minY, maxZ - minZ);
538
-
539
- // 计算偏移量(使用包围盒的高度作为偏移)
540
- const height = dimensions.z; // 高度对应 Z 轴
541
- const offsetHeight = Math.abs(height || 1) * 1.5; // 使用包围盒高度的 1.5 倍作为偏移量
542
-
543
- // 使用摄像机平滑定位到包围盒中心
544
- this.viewer.camera.flyTo({
545
- destination: center,
546
- duration: 2, // 平滑移动的持续时间(秒)
547
- complete: () => {
548
- console.log(`已定位到图元 ${id}`);
549
- },
550
- offset: new this.Cesium.Cartesian3(0, 0, offsetHeight), // 使用动态计算的偏移高度
551
- });
552
- } else {
553
- console.warn(`无法获取图元 ${id} 的顶点信息`);
554
- }
555
- }
556
- }