@metagl/sdk-plotting 0.0.1 → 0.0.3

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 (486) hide show
  1. package/README.md +267 -86
  2. package/lacdt.plotting.d.ts +30265 -0
  3. package/lacdt.plotting.js +474 -0
  4. package/package.json +14 -12
  5. package/resources/image/Height.png +0 -0
  6. package/resources/image/JPlace/capital.png +0 -0
  7. package/resources/image/JPlace/chengzhen.png +0 -0
  8. package/resources/image/JPlace/shenghui.png +0 -0
  9. package/resources/image/Move.png +0 -0
  10. package/resources/image/Scale.png +0 -0
  11. package/resources/image/arrow-down.png +0 -0
  12. package/resources/image/arrow-left.png +0 -0
  13. package/resources/image/arrow-right.png +0 -0
  14. package/resources/image/arrow-up.png +0 -0
  15. package/resources/image/arrow.png +0 -0
  16. package/resources/image/cm_gray.png +0 -0
  17. package/resources/image/cm_viridis.png +0 -0
  18. package/resources/image/excavate_bottom_min.jpg +0 -0
  19. package/resources/image/excavate_side_min.jpg +0 -0
  20. package/resources/image/eye.png +0 -0
  21. package/resources/image/facility.gif +0 -0
  22. package/resources/image/fire.png +0 -0
  23. package/resources/image/fountain2.png +0 -0
  24. package/resources/image/globe.jpg +0 -0
  25. package/resources/image/gpoint.svg +1 -0
  26. package/resources/image/redflag.png +0 -0
  27. package/resources/image/smoke.png +0 -0
  28. package/resources/image/tuodong.png +0 -0
  29. package/resources/image//346/227/213/350/275/254.png +0 -0
  30. package/resources/images/circular_particle.png +0 -0
  31. package/resources/images/cloud.png +0 -0
  32. package/resources/images/dash.png +0 -0
  33. package/resources/images/daylight/Daylight_Box_Back.jpg +0 -0
  34. package/resources/images/daylight/Daylight_Box_Bottom.jpg +0 -0
  35. package/resources/images/daylight/Daylight_Box_Front.jpg +0 -0
  36. package/resources/images/daylight/Daylight_Box_Left.jpg +0 -0
  37. package/resources/images/daylight/Daylight_Box_Right.jpg +0 -0
  38. package/resources/images/daylight/Daylight_Box_Top.jpg +0 -0
  39. package/resources/images/daylight/Daylight_Box_mx.jpg +0 -0
  40. package/resources/images/daylight/Daylight_Box_my.jpg +0 -0
  41. package/resources/images/daylight/Daylight_Box_mz.jpg +0 -0
  42. package/resources/images/daylight/Daylight_Box_px.jpg +0 -0
  43. package/resources/images/daylight/Daylight_Box_py.jpg +0 -0
  44. package/resources/images/daylight/Daylight_Box_pz.jpg +0 -0
  45. package/resources/images/earthclouds1k.jpg +0 -0
  46. package/resources/images/earthclouds1k.png +0 -0
  47. package/resources/images/night_1-2k.jpg +0 -0
  48. package/resources/images/scan.png +0 -0
  49. package/resources/images/smoke.png +0 -0
  50. package/resources/images/specialLine/ArrowOpacity.png +0 -0
  51. package/resources/images/specialLine/ArrowTransparent.png +0 -0
  52. package/resources/images/specialLine/DataTransLine.png +0 -0
  53. package/resources/images/specialLine/DotTransparent.png +0 -0
  54. package/resources/images/specialLine/LinkPulse.png +0 -0
  55. package/resources/images/specialLine/LinkTrail.png +0 -0
  56. package/resources/images/specialLine/Trail.png +0 -0
  57. package/resources/images/specialLine/Trail1.png +0 -0
  58. package/resources/images/specialLine/alpha.png +0 -0
  59. package/resources/images/starmap/starmap_2020_16k_mx.webp +0 -0
  60. package/resources/images/starmap/starmap_2020_16k_my.webp +0 -0
  61. package/resources/images/starmap/starmap_2020_16k_mz.webp +0 -0
  62. package/resources/images/starmap/starmap_2020_16k_px.webp +0 -0
  63. package/resources/images/starmap/starmap_2020_16k_py.webp +0 -0
  64. package/resources/images/starmap/starmap_2020_16k_pz.webp +0 -0
  65. package/resources/images/wx.png +0 -0
  66. package/resources/images/wx2.jpg +0 -0
  67. package/resources/readme.txt +1 -0
  68. package/resources/textures/grey.png +0 -0
  69. package/resources/textures/mesh.png +0 -0
  70. package/resources/textures/waterNormalsSmall.jpg +0 -0
  71. package/resources/thirdParty/html2canvas/0.5.0-beta4/html2canvas.js +3519 -0
  72. package/resources/thirdParty/html2canvas/0.5.0-beta4/html2canvas.min.js +8 -0
  73. package/resources/thirdParty/wangEditor/colorpicker.js +481 -0
  74. package/resources/thirdParty/wangEditor/wangEditor.js +50897 -0
  75. package/resources/thirdParty/wangEditor/wangeditor.css +945 -0
  76. package/resources/water/sea 50_1.json.json +578 -0
  77. package/resources/workers/satellite.worker.js +3175 -0
  78. package/types/Common/ArrayHelper.d.ts +8 -0
  79. package/types/Common/Guid.d.ts +4 -0
  80. package/types/Common/KeyValue.d.ts +5 -0
  81. package/types/Core/Common/Cesium/Core/xz_Color.d.ts +1545 -0
  82. package/types/Core/Common/Cesium/Core/xz_measureSize.d.ts +4 -0
  83. package/types/Core/Common/Cesium/Core/xz_writeTextToCanvas.d.ts +27 -0
  84. package/types/Core/Common/Cesium/ThirdParty/xz_measureText.d.ts +30 -0
  85. package/types/Core/Event.d.ts +72 -0
  86. package/types/Core/GvolLayer.d.ts +39 -0
  87. package/types/Core/GvolPoint.d.ts +206 -0
  88. package/types/Core/Music.d.ts +18 -0
  89. package/types/Core/Register.d.ts +36 -0
  90. package/types/Core/index.d.ts +46 -0
  91. package/types/Core/property-item-meta.d.ts +36 -0
  92. package/types/FixCesium/index.d.ts +0 -0
  93. package/types/Global/array.d.ts +21 -0
  94. package/types/Global/global.d.ts +9 -0
  95. package/types/Global/link.d.ts +32 -0
  96. package/types/Global/linq.d.ts +15 -0
  97. package/types/Global/math.d.ts +7 -0
  98. package/types/Global/number.d.ts +15 -0
  99. package/types/Global/object.d.ts +7 -0
  100. package/types/Global/regex.d.ts +6 -0
  101. package/types/Global/static.d.ts +6 -0
  102. package/types/Global/string.d.ts +14 -0
  103. package/types/LayerManager/DynamicLayer/DynamicLayer.d.ts +294 -0
  104. package/types/LayerManager/GpLayer/GpLayer.d.ts +56 -0
  105. package/types/LayerManager/GraphicLayer/GraphicLayer.d.ts +209 -0
  106. package/types/LayerManager/ImageLayer/BaiduImageryProvider.d.ts +33 -0
  107. package/types/LayerManager/LayerManager.d.ts +59 -0
  108. package/types/LayerManager/LayerTools.d.ts +3 -0
  109. package/types/LayerManager/MapBox/CesiumInstance.d.ts +78 -0
  110. package/types/LayerManager/MapBox/CesiumLayer.d.ts +54 -0
  111. package/types/LayerManager/MapBox/CesiumLayerOptions.d.ts +34 -0
  112. package/types/LayerManager/MapBox/MVTImageryProvider/mapboxVectorRender.d.ts +44 -0
  113. package/types/LayerManager/MapBox/MapboxPlaceName.d.ts +30 -0
  114. package/types/LayerManager/MapBox/index.d.ts +25 -0
  115. package/types/LayerManager/MapBox/shaders/colorscales.d.ts +123 -0
  116. package/types/LayerManager/MapBox/shaders/raster_frag.d.ts +2 -0
  117. package/types/LayerManager/MapBox/shaders/raster_rpg_frag.d.ts +2 -0
  118. package/types/LayerManager/MapBox/shaders/raster_rpg_vert.d.ts +2 -0
  119. package/types/LayerManager/MapBox/shaders/raster_vert.d.ts +2 -0
  120. package/types/LayerManager/MapBox/utils.d.ts +13 -0
  121. package/types/LayerManager/PlotLayer/PlotLayer.d.ts +77 -0
  122. package/types/LayerManager/SateLayer/Satellite.d.ts +98 -0
  123. package/types/LayerManager/SateLayer/SatelliteLayer.d.ts +46 -0
  124. package/types/LayerManager/SateLayer/SpaceDebris.d.ts +23 -0
  125. package/types/LayerManager/SateLayer/SpaceDebrisLayer.d.ts +40 -0
  126. package/types/LayerManager/TileLayer/TileLayer.d.ts +27 -0
  127. package/types/LayerManager/TileLayer/WMTSVectorProvider.d.ts +14 -0
  128. package/types/LayerManager/index.d.ts +21 -0
  129. package/types/Models/AnimationConfig.d.ts +29 -0
  130. package/types/Models/AnimationItem.d.ts +14 -0
  131. package/types/Models/FileNode.d.ts +24 -0
  132. package/types/Models/GeojsonPlotModel.d.ts +19 -0
  133. package/types/Models/GeojsonStyleBase.d.ts +104 -0
  134. package/types/Models/PlotItem.d.ts +17 -0
  135. package/types/Models/all.d.ts +268 -0
  136. package/types/PlottingTool/AnchorHelper.d.ts +50 -0
  137. package/types/PlottingTool/Animation/AnimationBase.d.ts +61 -0
  138. package/types/PlottingTool/Animation/AnimationGroup.d.ts +46 -0
  139. package/types/PlottingTool/Animation/AnimationManager.d.ts +72 -0
  140. package/types/PlottingTool/Animation/AnimationStartState.d.ts +5 -0
  141. package/types/PlottingTool/Animation/AnimationState.d.ts +5 -0
  142. package/types/PlottingTool/Animation/CalcTool.d.ts +6 -0
  143. package/types/PlottingTool/Animation/CssItems/AudioAnimation.d.ts +14 -0
  144. package/types/PlottingTool/Animation/CssItems/CssAnimationBase.d.ts +15 -0
  145. package/types/PlottingTool/Animation/CssItems/CssHideAnimation.d.ts +12 -0
  146. package/types/PlottingTool/Animation/CssItems/CssMaskAnimation.d.ts +18 -0
  147. package/types/PlottingTool/Animation/CssItems/CssMoveHorizonAnimation.d.ts +5 -0
  148. package/types/PlottingTool/Animation/CssItems/CssMoveVerticalAnimation.d.ts +5 -0
  149. package/types/PlottingTool/Animation/CssItems/CssNumberAnimation.d.ts +4 -0
  150. package/types/PlottingTool/Animation/CssItems/CssPropChangeAnimation.d.ts +13 -0
  151. package/types/PlottingTool/Animation/CssItems/CssShowAnimation.d.ts +12 -0
  152. package/types/PlottingTool/Animation/CssItems/CssShowDisplayAnimation.d.ts +10 -0
  153. package/types/PlottingTool/Animation/CssItems/CssValueAnimation.d.ts +27 -0
  154. package/types/PlottingTool/Animation/CssItems/SpeakManager.d.ts +12 -0
  155. package/types/PlottingTool/Animation/CssItems/SpeakTool.d.ts +12 -0
  156. package/types/PlottingTool/Animation/CssItems/SubtitleAnimation.d.ts +12 -0
  157. package/types/PlottingTool/Animation/CssItems/VideoAnimation.d.ts +12 -0
  158. package/types/PlottingTool/Animation/CssItems/XunFeiTool.d.ts +28 -0
  159. package/types/PlottingTool/Animation/Decorator.d.ts +11 -0
  160. package/types/PlottingTool/Animation/DefaultConfig.d.ts +5 -0
  161. package/types/PlottingTool/Animation/FillBehavior.d.ts +13 -0
  162. package/types/PlottingTool/Animation/GeojsonItems/GeojsonAnimation.d.ts +25 -0
  163. package/types/PlottingTool/Animation/GeojsonItems/GeojsonRepeatAnimation.d.ts +10 -0
  164. package/types/PlottingTool/Animation/GeojsonItems/GeojsonVisibleAnimation.d.ts +5 -0
  165. package/types/PlottingTool/Animation/IAnimation.d.ts +59 -0
  166. package/types/PlottingTool/Animation/Items/ArrowDirectAnimation.d.ts +11 -0
  167. package/types/PlottingTool/Animation/Items/AutoRotationAnimation.d.ts +16 -0
  168. package/types/PlottingTool/Animation/Items/CameraFlyAnimation.d.ts +15 -0
  169. package/types/PlottingTool/Animation/Items/CameraRoamAnimation.d.ts +29 -0
  170. package/types/PlottingTool/Animation/Items/CameraSetAnimation.d.ts +5 -0
  171. package/types/PlottingTool/Animation/Items/ColorAnimation.d.ts +6 -0
  172. package/types/PlottingTool/Animation/Items/DoubleArrowDirectAnimation.d.ts +10 -0
  173. package/types/PlottingTool/Animation/Items/FollowAnimation.d.ts +30 -0
  174. package/types/PlottingTool/Animation/Items/ForwardAnimation.d.ts +7 -0
  175. package/types/PlottingTool/Animation/Items/HideAnimation.d.ts +11 -0
  176. package/types/PlottingTool/Animation/Items/JBDirectAnimation.d.ts +20 -0
  177. package/types/PlottingTool/Animation/Items/ModelAnimation.d.ts +12 -0
  178. package/types/PlottingTool/Animation/Items/NumberAnimation.d.ts +12 -0
  179. package/types/PlottingTool/Animation/Items/PathAnimation.d.ts +44 -0
  180. package/types/PlottingTool/Animation/Items/PathMode.d.ts +18 -0
  181. package/types/PlottingTool/Animation/Items/PathShowAnimation.d.ts +25 -0
  182. package/types/PlottingTool/Animation/Items/PolygonMaskAnimation.d.ts +15 -0
  183. package/types/PlottingTool/Animation/Items/PopulationTimeAnimation.d.ts +7 -0
  184. package/types/PlottingTool/Animation/Items/RepeatAnimation.d.ts +13 -0
  185. package/types/PlottingTool/Animation/Items/ShowAnimation.d.ts +13 -0
  186. package/types/PlottingTool/Animation/Items/ShowTifAnimation.d.ts +10 -0
  187. package/types/PlottingTool/Animation/Items/SpiralAnimation.d.ts +30 -0
  188. package/types/PlottingTool/Animation/Items/StateChangeAnimation.d.ts +7 -0
  189. package/types/PlottingTool/Animation/Items/SurroundAnimation.d.ts +43 -0
  190. package/types/PlottingTool/Animation/Items/TargetFllowAniamtion.d.ts +20 -0
  191. package/types/PlottingTool/Animation/Items/ZoomToFlyAnimation.d.ts +16 -0
  192. package/types/PlottingTool/Animation/MaskBehavior.d.ts +13 -0
  193. package/types/PlottingTool/Animation/PageItems/PageShowAnimation.d.ts +10 -0
  194. package/types/PlottingTool/Animation/SingleAnimation.d.ts +32 -0
  195. package/types/PlottingTool/Arrow/EditorArrowBase.d.ts +10 -0
  196. package/types/PlottingTool/Arrow/EditorArrowLineBase.d.ts +10 -0
  197. package/types/PlottingTool/Arrow/EditorAssaultDirection.d.ts +4 -0
  198. package/types/PlottingTool/Arrow/EditorAttackArrow.d.ts +51 -0
  199. package/types/PlottingTool/Arrow/EditorDoubleArrow.d.ts +82 -0
  200. package/types/PlottingTool/Arrow/EditorFineArrow.d.ts +11 -0
  201. package/types/PlottingTool/Arrow/EditorGatheringPlace.d.ts +10 -0
  202. package/types/PlottingTool/Arrow/EditorSquadCombat.d.ts +9 -0
  203. package/types/PlottingTool/Arrow/EditorStraightLineArrow.d.ts +10 -0
  204. package/types/PlottingTool/Arrow/EditorTailedAttackArrow.d.ts +8 -0
  205. package/types/PlottingTool/Arrow/EditorTailedSquadCombat.d.ts +10 -0
  206. package/types/PlottingTool/Axis3Operator.d.ts +39 -0
  207. package/types/PlottingTool/Common/ICell.d.ts +9 -0
  208. package/types/PlottingTool/Common/IVectorTile.d.ts +16 -0
  209. package/types/PlottingTool/Common/PolygonHelper.d.ts +4 -0
  210. package/types/PlottingTool/Common/RenderGridTextV2.5.d.ts +36 -0
  211. package/types/PlottingTool/Common/geocode.d.ts +21 -0
  212. package/types/PlottingTool/Common.d.ts +26 -0
  213. package/types/PlottingTool/Cube/EditorCubeBase.d.ts +38 -0
  214. package/types/PlottingTool/Cube/EditorCubeBox.d.ts +20 -0
  215. package/types/PlottingTool/Cube/EditorCylinder.d.ts +25 -0
  216. package/types/PlottingTool/Cube/EditorEllipsoid.d.ts +20 -0
  217. package/types/PlottingTool/CurrentList.d.ts +14 -0
  218. package/types/PlottingTool/DataRgister.d.ts +6 -0
  219. package/types/PlottingTool/DataRgisterAudio.d.ts +5 -0
  220. package/types/PlottingTool/DataRgisterTif.d.ts +5 -0
  221. package/types/PlottingTool/DefaultPlottingAttribute.d.ts +1 -0
  222. package/types/PlottingTool/EditHelpLine.d.ts +8 -0
  223. package/types/PlottingTool/EditMode.d.ts +218 -0
  224. package/types/PlottingTool/GVEntityCollection.d.ts +11 -0
  225. package/types/PlottingTool/Graph.d.ts +340 -0
  226. package/types/PlottingTool/GraphFactory.d.ts +7 -0
  227. package/types/PlottingTool/GraphManager.d.ts +145 -0
  228. package/types/PlottingTool/GraphPropStorage.d.ts +10 -0
  229. package/types/PlottingTool/GraphProperty.d.ts +58 -0
  230. package/types/PlottingTool/GraphicRender/CesiumConeCommunicate.d.ts +40 -0
  231. package/types/PlottingTool/GraphicRender/CesiumRender.d.ts +31 -0
  232. package/types/PlottingTool/GraphicRender/Cloud/GxCloudItem.d.ts +82 -0
  233. package/types/PlottingTool/GraphicRender/DynamicProperty.d.ts +14 -0
  234. package/types/PlottingTool/GraphicRender/RenderPlotting.d.ts +20 -0
  235. package/types/PlottingTool/GraphicRender/radar/GxPrimitivePolyline.d.ts +29 -0
  236. package/types/PlottingTool/GraphicRender/radar/GxPrimitiveTriangles.d.ts +30 -0
  237. package/types/PlottingTool/GraphicRender/radar/GxRadarItem.d.ts +93 -0
  238. package/types/PlottingTool/GxClusterDataSource.d.ts +107 -0
  239. package/types/PlottingTool/HeightReferenceGraph.d.ts +7 -0
  240. package/types/PlottingTool/HeightReferencePrimtive.d.ts +8 -0
  241. package/types/PlottingTool/HtmlBox/BoxFactory.d.ts +4 -0
  242. package/types/PlottingTool/HtmlBox/CssProp.d.ts +61 -0
  243. package/types/PlottingTool/HtmlBox/HtmlBox.d.ts +6 -0
  244. package/types/PlottingTool/HtmlBox/HtmlBoxMulti.d.ts +38 -0
  245. package/types/PlottingTool/HtmlBox/WangEditor/fwbconfig.d.ts +3 -0
  246. package/types/PlottingTool/HtmlBox/WangEditor/parse-style-html.d.ts +7 -0
  247. package/types/PlottingTool/HtmlBox/WangEditor/render-style.d.ts +7 -0
  248. package/types/PlottingTool/HtmlBox/WangEditor/stroke-color-config.d.ts +1 -0
  249. package/types/PlottingTool/HtmlBox/WangEditor/style-to-html.d.ts +1 -0
  250. package/types/PlottingTool/HtmlBox/WangEditor/text-stroke-color.d.ts +13 -0
  251. package/types/PlottingTool/HtmlBox/WangEditor/text-stroke-width.d.ts +20 -0
  252. package/types/PlottingTool/HtmlBox/WangEditor/tools.d.ts +7 -0
  253. package/types/PlottingTool/HtmlBox/html-box-base.d.ts +34 -0
  254. package/types/PlottingTool/HtmlBox/html-css-prop.d.ts +3 -0
  255. package/types/PlottingTool/HtmlBox/new-rich-text.d.ts +6 -0
  256. package/types/PlottingTool/HtmlBox/pic-collection.d.ts +17 -0
  257. package/types/PlottingTool/HtmlBox/rich-text.d.ts +6 -0
  258. package/types/PlottingTool/HtmlBox/subtitle-box.d.ts +6 -0
  259. package/types/PlottingTool/HtmlBox/videoBox.d.ts +8 -0
  260. package/types/PlottingTool/Image/EditorHtml.d.ts +36 -0
  261. package/types/PlottingTool/Image/EditorImage.d.ts +10 -0
  262. package/types/PlottingTool/Image/EditorJBPointObject.d.ts +23 -0
  263. package/types/PlottingTool/Image/EditorRedFlag.d.ts +7 -0
  264. package/types/PlottingTool/Interface/LayerConfig.d.ts +22 -0
  265. package/types/PlottingTool/NoControlPrimitive/EditorGeometryMultiPolyBase.d.ts +17 -0
  266. package/types/PlottingTool/NoControlPrimitive/EditorGeometryMultiPolygon.d.ts +11 -0
  267. package/types/PlottingTool/NoControlPrimitive/EditorGeometryMultiPolyline.d.ts +14 -0
  268. package/types/PlottingTool/NoControlPrimitive/EditorGeometryPolygon.d.ts +41 -0
  269. package/types/PlottingTool/NoControlPrimitive/EditorGeometryPolyline.d.ts +28 -0
  270. package/types/PlottingTool/NoControlPrimitive/EditorGeometryWall.d.ts +18 -0
  271. package/types/PlottingTool/NoControlPrimitive/NoControlPrimitive.d.ts +26 -0
  272. package/types/PlottingTool/NoControlPrimitive/PercentPolyine.d.ts +17 -0
  273. package/types/PlottingTool/PlottingBaseNode.d.ts +40 -0
  274. package/types/PlottingTool/PlottingBehavior.d.ts +91 -0
  275. package/types/PlottingTool/PlottingCommon.d.ts +20 -0
  276. package/types/PlottingTool/Point/ConeCommunicateWave.d.ts +46 -0
  277. package/types/PlottingTool/Point/EditorBasePrimitive.d.ts +12 -0
  278. package/types/PlottingTool/Point/EditorCloud.d.ts +43 -0
  279. package/types/PlottingTool/Point/EditorCommunicateWave.d.ts +44 -0
  280. package/types/PlottingTool/Point/EditorJBPointScreen.d.ts +51 -0
  281. package/types/PlottingTool/Point/EditorModel.d.ts +59 -0
  282. package/types/PlottingTool/Point/EditorParticle.d.ts +37 -0
  283. package/types/PlottingTool/Point/EditorPin.d.ts +55 -0
  284. package/types/PlottingTool/Point/EditorPinCanvas.d.ts +94 -0
  285. package/types/PlottingTool/Point/EditorPinImage.d.ts +110 -0
  286. package/types/PlottingTool/Point/EditorPinMakiIcon.d.ts +13 -0
  287. package/types/PlottingTool/Point/EditorPinText.d.ts +14 -0
  288. package/types/PlottingTool/Point/EditorPlaneText.d.ts +79 -0
  289. package/types/PlottingTool/Point/EditorPoint.d.ts +28 -0
  290. package/types/PlottingTool/Point/EditorRadar.d.ts +80 -0
  291. package/types/PlottingTool/Point/EditorText.d.ts +93 -0
  292. package/types/PlottingTool/Point/EditorText_old.d.ts +58 -0
  293. package/types/PlottingTool/Point/PointJbStrokeSvgHelper.d.ts +28 -0
  294. package/types/PlottingTool/Point/PointJbSvgHelper.d.ts +31 -0
  295. package/types/PlottingTool/Point/UECamera.d.ts +49 -0
  296. package/types/PlottingTool/Polygon/EditorArrow1.d.ts +10 -0
  297. package/types/PlottingTool/Polygon/EditorCircle.d.ts +13 -0
  298. package/types/PlottingTool/Polygon/EditorEllipse.d.ts +12 -0
  299. package/types/PlottingTool/Polygon/EditorFrustum.d.ts +36 -0
  300. package/types/PlottingTool/Polygon/EditorPolygon.d.ts +102 -0
  301. package/types/PlottingTool/Polygon/EditorRectangle.d.ts +40 -0
  302. package/types/PlottingTool/Polygon/EditorRectangleExpand.d.ts +16 -0
  303. package/types/PlottingTool/Polygon/EditorSector.d.ts +16 -0
  304. package/types/PlottingTool/Polyline/EditorBezier1.d.ts +9 -0
  305. package/types/PlottingTool/Polyline/EditorBezier2.d.ts +9 -0
  306. package/types/PlottingTool/Polyline/EditorBezierN.d.ts +9 -0
  307. package/types/PlottingTool/Polyline/EditorBezierSpline.d.ts +9 -0
  308. package/types/PlottingTool/Polyline/EditorCircleArc.d.ts +10 -0
  309. package/types/PlottingTool/Polyline/EditorCurve.d.ts +7 -0
  310. package/types/PlottingTool/Polyline/EditorJBLine.d.ts +8 -0
  311. package/types/PlottingTool/Polyline/EditorPointArc.d.ts +21 -0
  312. package/types/PlottingTool/Polyline/EditorPointLine.d.ts +12 -0
  313. package/types/PlottingTool/Polyline/EditorPointSpline.d.ts +8 -0
  314. package/types/PlottingTool/Polyline/EditorPolyline.d.ts +109 -0
  315. package/types/PlottingTool/Polyline/EditorRoutePolyline.d.ts +16 -0
  316. package/types/PlottingTool/Polyline/plotsList.d.ts +6 -0
  317. package/types/PlottingTool/RegexHelper.d.ts +10 -0
  318. package/types/PlottingTool/Text/EditorAreaText.d.ts +44 -0
  319. package/types/PlottingTool/Text/EditorRouteText.d.ts +64 -0
  320. package/types/PlottingTool/Text/MedianLine.d.ts +22 -0
  321. package/types/PlottingTool/VideoElement/EditorVideo.d.ts +9 -0
  322. package/types/PlottingTool/drawToolExt/DrawAreaTextToolEx.d.ts +19 -0
  323. package/types/PlottingTool/drawToolExt/DrawBillboardToolEx.d.ts +21 -0
  324. package/types/PlottingTool/drawToolExt/DrawCtrlPointToolEx.d.ts +20 -0
  325. package/types/PlottingTool/drawToolExt/DrawHtmlToolEx.d.ts +31 -0
  326. package/types/PlottingTool/drawToolExt/DrawLineToolEx.d.ts +20 -0
  327. package/types/PlottingTool/drawToolExt/DrawMedianPointToolEx.d.ts +15 -0
  328. package/types/PlottingTool/drawToolExt/DrawModelToolEx.d.ts +21 -0
  329. package/types/PlottingTool/drawToolExt/DrawPointToolEx.d.ts +21 -0
  330. package/types/PlottingTool/drawToolExt/DrawPolygonToolEx.d.ts +20 -0
  331. package/types/PlottingTool/drawToolExt/DrawRouteTextToolEx.d.ts +16 -0
  332. package/types/PlottingTool/drawToolExt/DrawTextToolEx.d.ts +21 -0
  333. package/types/PlottingTool/drawToolExt/DrawToolManager.d.ts +60 -0
  334. package/types/PlottingTool/drawToolExt/HitPointToolEx.d.ts +10 -0
  335. package/types/PlottingTool/drawToolExt/HitRectToolEx.d.ts +10 -0
  336. package/types/PlottingTool/drawToolExt/base/List.d.ts +22 -0
  337. package/types/PlottingTool/drawToolExt/calcuteShape.d.ts +3 -0
  338. package/types/PlottingTool/drawToolExt/entity/MaxRecTest.d.ts +21 -0
  339. package/types/PlottingTool/drawToolExt/entity/XZAreaTextEntity.d.ts +36 -0
  340. package/types/PlottingTool/drawToolExt/entity/XZBaseEntity.d.ts +17 -0
  341. package/types/PlottingTool/drawToolExt/entity/XZBillboardEntity.d.ts +17 -0
  342. package/types/PlottingTool/drawToolExt/entity/XZCtrlPointEntity.d.ts +16 -0
  343. package/types/PlottingTool/drawToolExt/entity/XZHtmlEntity.d.ts +15 -0
  344. package/types/PlottingTool/drawToolExt/entity/XZLineEntity.d.ts +20 -0
  345. package/types/PlottingTool/drawToolExt/entity/XZMedianPointEntity.d.ts +16 -0
  346. package/types/PlottingTool/drawToolExt/entity/XZModelEntity.d.ts +17 -0
  347. package/types/PlottingTool/drawToolExt/entity/XZPointEntity.d.ts +16 -0
  348. package/types/PlottingTool/drawToolExt/entity/XZPolygonEntity.d.ts +19 -0
  349. package/types/PlottingTool/drawToolExt/entity/XZRouteTextEntity.d.ts +16 -0
  350. package/types/PlottingTool/drawToolExt/entity/XZTextEntity.d.ts +16 -0
  351. package/types/PlottingTool/drawToolExt/interface/IBase.d.ts +23 -0
  352. package/types/PlottingTool/drawToolExt/interface/ICesium.d.ts +99 -0
  353. package/types/PlottingTool/drawToolExt/interface/IData.d.ts +56 -0
  354. package/types/PlottingTool/drawToolExt/interface/IEntity.d.ts +80 -0
  355. package/types/PlottingTool/drawToolExt/interface/IStyle.d.ts +127 -0
  356. package/types/PlottingTool/drawToolExt/interface/ITool.d.ts +31 -0
  357. package/types/PlottingTool/drawToolExt/interface/geojson.d.ts +192 -0
  358. package/types/PlottingTool/drawToolExt/styles/XZAreaTextStyle.d.ts +14 -0
  359. package/types/PlottingTool/drawToolExt/styles/XZBaseStyle.d.ts +6 -0
  360. package/types/PlottingTool/drawToolExt/styles/XZBillboardStyle.d.ts +9 -0
  361. package/types/PlottingTool/drawToolExt/styles/XZHtmlStyle.d.ts +71 -0
  362. package/types/PlottingTool/drawToolExt/styles/XZLineStyle.d.ts +12 -0
  363. package/types/PlottingTool/drawToolExt/styles/XZModelStyle.d.ts +9 -0
  364. package/types/PlottingTool/drawToolExt/styles/XZPointStyle.d.ts +12 -0
  365. package/types/PlottingTool/drawToolExt/styles/XZPolygonStyle.d.ts +8 -0
  366. package/types/PlottingTool/drawToolExt/styles/XZRouteTextStyle.d.ts +11 -0
  367. package/types/PlottingTool/drawToolExt/styles/XZTextStyle.d.ts +14 -0
  368. package/types/PlottingTool/geojson/EditorGeojsonMultiPolyBase.d.ts +33 -0
  369. package/types/PlottingTool/geojson/EditorGeojsonMultiPolygon.d.ts +28 -0
  370. package/types/PlottingTool/geojson/EditorGeojsonMultiPolyline.d.ts +21 -0
  371. package/types/PlottingTool/geojson/EditorGeojsonPolygon.d.ts +13 -0
  372. package/types/PlottingTool/geojson/EditorGeojsonPolyline.d.ts +13 -0
  373. package/types/PlottingTool/geojson/GeojsonPercentPolyine.d.ts +18 -0
  374. package/types/PlottingTool/geojson/parsePolygon.d.ts +25 -0
  375. package/types/PlottingTool/shareGraph.d.ts +16 -0
  376. package/types/Scene/Analyzation/Measure.d.ts +120 -0
  377. package/types/Scene/EventSource/ContextSizeChanged.d.ts +13 -0
  378. package/types/Scene/GraticuleLayer/Graticule.d.ts +15 -0
  379. package/types/Scene/Sea/RenderSeaPolygon.d.ts +9 -0
  380. package/types/SceneObjects/CustomPrimitive/SharedTexturePool.d.ts +13 -0
  381. package/types/SceneObjects/CustomPrimitive/extrudePolyline.d.ts +1 -0
  382. package/types/SceneObjects/RenderObject/BindedCylinder.d.ts +40 -0
  383. package/types/SceneObjects/RenderObject/Bubble.d.ts +125 -0
  384. package/types/SceneObjects/RenderObject/CesiumBillboard.d.ts +20 -0
  385. package/types/SceneObjects/RenderObject/CesiumCylinder.d.ts +30 -0
  386. package/types/SceneObjects/RenderObject/CesiumEllipse.d.ts +29 -0
  387. package/types/SceneObjects/RenderObject/CesiumEllipsoid.d.ts +29 -0
  388. package/types/SceneObjects/RenderObject/CesiumLabel.d.ts +29 -0
  389. package/types/SceneObjects/RenderObject/CesiumLabelBillboard.d.ts +39 -0
  390. package/types/SceneObjects/RenderObject/CesiumLabelRect.d.ts +33 -0
  391. package/types/SceneObjects/RenderObject/CesiumModel.d.ts +20 -0
  392. package/types/SceneObjects/RenderObject/CesiumOblique.d.ts +33 -0
  393. package/types/SceneObjects/RenderObject/CesiumPoint.d.ts +22 -0
  394. package/types/SceneObjects/RenderObject/CesiumPolygon.d.ts +24 -0
  395. package/types/SceneObjects/RenderObject/CesiumPolyline.d.ts +24 -0
  396. package/types/SceneObjects/RenderObject/CesiumPopover.d.ts +30 -0
  397. package/types/SceneObjects/RenderObject/CesiumRectangle.d.ts +34 -0
  398. package/types/SceneObjects/RenderObject/CesiumSphere.d.ts +29 -0
  399. package/types/SceneObjects/RenderObject/CesiumVolumePolyline.d.ts +32 -0
  400. package/types/SceneObjects/RenderObject/CesiumWall.d.ts +29 -0
  401. package/types/SceneObjects/RenderObject/CircularRender.d.ts +24 -0
  402. package/types/SceneObjects/RenderObject/CustomLabelRender.d.ts +23 -0
  403. package/types/SceneObjects/RenderObject/CylinderSensor.d.ts +47 -0
  404. package/types/SceneObjects/RenderObject/DashBoardEffect.d.ts +39 -0
  405. package/types/SceneObjects/RenderObject/DynamicItem/DynamicItemFlame.d.ts +42 -0
  406. package/types/SceneObjects/RenderObject/DynamicItem/DynamicItemPath.d.ts +182 -0
  407. package/types/SceneObjects/RenderObject/DynamicItem/DynamicItemState.d.ts +7 -0
  408. package/types/SceneObjects/RenderObject/DynamicItem/DynamicItemStyle.d.ts +182 -0
  409. package/types/SceneObjects/RenderObject/DynamicItem/DynamicTimePositions.d.ts +102 -0
  410. package/types/SceneObjects/RenderObject/DynamicItem/HistoryTrack.d.ts +159 -0
  411. package/types/SceneObjects/RenderObject/DynamicItem/WarningTarget.d.ts +36 -0
  412. package/types/SceneObjects/RenderObject/DynamicRippleEffect.d.ts +23 -0
  413. package/types/SceneObjects/RenderObject/Flag.d.ts +43 -0
  414. package/types/SceneObjects/RenderObject/GradientSector.d.ts +46 -0
  415. package/types/SceneObjects/RenderObject/Graphics/GraphicGroup.d.ts +113 -0
  416. package/types/SceneObjects/RenderObject/RenderObject.d.ts +37 -0
  417. package/types/SceneObjects/RenderObject/RenderUtils.d.ts +35 -0
  418. package/types/SceneObjects/RenderObject/ScanEffect.d.ts +40 -0
  419. package/types/SceneObjects/RenderObject/SectorSensor.d.ts +42 -0
  420. package/types/SceneObjects/RenderObject/SensorRender.d.ts +15 -0
  421. package/types/SceneObjects/RenderObject/SpreadEffect.d.ts +47 -0
  422. package/types/SceneObjects/RenderObject/WaterEffect.d.ts +31 -0
  423. package/types/SceneObjects/RenderObject/WeatherParticle.d.ts +30 -0
  424. package/types/SceneObjects/ViewshedAnalysis.d.ts +98 -0
  425. package/types/SceneObjects/_shared/Destroyable.d.ts +9 -0
  426. package/types/SceneObjects/_shared/ResourceHandler.d.ts +14 -0
  427. package/types/SceneObjects/_shared/destroyObject.d.ts +18 -0
  428. package/types/Service/SceneOptions/Graticule.d.ts +15 -0
  429. package/types/Service/action.service.d.ts +92 -0
  430. package/types/Service/advance-html.service.d.ts +12 -0
  431. package/types/Service/animation.service.d.ts +84 -0
  432. package/types/Service/cesium.service.d.ts +85 -0
  433. package/types/Service/cluster.service.d.ts +7 -0
  434. package/types/Service/config.service.d.ts +24 -0
  435. package/types/Service/drawServices/VectorRender/renderModels.d.ts +13 -0
  436. package/types/Service/drawbigfile.service.d.ts +24 -0
  437. package/types/Service/fwbconfig.d.ts +3 -0
  438. package/types/Service/geojson-plot.service.d.ts +21 -0
  439. package/types/Service/html-draw.service.d.ts +134 -0
  440. package/types/Service/http.service.d.ts +15 -0
  441. package/types/Service/layers.service.d.ts +34 -0
  442. package/types/Service/logicService/point.service.d.ts +60 -0
  443. package/types/Service/message.service.d.ts +4 -0
  444. package/types/Service/music.service.d.ts +23 -0
  445. package/types/Service/parse-style-html.d.ts +7 -0
  446. package/types/Service/plot.service.d.ts +115 -0
  447. package/types/Service/property.service.d.ts +52 -0
  448. package/types/Service/render-style.d.ts +7 -0
  449. package/types/Service/richTextEdit.service.d.ts +35 -0
  450. package/types/Service/sceneServices/BigFileManager.d.ts +12 -0
  451. package/types/Service/sceneServices/CesiumManager.d.ts +18 -0
  452. package/types/Service/sceneServices/EagleManager.d.ts +35 -0
  453. package/types/Service/sceneServices/HtmlDrawManager.d.ts +12 -0
  454. package/types/Service/sceneServices/ImageEffectManager.d.ts +19 -0
  455. package/types/Service/sceneServices/LayerManage.d.ts +61 -0
  456. package/types/Service/sceneServices/MusicManager.d.ts +10 -0
  457. package/types/Service/sceneServices/PageAnimationManager.d.ts +39 -0
  458. package/types/Service/sceneServices/SubtitleManager.d.ts +6 -0
  459. package/types/Service/sceneServices/TerrainManager.d.ts +11 -0
  460. package/types/Service/sceneServices/sceneManager.d.ts +71 -0
  461. package/types/Service/sceneServices/snap.d.ts +33 -0
  462. package/types/Service/service.manager.d.ts +174 -0
  463. package/types/Service/stroke-color-config.d.ts +1 -0
  464. package/types/Service/style-to-html.d.ts +1 -0
  465. package/types/Service/terrain.service.d.ts +11 -0
  466. package/types/Service/text-stroke-color.d.ts +13 -0
  467. package/types/Service/text-stroke-width.d.ts +20 -0
  468. package/types/Service/tools.d.ts +7 -0
  469. package/types/Utils/Calculate.d.ts +212 -0
  470. package/types/Utils/Check.d.ts +98 -0
  471. package/types/Utils/DateHelper.d.ts +30 -0
  472. package/types/Utils/GxMath.d.ts +102 -0
  473. package/types/Utils/GxVector3.d.ts +7 -0
  474. package/types/Utils/HtmlUtil.d.ts +12 -0
  475. package/types/Utils/MilsymbolHelper.d.ts +20 -0
  476. package/types/Utils/TokenHelper.d.ts +36 -0
  477. package/types/Utils/Util.d.ts +204 -0
  478. package/types/Utils/d3Clock.d.ts +11 -0
  479. package/types/Utils/index.d.ts +17 -0
  480. package/types/Utils/pinyin.static.d.ts +375 -0
  481. package/types/Utils/pinyin.tool.d.ts +5 -0
  482. package/types/Utils/pinyin_all.d.ts +20 -0
  483. package/types/Utils/ready.d.ts +3 -0
  484. package/types/Utils/tools.d.ts +31 -0
  485. package/types/index.d.ts +98 -0
  486. package/types/index.html +35 -0
package/README.md CHANGED
@@ -1,86 +1,267 @@
1
- # geovisearthsdk_web - plotting 模块 README
2
-
3
- ## 简介
4
- plotting 模块为 GeovisEarth Web SDK 提供矢量绘制、标注与图形交互的封装组件,便于在地图上创建、编辑与管理点、线、面、标注等图形要素。
5
-
6
- ## 主要功能
7
- - 创建点、线、面、文本标注、图标等要素
8
- - 支持要素样式配置(颜色、宽度、图标、透明度等)
9
- - 要素编辑(拖拽、顶点编辑、删除)
10
- - 支持要素分组与图层管理
11
- - 事件绑定(点击、悬停、编辑开始/结束等)
12
- - 批量导入/导出 GeoJSON
13
-
14
- ## 快速开始
15
-
16
- 安装(npm)
17
- ```bash
18
- npm install @metagl/sdk-plotting
19
- ```
20
-
21
- 浏览器引入(UMD)
22
- ```html
23
- <script src="path/to/sdk-plotting.js"></script>
24
- ```
25
-
26
- 初始化并创建一个点
27
- ```js
28
- import { Plotting } from '@metagl/sdk-plotting';
29
-
30
- const map = new GeoMap({ container: 'map' });
31
- const plotting = new Plotting({ map });
32
-
33
- const marker = plotting.createPoint({
34
- position: [116.397389, 39.908860],
35
- style: { color: '#ff0000', size: 12 }
36
- });
37
- plotting.add(marker);
38
- ```
39
-
40
- ## 基本 API(概览)
41
- - Plotting(options)
42
- - map: 地图实例
43
- - zIndex, defaultStyle 等
44
- - createPoint({ position, style })
45
- - createLine({ positions, style })
46
- - createPolygon({ positions, style })
47
- - createLabel({ position, text, style })
48
- - add(feature) / remove(feature) / clear()
49
- - edit(feature) / stopEdit()
50
- - toGeoJSON() / fromGeoJSON(geojson)
51
- - on(event, handler) / off(event, handler)
52
-
53
- 常见事件:'click'、'dblclick'、'pointermove'、'editstart'、'editend'、'create'
54
-
55
- ## 配置示例
56
- ```js
57
- const plotting = new Plotting({
58
- map,
59
- defaultStyle: {
60
- point: { color: '#3388ff', size: 8 },
61
- line: { color: '#33aa33', width: 3 },
62
- polygon: { fillColor: 'rgba(51,136,255,0.2)', strokeColor: '#3388ff' }
63
- }
64
- });
65
- ```
66
-
67
- ## 编辑与交互
68
- - 通过 plotting.edit(feature) 启动编辑模式
69
- - 支持拖动顶点、添加/删除顶点
70
- - 编辑完成触发 'editend' 事件,可获取最新 GeoJSON
71
-
72
- ## 导入/导出
73
- ```js
74
- const geojson = plotting.toGeoJSON();
75
- plotting.fromGeoJSON(geojson);
76
- ```
77
-
78
- ## 常见问题
79
- - 要素不可见:检查图层可见性及样式透明度、地图投影设置
80
- - 编辑失败:确保 feature 已添加到 plotting 管理器并传入正确坐标格式
81
-
82
- ## 贡献
83
- 欢迎提交 issue 与 PR。请遵守项目代码风格并补充单元测试。
84
-
85
- ## 许可证
86
- ISC
1
+ # @metagl/sdk-plotting
2
+
3
+ GeovisEarth SDK Plotting 模块,为 GeovisEarth Web SDK 提供矢量绘制、标注与图形交互的封装组件,支持在 Cesium 地图上创建、编辑与管理点、线、面、标注等图形要素。
4
+
5
+ ## 两种使用方式
6
+
7
+ ### 方式一:HTML script 标签引入(UMD 方式)
8
+
9
+ 适用于传统 HTML 页面,通过 `<script>` 标签直接引入,通过全局变量 `LACDT` 访问 API。
10
+
11
+ **前置依赖:** 需先引入 Cesium。
12
+
13
+ ```html
14
+ <!DOCTYPE html>
15
+ <html lang="zh">
16
+ <head>
17
+ <meta charset="utf-8" />
18
+ <!-- 1. 引入 Cesium -->
19
+ <link href="https://io-qos.geovisearth.com/getfile/46/brainsim-cdn/open/cesiumjs/1.136/Widgets/widgets.css" rel="stylesheet">
20
+ <script src="https://io-qos.geovisearth.com/getfile/46/brainsim-cdn/open/cesiumjs/1.136/Cesium.js"></script>
21
+
22
+ <!-- 2. 引入 sdk-plotting(线上 CDN 或本地文件) -->
23
+ <script src="https://io-qos.geovisearth.com/getfile/46/brainsim-cdn/open/sdk/lacdt.plotting.js"></script>
24
+ <!-- 本地引入:<script src="./lib/lacdt.plotting.js"></script> -->
25
+ </head>
26
+ <body>
27
+ <div id="cesiumContainer" style="width:100%;height:100%"></div>
28
+
29
+ <script>
30
+ // 初始化 Cesium
31
+ const viewer = new Cesium.Viewer('cesiumContainer');
32
+
33
+ // 3. 通过全局对象 LACDT 使用 plotting
34
+ const plotting = new LACDT.Plotting({ viewer });
35
+
36
+ // 使用 API 创建要素
37
+ const point = plotting.createPoint({
38
+ position: [116.397389, 39.908860]
39
+ });
40
+ plotting.add(point);
41
+ </script>
42
+ </body>
43
+ </html>
44
+ ```
45
+
46
+ **资源文件说明:** 打包产物中 `resources/` 目录包含图片、纹理等静态资源,需与 JS 文件保持相对路径关系。如果自定义了部署路径,需确保 `resources/` 目录可被访问。
47
+
48
+ ---
49
+
50
+ ### 方式二:npm import 引入(ESM 方式)
51
+
52
+ 适用于 Vue/Vite/Webpack 等现代前端工程化项目,通过 ES Module 动态导入。
53
+
54
+ #### 1. 安装
55
+
56
+ ```bash
57
+ # npm 官方源
58
+ npm install @metagl/sdk-plotting
59
+
60
+ # 或本地 file 引用(开发调试阶段)
61
+ npm install @metagl/sdk-plotting@file:../../sdk-plotting/publish
62
+ ```
63
+
64
+ #### 2. Vite 项目配置要点
65
+
66
+ ##### 2.1 Cesium 别名映射
67
+
68
+ sdk-plotting 打包时将 Cesium 标记为 external(全局变量 `Cesium`),但 Vite 按模块名解析时需要映射:
69
+
70
+ ```js
71
+ // vite.config.js
72
+ import { defineConfig } from 'vite'
73
+ import path from 'path'
74
+
75
+ export default defineConfig({
76
+ resolve: {
77
+ alias: {
78
+ // 关键:将 UMD external 的 'Cesium' 映射到 npm 包名 'cesium'
79
+ 'Cesium': 'cesium',
80
+ }
81
+ },
82
+ define: {
83
+ // Cesium 静态资源路径
84
+ CESIUM_BASE_URL: JSON.stringify('/cesium')
85
+ },
86
+ optimizeDeps: {
87
+ include: ['cesium']
88
+ }
89
+ })
90
+ ```
91
+
92
+ ##### 2.2 静态资源拷贝
93
+
94
+ sdk-plotting 的 `resources/` 目录(图片、纹理等)需要通过 `vite-plugin-static-copy` 或其他方式复制到构建输出:
95
+
96
+ ```js
97
+ // vite.config.js
98
+ import { viteStaticCopy } from 'vite-plugin-static-copy'
99
+
100
+ export default defineConfig({
101
+ plugins: [
102
+ viteStaticCopy({
103
+ targets: [
104
+ // Cesium 静态资源
105
+ {
106
+ src: 'node_modules/cesium/Build/Cesium/*',
107
+ dest: 'cesium'
108
+ },
109
+ // sdk-plotting 资源
110
+ {
111
+ src: 'node_modules/@metagl/sdk-plotting/resources',
112
+ dest: 'resources'
113
+ }
114
+ ]
115
+ })
116
+ ],
117
+ // 如果代码中通过 /lib/resources 路径请求资源,配置代理
118
+ server: {
119
+ proxy: {
120
+ '/lib/resources': {
121
+ target: 'http://localhost:9521',
122
+ changeOrigin: true,
123
+ rewrite: (path) => path.replace('/lib/resources', '/resources')
124
+ }
125
+ }
126
+ }
127
+ })
128
+ ```
129
+
130
+ ##### 2.3 入口文件加载
131
+
132
+ UMD 格式需要通过动态 import 加载,并在加载后将全局变量 `LACDT` 和 `window.Cesium` 暴露出来:
133
+
134
+ ```js
135
+ // main.js
136
+ import { createApp } from 'vue'
137
+ import App from './App.vue'
138
+
139
+ // 解冻 Cesium(使 sdk-plotting 能扩展 Cesium 对象)
140
+ function makeExtensible(obj) {
141
+ const newObj = Object.create(Object.getPrototypeOf(obj))
142
+ Object.getOwnPropertyNames(obj).forEach(key => {
143
+ const descriptor = Object.getOwnPropertyDescriptor(obj, key)
144
+ if (descriptor) {
145
+ Object.defineProperty(newObj, key, {
146
+ ...descriptor,
147
+ configurable: true,
148
+ writable: true
149
+ })
150
+ }
151
+ })
152
+ return newObj
153
+ }
154
+
155
+ async function bootstrap() {
156
+ // 1. 加载 Cesium
157
+ const CesiumModule = await import('cesium')
158
+ let cesium = CesiumModule.default || CesiumModule
159
+ cesium = makeExtensible(cesium)
160
+ window.Cesium = cesium
161
+
162
+ // 2. 加载 sdk-plotting(动态 import)
163
+ await import('@metagl/sdk-plotting')
164
+
165
+ // 3. 此时 LACDT 全局对象已就绪
166
+ const app = createApp(App)
167
+ app.config.globalProperties.$metaGL = window.LACDT
168
+ app.config.globalProperties.$cesium = window.Cesium
169
+ app.mount('#app')
170
+ }
171
+
172
+ bootstrap()
173
+ ```
174
+
175
+ #### 3. Webpack 项目配置要点
176
+
177
+ Webpack 项目需配置 Cesium 为 external:
178
+
179
+ ```js
180
+ // webpack.config.js
181
+ module.exports = {
182
+ externals: {
183
+ cesium: 'Cesium'
184
+ }
185
+ }
186
+ ```
187
+
188
+ ---
189
+
190
+ ## 主要功能
191
+
192
+ - 创建点、线、面、文本标注、图标等要素
193
+ - 支持要素样式配置(颜色、宽度、图标、透明度等)
194
+ - 要素编辑(拖拽、顶点编辑、删除)
195
+ - 支持要素分组与图层管理
196
+ - 事件绑定(点击、悬停、编辑开始/结束等)
197
+ - 批量导入/导出 GeoJSON
198
+ - 军事标会、箭头、扇形、椭圆等多种军事图形
199
+ - 热力图、OD 线、三维体(立方体、圆柱体)等分析效果
200
+
201
+ ## 快速开始
202
+
203
+ 初始化并创建一个点:
204
+
205
+ ```js
206
+ // UMD 方式
207
+ const plotting = new LACDT.Plotting({ viewer });
208
+
209
+ // npm import 方式
210
+ import { Plotting } from '@metagl/sdk-plotting';
211
+ const plotting = new Plotting({ viewer });
212
+
213
+ // 创建点
214
+ const marker = plotting.createPoint({
215
+ position: [116.397389, 39.908860],
216
+ style: { color: '#ff0000', size: 12 }
217
+ });
218
+ plotting.add(marker);
219
+ ```
220
+
221
+ ## 基本 API(概览)
222
+
223
+ - **Plotting(options)**
224
+ - `viewer`: Cesium Viewer 实例
225
+ - `zIndex`, `defaultStyle` 等
226
+ - **createPoint**({ position, style })
227
+ - **createLine**({ positions, style })
228
+ - **createPolygon**({ positions, style })
229
+ - **createLabel**({ position, text, style })
230
+ - **add**(feature) / **remove**(feature) / **clear**()
231
+ - **edit**(feature) / **stopEdit**()
232
+ - **toGeoJSON**() / **fromGeoJSON**(geojson)
233
+ - **on**(event, handler) / **off**(event, handler)
234
+
235
+ 常见事件:`click`、`dblclick`、`pointermove`、`editstart`、`editend`、`create`
236
+
237
+ ## 构建
238
+
239
+ ```bash
240
+ npm run build # webpack 生产构建
241
+ npm run build:rollup # rollup 构建
242
+ npm run build:dts # 生成类型声明文件
243
+ ```
244
+
245
+ 构建产物输出到 `lib/` 目录,`npm run build` 会自动将产物复制到 `publish/` 目录。
246
+
247
+ ## 发布
248
+
249
+ ```bash
250
+ npm run login # 登录 npm
251
+ cd publish && npm publish --access public # 发布
252
+ ```
253
+
254
+ ## 常见问题
255
+
256
+ ### UMD 方式
257
+ - **资源 404**:确保 `resources/` 目录与 `lacdt.plotting.js` 保持正确的相对路径
258
+ - **LACDT 未定义**:确保 `lacdt.plotting.js` 在 Cesium 之后加载
259
+
260
+ ### npm import 方式
261
+ - **Cannot assign to "e" because it is a constant**:构建产物问题,需重新 `npm run build`
262
+ - **Cesium could not be resolved**:在 `vite.config.js` 中添加 `'Cesium': 'cesium'` 别名
263
+ - **SDK 无法扩展 Cesium**:UMD 格式的 SDK 会扩展 `window.Cesium`,需在 import 之前确保 Cesium 已挂载到 `window`,且对象未被 `Object.freeze()`
264
+
265
+ ## 许可证
266
+
267
+ ISC