deeptwins-engine-3d 0.1.76 → 0.2.0

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 (238) hide show
  1. package/dist/assets/Build/DeepTwins/Image/noise.png +0 -0
  2. package/dist/assets/Build/DeepTwins/Workers/CustomRasterClip.worker.js +1 -2
  3. package/dist/assets/Build/DeepTwins/Workers/MvtVector.worker.js +1 -1
  4. package/dist/assets/Build/Map3d/ThirdParty/Workers/zip-web-worker.js +640 -0
  5. package/dist/assets/Build/Map3d/ThirdParty/wasm_splats_bg.wasm +0 -0
  6. package/dist/assets/Build/Map3d/ThirdParty/zip-module.wasm +0 -0
  7. package/dist/assets/Build/Map3d/Workers/chunk-27NG6PQR.js +456 -0
  8. package/dist/assets/Build/Map3d/Workers/chunk-2JVMMMWT.js +353 -0
  9. package/dist/assets/Build/Map3d/Workers/chunk-2Y2XYQCS.js +1481 -0
  10. package/dist/assets/Build/Map3d/Workers/chunk-34RF3V5G.js +220 -0
  11. package/dist/assets/Build/Map3d/Workers/chunk-35H7BYLJ.js +1800 -0
  12. package/dist/assets/Build/Map3d/Workers/chunk-57OGEF5V.js +435 -0
  13. package/dist/assets/Build/Map3d/Workers/chunk-5PX3DYJA.js +196 -0
  14. package/dist/assets/Build/Map3d/Workers/chunk-7B5XGQRN.js +171 -0
  15. package/dist/assets/Build/Map3d/Workers/chunk-ATLWOZFF.js +39 -0
  16. package/dist/assets/Build/Map3d/Workers/chunk-BMSUECTA.js +1055 -0
  17. package/dist/assets/Build/Map3d/Workers/chunk-C6IA4TKW.js +476 -0
  18. package/dist/assets/Build/Map3d/Workers/chunk-CZ44I32U.js +157 -0
  19. package/dist/assets/Build/Map3d/Workers/chunk-DE6UV44R.js +122 -0
  20. package/dist/assets/Build/Map3d/Workers/chunk-DUCCKVOG.js +834 -0
  21. package/dist/assets/Build/Map3d/Workers/chunk-EBJBPIYX.js +239 -0
  22. package/dist/assets/Build/Map3d/Workers/chunk-EYSYQ2R6.js +138 -0
  23. package/dist/assets/Build/Map3d/Workers/chunk-FMCAAUQI.js +368 -0
  24. package/dist/assets/Build/Map3d/Workers/chunk-GMYZNRRQ.js +2717 -0
  25. package/dist/assets/Build/Map3d/Workers/chunk-GWPNZZV4.js +781 -0
  26. package/dist/assets/Build/Map3d/Workers/chunk-HLP2U4KW.js +758 -0
  27. package/dist/assets/Build/Map3d/Workers/chunk-HSJSUPQV.js +500 -0
  28. package/dist/assets/Build/Map3d/Workers/chunk-I73Q3AG7.js +58 -0
  29. package/dist/assets/Build/Map3d/Workers/chunk-IMZ4YIMV.js +511 -0
  30. package/dist/assets/Build/Map3d/Workers/chunk-IZSK4DVF.js +421 -0
  31. package/dist/assets/Build/Map3d/Workers/chunk-JKLMRPKK.js +75 -0
  32. package/dist/assets/Build/Map3d/Workers/chunk-KGM345JM.js +691 -0
  33. package/dist/assets/Build/Map3d/Workers/chunk-L4IR5U4G.js +102 -0
  34. package/dist/assets/Build/Map3d/Workers/chunk-MG4EVQH2.js +44 -0
  35. package/dist/assets/Build/Map3d/Workers/chunk-NXWEFAZJ.js +300 -0
  36. package/dist/assets/Build/Map3d/Workers/chunk-PDFAJISJ.js +59 -0
  37. package/dist/assets/Build/Map3d/Workers/chunk-PHWZFJR5.js +100 -0
  38. package/dist/assets/Build/Map3d/Workers/chunk-PLE7CHBE.js +101 -0
  39. package/dist/assets/Build/Map3d/Workers/chunk-PN3GIZ5Q.js +163 -0
  40. package/dist/assets/Build/Map3d/Workers/chunk-PXL5XLHV.js +1073 -0
  41. package/dist/assets/Build/Map3d/Workers/chunk-QYXOF5JC.js +959 -0
  42. package/dist/assets/Build/Map3d/Workers/chunk-R2LIFXV3.js +115 -0
  43. package/dist/assets/Build/Map3d/Workers/chunk-R4W6IRJZ.js +10357 -0
  44. package/dist/assets/Build/Map3d/Workers/chunk-R5PZXG56.js +1258 -0
  45. package/dist/assets/Build/Map3d/Workers/chunk-RZQLZIUI.js +629 -0
  46. package/dist/assets/Build/Map3d/Workers/chunk-SIBDD6Y4.js +390 -0
  47. package/dist/assets/Build/Map3d/Workers/chunk-U5NN6JTQ.js +398 -0
  48. package/dist/assets/Build/Map3d/Workers/chunk-UA5RPPP3.js +73 -0
  49. package/dist/assets/Build/Map3d/Workers/chunk-UXLKFS3C.js +305 -0
  50. package/dist/assets/Build/Map3d/Workers/chunk-VUX4BQIM.js +37 -0
  51. package/dist/assets/Build/Map3d/Workers/chunk-WJDUUUJS.js +684 -0
  52. package/dist/assets/Build/Map3d/Workers/chunk-XBJOJHWX.js +139 -0
  53. package/dist/assets/Build/Map3d/Workers/chunk-XJDMTNKD.js +634 -0
  54. package/dist/assets/Build/Map3d/Workers/chunk-XUCXZZE5.js +963 -0
  55. package/dist/assets/Build/Map3d/Workers/chunk-YIKGVMJ5.js +287 -0
  56. package/dist/assets/Build/Map3d/Workers/chunk-YTNCIBPQ.js +262 -0
  57. package/dist/assets/Build/Map3d/Workers/chunk-ZMDUYETO.js +55 -0
  58. package/dist/assets/Build/Map3d/Workers/chunk-ZW52HXFN.js +2857 -0
  59. package/dist/esm/analyze/LineOfSightAnalysis.js +1 -326
  60. package/dist/esm/analyze/SubmergenceAnalysis.js +1 -137
  61. package/dist/esm/analyze/SunLightAnalysis.js +1 -91
  62. package/dist/esm/analyze/TerrainExcavationAnalysis.js +1 -612
  63. package/dist/esm/analyze/ViewshedAnalysis.js +1 -292
  64. package/dist/esm/cameraControl/ModelRoamHistory.js +1 -639
  65. package/dist/esm/cameraControl/ModelRoamRealTime.js +1 -874
  66. package/dist/esm/cameraControl/Roam.js +1 -418
  67. package/dist/esm/cameraControl/Rotate.js +1 -134
  68. package/dist/esm/cameraControl/RotateInPlace.js +1 -99
  69. package/dist/esm/constant.d.ts +90 -0
  70. package/dist/esm/constant.js +1 -1287
  71. package/dist/esm/deepTwins/index.js +1 -121
  72. package/dist/esm/drawCommand/index.js +1 -3
  73. package/dist/esm/drawCommand/viewShed/Event.js +1 -142
  74. package/dist/esm/drawCommand/viewShed/RectangularSensorPrimitive.js +1 -1306
  75. package/dist/esm/drawCommand/viewShed/ViewShadowPrimitive.js +1 -66
  76. package/dist/esm/drawCommand/viewShed/ViewShedAnalyserLayer.js +1 -466
  77. package/dist/esm/drawCommand/viewShed/ViewShedMap.js +1 -1238
  78. package/dist/esm/drawCommand/viewShed/config.js +1 -21
  79. package/dist/esm/drawCommand/volumeCloud/GeometryPrimitive.js +1 -89
  80. package/dist/esm/drawCommand/volumeCloud/ImprovedNoise.js +1 -112
  81. package/dist/esm/drawCommand/volumeCloud/VolumeClouds.js +1 -91
  82. package/dist/esm/drawer/algorithm.js +1 -314
  83. package/dist/esm/drawer/common.js +1 -965
  84. package/dist/esm/drawer/coordinate.js +1 -184
  85. package/dist/esm/drawer/index.d.ts +1 -1
  86. package/dist/esm/drawer/index.js +1 -688
  87. package/dist/esm/drawer/plotUtil.js +1 -266
  88. package/dist/esm/drawer/shape/Assemble.js +1 -415
  89. package/dist/esm/drawer/shape/AttackArrow.js +1 -442
  90. package/dist/esm/drawer/shape/BaseShape.js +1 -383
  91. package/dist/esm/drawer/shape/Bow.js +1 -375
  92. package/dist/esm/drawer/shape/Circle.js +1 -461
  93. package/dist/esm/drawer/shape/Curve.js +1 -386
  94. package/dist/esm/drawer/shape/DragPoint.js +1 -211
  95. package/dist/esm/drawer/shape/Elliptic.js +1 -491
  96. package/dist/esm/drawer/shape/Formation.js +1 -395
  97. package/dist/esm/drawer/shape/PincerArrow.js +1 -445
  98. package/dist/esm/drawer/shape/Point.js +1 -131
  99. package/dist/esm/drawer/shape/Polygon.js +1 -368
  100. package/dist/esm/drawer/shape/Polyline.js +1 -325
  101. package/dist/esm/drawer/shape/RegularPolygon.js +1 -468
  102. package/dist/esm/drawer/shape/RightAngleArrow.js +1 -423
  103. package/dist/esm/drawer/shape/Sector.js +1 -568
  104. package/dist/esm/drawer/shape/StraightArrow.js +1 -422
  105. package/dist/esm/drawer/shape/SwallowtailArrow.js +1 -438
  106. package/dist/esm/drawer/types.js +1 -11
  107. package/dist/esm/drawer/utils.js +1 -381
  108. package/dist/esm/global.css +22 -1
  109. package/dist/esm/graphicLayer/BaseEntity.js +1 -51
  110. package/dist/esm/graphicLayer/BaseLayer.js +1 -730
  111. package/dist/esm/graphicLayer/BasePointPrimitive.js +1 -45
  112. package/dist/esm/graphicLayer/BasePrimitive.js +1 -36
  113. package/dist/esm/graphicLayer/BasePrimitiveInstance.js +1 -37
  114. package/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
  115. package/dist/esm/graphicLayer/BaseSource.js +1 -630
  116. package/dist/esm/graphicLayer/BillboardEntity.js +1 -106
  117. package/dist/esm/graphicLayer/BillboardPrimitive.js +1 -119
  118. package/dist/esm/graphicLayer/BoxEntity.js +1 -99
  119. package/dist/esm/graphicLayer/BoxPrimitive.js +1 -48
  120. package/dist/esm/graphicLayer/BoxPrimitiveInstance.js +1 -91
  121. package/dist/esm/graphicLayer/EllipseEntity.js +1 -110
  122. package/dist/esm/graphicLayer/EllipsePrimitive.js +1 -47
  123. package/dist/esm/graphicLayer/EllipsePrimitiveInstance.js +1 -98
  124. package/dist/esm/graphicLayer/EllipsoidEntity.js +1 -118
  125. package/dist/esm/graphicLayer/EllipsoidPrimitive.js +1 -48
  126. package/dist/esm/graphicLayer/EllipsoidPrimitiveInstance.js +1 -113
  127. package/dist/esm/graphicLayer/GraphicLayerCollection.js +1 -491
  128. package/dist/esm/graphicLayer/HtmlEntity.d.ts +4 -0
  129. package/dist/esm/graphicLayer/HtmlEntity.js +1 -189
  130. package/dist/esm/graphicLayer/LabelEntity.js +1 -110
  131. package/dist/esm/graphicLayer/LabelPrimitive.js +1 -127
  132. package/dist/esm/graphicLayer/ModelEntity.js +1 -122
  133. package/dist/esm/graphicLayer/ModelPrimitive.js +1 -59
  134. package/dist/esm/graphicLayer/ModelPrimitiveInstance.js +1 -86
  135. package/dist/esm/graphicLayer/PointEntity.js +1 -94
  136. package/dist/esm/graphicLayer/PointPrimitive.js +1 -107
  137. package/dist/esm/graphicLayer/PolygonEntity.js +1 -103
  138. package/dist/esm/graphicLayer/PolygonGroundPrimitive.js +1 -49
  139. package/dist/esm/graphicLayer/PolygonGroundPrimitiveImageMaterialInstance.js +1 -87
  140. package/dist/esm/graphicLayer/PolygonPrimitive.js +1 -60
  141. package/dist/esm/graphicLayer/PolygonPrimitiveImageMaterialInstance.js +1 -84
  142. package/dist/esm/graphicLayer/PolygonPrimitiveInstance.js +1 -101
  143. package/dist/esm/graphicLayer/PolylineEntity.js +1 -96
  144. package/dist/esm/graphicLayer/PolylineGroundPrimitive.js +1 -55
  145. package/dist/esm/graphicLayer/PolylineGroundPrimitiveInstance.js +1 -85
  146. package/dist/esm/graphicLayer/PolylinePrimitive.js +1 -53
  147. package/dist/esm/graphicLayer/PolylinePrimitiveInstance.js +1 -85
  148. package/dist/esm/graphicLayer/PolylineVolumeEntity.js +1 -105
  149. package/dist/esm/graphicLayer/PolylineVolumePrimitive.js +1 -47
  150. package/dist/esm/graphicLayer/PolylineVolumePrimitiveInstance.js +1 -94
  151. package/dist/esm/graphicLayer/WallEntity.js +1 -96
  152. package/dist/esm/graphicLayer/WallPrimitive.js +1 -47
  153. package/dist/esm/graphicLayer/WallPrimitiveInstance.js +1 -88
  154. package/dist/esm/index.d.ts +4 -0
  155. package/dist/esm/index.js +1 -175
  156. package/dist/esm/lowAltitude/BarrierLayer.js +1 -172
  157. package/dist/esm/lowAltitude/BaseGridMvtLayer.js +1 -122
  158. package/dist/esm/lowAltitude/FactorLayer.js +1 -199
  159. package/dist/esm/lowAltitude/FlightPlanning.js +1 -411
  160. package/dist/esm/lowAltitude/FlightRiskEvaluation.js +1 -543
  161. package/dist/esm/lowAltitude/GridDraw.js +1 -137
  162. package/dist/esm/lowAltitude/PoiLayer.js +1 -74
  163. package/dist/esm/lowAltitude/RoutePlanning.js +1 -318
  164. package/dist/esm/lowAltitude/VisitLayer.js +1 -180
  165. package/dist/esm/map/Event.js +1 -377
  166. package/dist/esm/map/GroundSkyBox.js +1 -166
  167. package/dist/esm/map/Map.js +1 -881
  168. package/dist/esm/map/Property.js +1 -35
  169. package/dist/esm/material/AtmosphericDispersion.js +1 -569
  170. package/dist/esm/material/GlobalVolumetricCloud.js +1 -377
  171. package/dist/esm/material/VolumeCloud.js +1 -115
  172. package/dist/esm/material/WeatherEffects.js +1 -351
  173. package/dist/esm/material/entity/BaseMaterialProperty.js +1 -51
  174. package/dist/esm/material/entity/CircleWaveMaterialProperty.js +1 -101
  175. package/dist/esm/material/entity/DynamicWallMaterialProperty.js +1 -101
  176. package/dist/esm/material/entity/ImageGlowingMaterialProperty.js +1 -89
  177. package/dist/esm/material/entity/ImageMaterialProperty.js +1 -34
  178. package/dist/esm/material/entity/PolylineTrailLinkMaterialProperty.js +1 -132
  179. package/dist/esm/material/primitive/BaseMaterialAppearance.js +1 -28
  180. package/dist/esm/material/primitive/ImageGlowingMaterialAppearance.js +1 -77
  181. package/dist/esm/material/primitive/ImageMaterialAppearance.js +1 -77
  182. package/dist/esm/measure/Area.js +1 -220
  183. package/dist/esm/measure/BaseDraw.js +1 -105
  184. package/dist/esm/measure/Distance.js +1 -223
  185. package/dist/esm/measure/index.js +1 -266
  186. package/dist/esm/measure/types.js +1 -17
  187. package/dist/esm/measure/utils.js +1 -319
  188. package/dist/esm/particle/BaseParticle.js +1 -196
  189. package/dist/esm/particle/FireParticle.js +1 -65
  190. package/dist/esm/particle/FountainParticle.js +1 -80
  191. package/dist/esm/particle/SmokeParticle.js +1 -65
  192. package/dist/esm/particle/common.js +1 -23
  193. package/dist/esm/particle/index.js +1 -5
  194. package/dist/esm/property/PositionProperty.js +1 -56
  195. package/dist/esm/tileLayer/ArcGisLayer.js +1 -41
  196. package/dist/esm/tileLayer/CustomRasterClipWorkerClient.js +1 -147
  197. package/dist/esm/tileLayer/CustomRasterLayer.js +1 -1136
  198. package/dist/esm/tileLayer/ImageryLayer.js +1 -44
  199. package/dist/esm/tileLayer/MvtVectorLoad.js +1 -1549
  200. package/dist/esm/tileLayer/MvtVectorWorkerClient.js +1 -126
  201. package/dist/esm/tileLayer/RasterLayer.js +1 -23
  202. package/dist/esm/tileLayer/WmsLayer.js +1 -26
  203. package/dist/esm/tileLayer/WmtsLayer.js +1 -23
  204. package/dist/esm/tool/BuildClampedPolygonGrid.js +1 -278
  205. package/dist/esm/tool/Compass.js +1 -282
  206. package/dist/esm/tool/PrimitiveCluster.js +1 -706
  207. package/dist/esm/tool/TimerInterval.js +1 -58
  208. package/dist/esm/tool/common.js +1 -405
  209. package/dist/esm/tool/fetch.js +1 -222
  210. package/dist/esm/tool/heatmap.js +1 -631
  211. package/dist/esm/tool/utils.d.ts +1 -0
  212. package/dist/esm/tool/utils.js +1 -501
  213. package/dist/esm/toolTip/index.js +1 -79
  214. package/dist/esm/videoFusion/BaseVideo.d.ts +7 -0
  215. package/dist/esm/videoFusion/BaseVideo.js +1 -330
  216. package/dist/esm/videoFusion/VideoProject.js +1 -230
  217. package/dist/esm/videoFusion/VideoTexture.js +1 -163
  218. package/dist/esm/visualization/BaseHeatmap.js +1 -271
  219. package/dist/esm/visualization/BoundaryHighlight.d.ts +136 -0
  220. package/dist/esm/visualization/BoundaryHighlight.js +1 -0
  221. package/dist/esm/visualization/DynamicWater.js +1 -289
  222. package/dist/esm/visualization/Frustum.js +1 -248
  223. package/dist/esm/visualization/Heatmap2d.js +1 -97
  224. package/dist/esm/visualization/Heatmap3d.js +1 -281
  225. package/dist/esm/visualization/MigrationEffect.js +1 -397
  226. package/dist/esm/visualization/PointCluster.js +1 -220
  227. package/dist/esm/visualization/RadarScan.js +1 -333
  228. package/dist/esm/visualization/SampledTerrainRiver.d.ts +180 -0
  229. package/dist/esm/visualization/SampledTerrainRiver.js +1 -0
  230. package/dist/esm/visualization/SampledTerrainWater.d.ts +170 -0
  231. package/dist/esm/visualization/SampledTerrainWater.js +1 -0
  232. package/dist/esm/visualization/WindField.d.ts +72 -0
  233. package/dist/esm/visualization/WindField.js +1 -0
  234. package/dist/esm/visualization/windCore.d.ts +161 -0
  235. package/dist/esm/visualization/windCore.js +8 -0
  236. package/dist/umd/deeptwins-engine-3d.min.css +1 -1
  237. package/dist/umd/deeptwins-engine-3d.min.js +1 -1
  238. package/package.json +6 -4
@@ -1,491 +1 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
7
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
10
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
- import { flattenDeep, isArray, isString } from 'lodash';
12
- import { v4 as uuidv4 } from 'uuid';
13
- import * as utils from "../tool/utils";
14
- import BaseLayer from "./BaseLayer";
15
- import BaseSource from "./BaseSource";
16
- var GraphicLayerCollection = /*#__PURE__*/function () {
17
- function GraphicLayerCollection(mapContext) {
18
- _classCallCheck(this, GraphicLayerCollection);
19
- _defineProperty(this, "_mapContext", void 0);
20
- _defineProperty(this, "isDestroyed", false);
21
- // @ts-ignore
22
- _defineProperty(this, "graphicLayers", new Map());
23
- // @ts-ignore
24
- _defineProperty(this, "graphicSources", new Map());
25
- this._mapContext = mapContext;
26
- }
27
-
28
- // 是否能进行操作
29
- _createClass(GraphicLayerCollection, [{
30
- key: "_canOperate",
31
- value: function _canOperate() {
32
- if (this.isDestroyed) {
33
- utils.error('GraphicLayerCollection实例已销毁');
34
- return false;
35
- }
36
- return true;
37
- }
38
- }, {
39
- key: "getMap",
40
- value: function getMap() {
41
- return this._mapContext && this._mapContext.getMap();
42
- }
43
-
44
- // 添加数据
45
- }, {
46
- key: "addSource",
47
- value: function addSource(id, geoJson) {
48
- if (!this._canOperate()) {
49
- return;
50
- }
51
- var uuid = id;
52
- if (this.graphicSources.get(uuid)) {
53
- utils.warn("id".concat(uuid, "\u5DF2\u7ECF\u5B58\u5728\uFF0C\u5DF2\u81EA\u52A8\u751F\u6210\u968F\u673Aid"));
54
- uuid = uuidv4();
55
- }
56
- var source = new BaseSource({
57
- id: uuid,
58
- source: geoJson,
59
- mapContext: this._mapContext
60
- });
61
- this.graphicSources.set(source.id, source);
62
- return source;
63
- }
64
-
65
- // 直接添加自定义数据
66
- }, {
67
- key: "addCustomSource",
68
- value: function addCustomSource(id, positions) {
69
- if (!this._canOperate()) {
70
- return;
71
- }
72
- var uuid = id;
73
- if (this.graphicSources.get(uuid)) {
74
- utils.warn("id".concat(uuid, "\u5DF2\u7ECF\u5B58\u5728\uFF0C\u5DF2\u81EA\u52A8\u751F\u6210\u968F\u673Aid"));
75
- uuid = uuidv4();
76
- }
77
- var source = new BaseSource({
78
- id: uuid,
79
- customSource: positions,
80
- mapContext: this._mapContext
81
- });
82
- this.graphicSources.set(source.id, source);
83
- return source;
84
- }
85
-
86
- // 添加原始数据
87
- }, {
88
- key: "addOriginalDataToSource",
89
- value: function addOriginalDataToSource(id, positions) {
90
- if (!this._canOperate()) {
91
- return;
92
- }
93
- var uuid = id;
94
- if (this.graphicSources.get(uuid)) {
95
- utils.warn("id".concat(uuid, "\u5DF2\u7ECF\u5B58\u5728\uFF0C\u5DF2\u81EA\u52A8\u751F\u6210\u968F\u673Aid"));
96
- uuid = uuidv4();
97
- }
98
- var source = new BaseSource({
99
- id: uuid,
100
- originalData: positions,
101
- mapContext: this._mapContext
102
- });
103
- this.graphicSources.set(source.id, source);
104
- return source;
105
- }
106
-
107
- // 添加图层
108
- }, {
109
- key: "addLayer",
110
- value: function addLayer(data, options) {
111
- if (!this._canOperate()) {
112
- return;
113
- }
114
- var _ref = options || {},
115
- id = _ref.id;
116
- var uuid = id ? String(id) : uuidv4();
117
- if (this.graphicLayers.get(uuid)) {
118
- console.warn("id".concat(uuid, "\u5DF2\u7ECF\u5B58\u5728\uFF0C\u5DF2\u81EA\u52A8\u751F\u6210\u968F\u673Aid"));
119
- uuid = uuidv4();
120
- }
121
- var source = null;
122
- var sourceType = BaseSource.analysisSourceType(data);
123
- if (sourceType === 'sourceInstance') {
124
- source = data;
125
- } else if (sourceType === 'sourceId') {
126
- source = this.graphicSources.get(data);
127
- } else {
128
- source = this.addSource(uuid, data);
129
- }
130
- // 生成graphicLayer
131
- var layer = new BaseLayer({
132
- id: uuid,
133
- source: source,
134
- options: options,
135
- mapContext: this._mapContext
136
- });
137
- // 添加到地图上
138
- this._addLayerToMap(layer, options);
139
- return layer;
140
- }
141
-
142
- // 添加原始数据到图层
143
- }, {
144
- key: "addOriginalDataToLayer",
145
- value: function addOriginalDataToLayer(positions, options) {
146
- if (!this._canOperate()) {
147
- return;
148
- }
149
- var uuid = uuidv4();
150
- var source = this.addOriginalDataToSource(uuid, positions);
151
- // 生成graphicLayer
152
- var layer = new BaseLayer({
153
- id: uuid,
154
- source: source,
155
- options: options,
156
- mapContext: this._mapContext
157
- });
158
- // 添加到地图上
159
- this._addLayerToMap(layer, options);
160
- return layer;
161
- }
162
-
163
- // 添加图层自定义数据
164
- }, {
165
- key: "addCustomSourceToLayer",
166
- value: function addCustomSourceToLayer(positions, options) {
167
- if (!this._canOperate()) {
168
- return;
169
- }
170
- var uuid = uuidv4();
171
- var source = this.addCustomSource(uuid, positions);
172
- // 生成graphicLayer
173
- var layer = new BaseLayer({
174
- id: uuid,
175
- source: source,
176
- options: options,
177
- mapContext: this._mapContext
178
- });
179
- // 添加到地图上
180
- this._addLayerToMap(layer, options);
181
- return layer;
182
- }
183
-
184
- // 将layer添加到地图上
185
- }, {
186
- key: "_addLayerToMap",
187
- value: function _addLayerToMap(layer, options) {
188
- var _this = this;
189
- if (layer.isEntity) {
190
- layer.layers.forEach(function (t) {
191
- if (t.entity) {
192
- _this.getMap().entities.add(t.entity);
193
- }
194
- });
195
- } else {
196
- if (['pointP', 'billboardP', 'labelP'].includes(options.type)) {
197
- this.getMap().scene.primitives.add(layer.primitiveCollection);
198
- } else {
199
- this.getMap().scene.primitives.add(layer.primitiveCollection.primitive);
200
- }
201
- }
202
- this.graphicLayers.set(layer.id, layer);
203
- }
204
-
205
- // 删除graphicLayers上的数据
206
- }, {
207
- key: "_removeGraphicMapLayer",
208
- value: function _removeGraphicMapLayer(layerId) {
209
- if (!this._canOperate()) {
210
- return;
211
- }
212
- this.graphicLayers.delete(layerId);
213
- }
214
-
215
- // 删除graphicSources上的数据
216
- }, {
217
- key: "_removeGraphicMapSource",
218
- value: function _removeGraphicMapSource(sourceId) {
219
- if (!this._canOperate()) {
220
- return;
221
- }
222
- this.graphicSources.delete(sourceId);
223
- var graphicValues = this.graphicLayers.values();
224
- var _iterator = _createForOfIteratorHelper(graphicValues),
225
- _step;
226
- try {
227
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
228
- var value = _step.value;
229
- if (value.sourceId === sourceId) {
230
- value.remove();
231
- }
232
- }
233
- } catch (err) {
234
- _iterator.e(err);
235
- } finally {
236
- _iterator.f();
237
- }
238
- }
239
-
240
- // 清除所有graphicLayers的数据
241
- }, {
242
- key: "_clearGraphicMapLayer",
243
- value: function _clearGraphicMapLayer() {
244
- if (!this._canOperate()) {
245
- return;
246
- }
247
- this.graphicLayers.clear();
248
- }
249
-
250
- // 清除所有graphicSources上的数据
251
- }, {
252
- key: "_clearGraphicMapSource",
253
- value: function _clearGraphicMapSource() {
254
- if (!this._canOperate()) {
255
- return;
256
- }
257
- this.graphicSources.clear();
258
- }
259
-
260
- // 获取图层
261
- }, {
262
- key: "getLayer",
263
- value: function getLayer(id) {
264
- if (!this._canOperate()) {
265
- return;
266
- }
267
- return isString(id) ? this.graphicLayers.get(id) : id;
268
- }
269
-
270
- // 获取数据
271
- }, {
272
- key: "getSource",
273
- value: function getSource(id) {
274
- if (!this._canOperate()) {
275
- return;
276
- }
277
- return isString(id) ? this.graphicSources.get(id) : id;
278
- }
279
-
280
- // 显示隐藏图层
281
- }, {
282
- key: "showLayer",
283
- value: function showLayer(layer, isShow) {
284
- if (!this._canOperate()) {
285
- return;
286
- }
287
- var graphicLayer = this.getLayer(layer);
288
- if (!graphicLayer) {
289
- utils.warn('未找到对应图层');
290
- return;
291
- }
292
- graphicLayer.show(isShow);
293
- }
294
-
295
- // 移除图层
296
- }, {
297
- key: "removeLayer",
298
- value: function removeLayer(layer) {
299
- if (!this._canOperate()) {
300
- return;
301
- }
302
- var graphicLayer = this.getLayer(layer);
303
- if (!graphicLayer) {
304
- utils.warn('未找到对应图层');
305
- return;
306
- }
307
- graphicLayer.remove();
308
- }
309
-
310
- // 移除数据
311
- }, {
312
- key: "removeSource",
313
- value: function removeSource(source) {
314
- if (!this._canOperate()) {
315
- return;
316
- }
317
- var graphicSource = this.getSource(source);
318
- if (!graphicSource) {
319
- utils.warn('未找到对应的数据源');
320
- return;
321
- }
322
- graphicSource.remove();
323
- }
324
-
325
- // 清除所有图层
326
- }, {
327
- key: "clearLayer",
328
- value: function clearLayer() {
329
- if (!this._canOperate()) {
330
- return;
331
- }
332
- var graphicLayers = Array.from(this.graphicLayers.values());
333
- for (var _i = 0, _graphicLayers = graphicLayers; _i < _graphicLayers.length; _i++) {
334
- var value = _graphicLayers[_i];
335
- value.remove();
336
- }
337
- this._clearGraphicMapSource();
338
- }
339
-
340
- // 清除所有数据
341
- }, {
342
- key: "clearSource",
343
- value: function clearSource() {
344
- if (!this._canOperate()) {
345
- return;
346
- }
347
- var graphicSources = this.graphicSources.values();
348
- var _iterator2 = _createForOfIteratorHelper(graphicSources),
349
- _step2;
350
- try {
351
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
352
- var value = _step2.value;
353
- value._toDestroy();
354
- }
355
- } catch (err) {
356
- _iterator2.e(err);
357
- } finally {
358
- _iterator2.f();
359
- }
360
- this._clearGraphicMapSource();
361
- }
362
-
363
- // 更新layer的样式
364
- }, {
365
- key: "setLayerStyle",
366
- value: function setLayerStyle(layer, style) {
367
- if (!this._canOperate()) {
368
- return;
369
- }
370
- var graphicLayer = this.getLayer(layer);
371
- if (!graphicLayer) {
372
- utils.warn('未找到对应图层');
373
- return;
374
- }
375
- graphicLayer.setStyle(style);
376
- }
377
-
378
- // 更新layer的数据
379
- }, {
380
- key: "setLayerData",
381
- value: function setLayerData(layer, data) {
382
- if (!this._canOperate()) {
383
- return;
384
- }
385
- var source = null;
386
- var sourceType = BaseSource.analysisSourceType(data);
387
- if (sourceType === 'sourceInstance') {
388
- source = data;
389
- } else if (sourceType === 'sourceId') {
390
- source = this.graphicSources.get(data);
391
- } else {
392
- source = this.addSource(uuidv4(), data);
393
- }
394
- var graphicLayers = [];
395
- // 更新所有的layer
396
- if (layer === '_allLayer') {
397
- // 找出所有需要更新的layer
398
- var graphicValues = this.graphicLayers.values();
399
- var _iterator3 = _createForOfIteratorHelper(graphicValues),
400
- _step3;
401
- try {
402
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
403
- var value = _step3.value;
404
- if (value.sourceId === source.id) {
405
- graphicLayers.push(value);
406
- }
407
- }
408
- } catch (err) {
409
- _iterator3.e(err);
410
- } finally {
411
- _iterator3.f();
412
- }
413
- } else {
414
- graphicLayers.push(this.getLayer(layer));
415
- }
416
- graphicLayers.forEach(function (t) {
417
- if (t) {
418
- t.setData(source);
419
- } else {
420
- utils.warn("\u56FE\u5C42".concat(t.id, "\u4E0D\u5B58\u5728"));
421
- }
422
- });
423
- }
424
-
425
- // 更新source的数据
426
- }, {
427
- key: "setSourceData",
428
- value: function setSourceData(source, data) {
429
- if (!this._canOperate()) {
430
- return;
431
- }
432
- var graphicSource = this.getSource(source);
433
- if (!graphicSource) {
434
- utils.warn('未找到对应的数据源');
435
- return;
436
- }
437
- graphicSource.setData(data);
438
- }
439
-
440
- // 飞行至图层位置
441
- }, {
442
- key: "flyToLayer",
443
- value: function flyToLayer(layer, options) {
444
- if (!this._canOperate()) {
445
- return;
446
- }
447
- var graphicLayer = this.getLayer(layer);
448
- if (!graphicLayer) {
449
- utils.warn('未找到对应图层');
450
- return;
451
- }
452
- graphicLayer.flyTo(options);
453
- }
454
-
455
- // 飞行至多个图层位置
456
- }, {
457
- key: "flyToLayers",
458
- value: function flyToLayers(layers, options) {
459
- var _this2 = this;
460
- if (!this._canOperate()) {
461
- return;
462
- }
463
- if (isArray(layers)) {
464
- var graphicLayers = layers.map(function (layer) {
465
- return _this2.getLayer(layer);
466
- });
467
- var positions = flattenDeep(graphicLayers.map(function (t) {
468
- return t.layers.map(function (p) {
469
- return p.source.positions;
470
- });
471
- }));
472
- utils.cameraFlyToPositions(this.getMap().camera, positions, options);
473
- }
474
- }
475
-
476
- // 销毁
477
- }, {
478
- key: "destroy",
479
- value: function destroy() {
480
- if (!this._canOperate()) {
481
- return;
482
- }
483
- this.clearLayer();
484
- this.graphicLayers = new Map();
485
- this.graphicSources = new Map();
486
- this.isDestroyed = true;
487
- }
488
- }]);
489
- return GraphicLayerCollection;
490
- }();
491
- export { GraphicLayerCollection as default };
1
+ (function(_0x385fcc,_0x39ed37){var _0x2ea95c=_0x2a2c,_0x839a1a=_0x385fcc();while(!![]){try{var _0x68c3f4=parseInt(_0x2ea95c(0x1e5))/0x1*(parseInt(_0x2ea95c(0x1d0))/0x2)+-parseInt(_0x2ea95c(0x1d2))/0x3*(-parseInt(_0x2ea95c(0x1a0))/0x4)+parseInt(_0x2ea95c(0x1a8))/0x5+parseInt(_0x2ea95c(0x1a9))/0x6+-parseInt(_0x2ea95c(0x1d5))/0x7+parseInt(_0x2ea95c(0x192))/0x8+-parseInt(_0x2ea95c(0x1d6))/0x9;if(_0x68c3f4===_0x39ed37)break;else _0x839a1a['push'](_0x839a1a['shift']());}catch(_0xf77046){_0x839a1a['push'](_0x839a1a['shift']());}}}(_0x3624,0xdb0c5));function _0x3624(){var _0x2a108e=['B2jQzwn0','DgvZDa','zg9Uzq','yw5HBhLZAxntB3vYy2vuExbL','qebPDgvYyxrVCG','z3jHCgHPy0XHEwvYCW','CMvTB3zL','zMX5vg9myxLLCNm','q2fUBM90ignHBgWGysbJBgfZCYbHCYbHigz1BMn0Aw9U','Dw5KzwzPBMvK','C3LTyM9S','zNjVBq','x2nSzwfYr3jHCgHPy01HCfnVDxjJzq','BgfIzwXq','C2v0u291CMnLrgf0yq','u2v0','Cg9PBNrq','C291CMnLswq','y2XLyxjmyxLLCG','ChjVDg90ExbL','ChjPBwL0AxzLq29SBgvJDgLVBG','y29UC3rYDwn0B3i','zw50Axr5','C2HVDW','z3jHCgHPy1nVDxjJzxm','zxjYB3i','zgvSzxrL','r3jHCgHPy0XHEwvYq29SBgvJDgLVBUwUNUs+I+w3SUMuGoAVGq','BgvUz3rO','Dg9tDhjPBMC','AxrLCMf0B3i','z2v0twfW','Cg9ZAxrPB25Z','mtG1mdb1tg1ItgG','CMvTB3zLtgf5zxi','mZnJB0LnAvK','5PYQ5OM+5yIW5A+55BQu55Qe5PwW5O2U5RQq','BMv4Da','ntmWntmWwM1TCevO','mZC0ndeZnJH4sLPkyvq','y2XLyxjtB3vYy2u','BwfW','D2fYBG','5BEY57Up5A2y5zYO77Ym5BEY6iEQ5yQO55sF5OIq6zQp5PY6Awq','zM9YrwfJAa','C3rYAw5N','ChjPBwL0AxzLCW','ywrKtgf5zxi','z2v0u291CMnL','y2XLyxi','C2HVD0XHEwvY','x2fSBeXHEwvY','x2nHBK9WzxjHDgu','BMfTzq','mtnizvDMwLO','A2v5','ywrKu291CMnL','C291CMnLsw5ZDgfUy2u','mtm4mdC3nJbjs2vzwK8','y29Uy2f0','C2v0tgf5zxjtDhLSzq','x2fKzeXHEwvYvg9nyxa','ChvZAa','zgvZDhjVEq','zw51BwvYywjSzq','twfW','5lIn5A2y5zYO','z2v0tgf5zxi','y29UzMLNDxjHyMXL','DMfSDwu','CMv0DxjU','x21HCenVBNrLEhq','mtiZmJeYEgnUsxP5','zNvUy3rPB24','Axnezxn0CM95zwq','zgvMAw5LuhjVCgvYDhK','x3jLBw92zuDYyxbOAwnnyxbtB3vYy2u','ywrK','zMX5vg9myxLLCG','ywrKt3jPz2LUywXeyxrHvg9myxLLCG','nJi2mZq1nxDdq3jyDa','mtaXnZi1mtrqrfLos0y','z2v0','5PYQ5OM+5yIW5A+55BQu5zU+5Bgc','Aw5JBhvKzxm','DMfSDwvZ','C2v0'];_0x3624=function(){return _0x2a108e;};return _0x3624();}function _typeof(_0x1a4de7){'@babel/helpers - typeof';var _0x330afd=_0x2a2c;return _typeof=_0x330afd(0x1a1)==typeof Symbol&&_0x330afd(0x1b9)==typeof Symbol[_0x330afd(0x1cd)]?function(_0x229887){return typeof _0x229887;}:function(_0xa8574b){var _0x3bcfe6=_0x330afd;return _0xa8574b&&_0x3bcfe6(0x1a1)==typeof Symbol&&_0xa8574b[_0x3bcfe6(0x1c4)]===Symbol&&_0xa8574b!==Symbol[_0x3bcfe6(0x1c2)]?_0x3bcfe6(0x1b9):typeof _0xa8574b;},_typeof(_0x1a4de7);}function _createForOfIteratorHelper(_0x25fc45,_0x34ef55){var _0x228a05=_0x2a2c,_0xde1eda=typeof Symbol!==_0x228a05(0x1b8)&&_0x25fc45[Symbol[_0x228a05(0x1cd)]]||_0x25fc45[_0x228a05(0x1b3)];if(!_0xde1eda){if(Array['isArray'](_0x25fc45)||(_0xde1eda=_unsupportedIterableToArray(_0x25fc45))||_0x34ef55&&_0x25fc45&&typeof _0x25fc45[_0x228a05(0x1cb)]==='number'){if(_0xde1eda)_0x25fc45=_0xde1eda;var _0x4a5473=0x0,_0x343a84=function _0xa6a013(){};return{'s':_0x343a84,'n':function _0x392b89(){var _0x5dc29d=_0x228a05;if(_0x4a5473>=_0x25fc45[_0x5dc29d(0x1cb)])return{'done':!![]};return{'done':![],'value':_0x25fc45[_0x4a5473++]};},'e':function _0x462d66(_0x30b1d8){throw _0x30b1d8;},'f':_0x343a84};}throw new TypeError('Invalid\x20attempt\x20to\x20iterate\x20non-iterable\x20instance.\x0aIn\x20order\x20to\x20be\x20iterable,\x20non-array\x20objects\x20must\x20have\x20a\x20[Symbol.iterator]()\x20method.');}var _0x42174c=!![],_0x191189=![],_0x28b7fc;return{'s':function _0x65805f(){_0xde1eda=_0xde1eda['call'](_0x25fc45);},'n':function _0x41eb22(){var _0x25f474=_0x228a05,_0x182494=_0xde1eda[_0x25f474(0x1d4)]();return _0x42174c=_0x182494['done'],_0x182494;},'e':function _0x4791c9(_0x171de3){_0x191189=!![],_0x28b7fc=_0x171de3;},'f':function _0x4e9325(){var _0x2cb284=_0x228a05;try{if(!_0x42174c&&_0xde1eda['return']!=null)_0xde1eda[_0x2cb284(0x19e)]();}finally{if(_0x191189)throw _0x28b7fc;}}};}function _unsupportedIterableToArray(_0x2640a5,_0x1ed2b6){var _0x266af5=_0x2a2c;if(!_0x2640a5)return;if(typeof _0x2640a5===_0x266af5(0x1dc))return _arrayLikeToArray(_0x2640a5,_0x1ed2b6);var _0x334c8b=Object[_0x266af5(0x1c2)][_0x266af5(0x1cc)]['call'](_0x2640a5)['slice'](0x8,-0x1);if(_0x334c8b==='Object'&&_0x2640a5['constructor'])_0x334c8b=_0x2640a5['constructor'][_0x266af5(0x1e4)];if(_0x334c8b===_0x266af5(0x199)||_0x334c8b===_0x266af5(0x1be))return Array[_0x266af5(0x1ba)](_0x2640a5);if(_0x334c8b==='Arguments'||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[_0x266af5(0x1b0)](_0x334c8b))return _arrayLikeToArray(_0x2640a5,_0x1ed2b6);}function _arrayLikeToArray(_0x1ad007,_0x37426b){var _0x12d507=_0x2a2c;if(_0x37426b==null||_0x37426b>_0x1ad007[_0x12d507(0x1cb)])_0x37426b=_0x1ad007['length'];for(var _0x4cd828=0x0,_0x2b5f15=new Array(_0x37426b);_0x4cd828<_0x37426b;_0x4cd828++)_0x2b5f15[_0x4cd828]=_0x1ad007[_0x4cd828];return _0x2b5f15;}function _classCallCheck(_0x33e73c,_0xfd1de2){var _0x5e7fcf=_0x2a2c;if(!(_0x33e73c instanceof _0xfd1de2))throw new TypeError(_0x5e7fcf(0x1b7));}function _defineProperties(_0x225180,_0x2735a0){var _0x95a764=_0x2a2c;for(var _0x565e0a=0x0;_0x565e0a<_0x2735a0[_0x95a764(0x1cb)];_0x565e0a++){var _0x48d73e=_0x2735a0[_0x565e0a];_0x48d73e['enumerable']=_0x48d73e[_0x95a764(0x198)]||![],_0x48d73e[_0x95a764(0x19c)]=!![];if('value'in _0x48d73e)_0x48d73e['writable']=!![];Object['defineProperty'](_0x225180,_toPropertyKey(_0x48d73e[_0x95a764(0x1e6)]),_0x48d73e);}}function _createClass(_0x85777d,_0x3c3a84,_0x1d346f){var _0x470709=_0x2a2c;if(_0x3c3a84)_defineProperties(_0x85777d[_0x470709(0x1c2)],_0x3c3a84);if(_0x1d346f)_defineProperties(_0x85777d,_0x1d346f);return Object['defineProperty'](_0x85777d,_0x470709(0x1c2),{'writable':![]}),_0x85777d;}function _defineProperty(_0x559326,_0x4c2e6f,_0x453b72){var _0x4da4d9=_0x2a2c;return _0x4c2e6f=_toPropertyKey(_0x4c2e6f),_0x4c2e6f in _0x559326?Object[_0x4da4d9(0x1a3)](_0x559326,_0x4c2e6f,{'value':_0x453b72,'enumerable':!![],'configurable':!![],'writable':!![]}):_0x559326[_0x4c2e6f]=_0x453b72,_0x559326;}function _toPropertyKey(_0x2bc1df){var _0x5bb53a=_0x2a2c,_0x445d24=_toPrimitive(_0x2bc1df,_0x5bb53a(0x1dc));return _0x5bb53a(0x1b9)==_typeof(_0x445d24)?_0x445d24:String(_0x445d24);}function _toPrimitive(_0x4a5cbe,_0x12a874){var _0x23e080=_0x2a2c;if(_0x23e080(0x1af)!=_typeof(_0x4a5cbe)||!_0x4a5cbe)return _0x4a5cbe;var _0x553842=_0x4a5cbe[Symbol['toPrimitive']];if(void 0x0!==_0x553842){var _0xcf7e1b=_0x553842['call'](_0x4a5cbe,_0x12a874||'default');if(_0x23e080(0x1af)!=_typeof(_0xcf7e1b))return _0xcf7e1b;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return('string'===_0x12a874?String:Number)(_0x4a5cbe);}import{flattenDeep,isArray,isString}from'lodash';import{v4 as _0xef6acf}from'uuid';import*as _0x1340c2 from'../tool/utils';function _0x2a2c(_0x1b0b69,_0x2f92d3){_0x1b0b69=_0x1b0b69-0x190;var _0x36245a=_0x3624();var _0x2a2c95=_0x36245a[_0x1b0b69];if(_0x2a2c['meJaPV']===undefined){var _0x224f48=function(_0xc45158){var _0x1ba00a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0xef6acf='',_0x1340c2='';for(var _0x13eb14=0x0,_0x5a083c,_0x1a4de7,_0x229887=0x0;_0x1a4de7=_0xc45158['charAt'](_0x229887++);~_0x1a4de7&&(_0x5a083c=_0x13eb14%0x4?_0x5a083c*0x40+_0x1a4de7:_0x1a4de7,_0x13eb14++%0x4)?_0xef6acf+=String['fromCharCode'](0xff&_0x5a083c>>(-0x2*_0x13eb14&0x6)):0x0){_0x1a4de7=_0x1ba00a['indexOf'](_0x1a4de7);}for(var _0xa8574b=0x0,_0x25fc45=_0xef6acf['length'];_0xa8574b<_0x25fc45;_0xa8574b++){_0x1340c2+='%'+('00'+_0xef6acf['charCodeAt'](_0xa8574b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1340c2);};_0x2a2c['cJrnYI']=_0x224f48,_0x2a2c['wRhzLK']={},_0x2a2c['meJaPV']=!![];}var _0x283f45=_0x36245a[0x0],_0x434e77=_0x1b0b69+_0x283f45,_0x5c86b8=_0x2a2c['wRhzLK'][_0x434e77];return!_0x5c86b8?(_0x2a2c95=_0x2a2c['cJrnYI'](_0x2a2c95),_0x2a2c['wRhzLK'][_0x434e77]=_0x2a2c95):_0x2a2c95=_0x5c86b8,_0x2a2c95;}import _0x13eb14 from'./BaseLayer';import _0x5a083c from'./BaseSource';var GraphicLayerCollection=(function(){var _0x5e18b4=_0x2a2c;function _0x3d2530(_0x5d876f){var _0x24cf4e=_0x2a2c;_classCallCheck(this,_0x3d2530),_defineProperty(this,'_mapContext',void 0x0),_defineProperty(this,'isDestroyed',![]),_defineProperty(this,_0x24cf4e(0x1b4),new Map()),_defineProperty(this,'graphicSources',new Map()),this['_mapContext']=_0x5d876f;}return _createClass(_0x3d2530,[{'key':'_canOperate','value':function _0x466c5e(){var _0x2000d5=_0x2a2c;if(this[_0x2000d5(0x1a2)])return _0x1340c2[_0x2000d5(0x1c8)](_0x2000d5(0x1ca)),![];return!![];}},{'key':_0x5e18b4(0x1ce),'value':function _0x57aec8(){var _0x29032f=_0x5e18b4;return this[_0x29032f(0x19f)]&&this['_mapContext'][_0x29032f(0x1ce)]();}},{'key':_0x5e18b4(0x190),'value':function _0x1d02b0(_0x5441e8,_0x13d7a3){var _0x4b3bb4=_0x5e18b4;if(!this['_canOperate']())return;var _0x30fb44=_0x5441e8;this[_0x4b3bb4(0x1c7)][_0x4b3bb4(0x1aa)](_0x30fb44)&&(_0x1340c2['warn']('id'['concat'](_0x30fb44,'\u5DF2\u7ECF\u5B58\u5728\uFF0C\u5DF2\u81EA\u52A8\u751F\u6210\u968F\u673Aid')),_0x30fb44=_0xef6acf());var _0x31f6bc=new _0x5a083c({'id':_0x30fb44,'source':_0x13d7a3,'mapContext':this[_0x4b3bb4(0x19f)]});return this[_0x4b3bb4(0x1c7)][_0x4b3bb4(0x1ae)](_0x31f6bc['id'],_0x31f6bc),_0x31f6bc;}},{'key':'addCustomSource','value':function _0x496c28(_0x5a05fd,_0xdcd383){var _0x546895=_0x5e18b4;if(!this['_canOperate']())return;var _0x58de5a=_0x5a05fd;this['graphicSources'][_0x546895(0x1aa)](_0x58de5a)&&(_0x1340c2['warn']('id'['concat'](_0x58de5a,_0x546895(0x1da))),_0x58de5a=_0xef6acf());var _0x2f87c8=new _0x5a083c({'id':_0x58de5a,'customSource':_0xdcd383,'mapContext':this['_mapContext']});return this[_0x546895(0x1c7)][_0x546895(0x1ae)](_0x2f87c8['id'],_0x2f87c8),_0x2f87c8;}},{'key':'addOriginalDataToSource','value':function _0x412bb4(_0x10771a,_0x550ca7){var _0x23bde3=_0x5e18b4;if(!this['_canOperate']())return;var _0xbf7c54=_0x10771a;this[_0x23bde3(0x1c7)][_0x23bde3(0x1aa)](_0xbf7c54)&&(_0x1340c2[_0x23bde3(0x1d9)]('id'['concat'](_0xbf7c54,'\u5DF2\u7ECF\u5B58\u5728\uFF0C\u5DF2\u81EA\u52A8\u751F\u6210\u968F\u673Aid')),_0xbf7c54=_0xef6acf());var _0x3154ec=new _0x5a083c({'id':_0xbf7c54,'originalData':_0x550ca7,'mapContext':this['_mapContext']});return this['graphicSources'][_0x23bde3(0x1ae)](_0x3154ec['id'],_0x3154ec),_0x3154ec;}},{'key':_0x5e18b4(0x1de),'value':function _0xf20dc5(_0x10927b,_0x467d05){var _0x6675dd=_0x5e18b4;if(!this[_0x6675dd(0x1e3)]())return;var _0x3edc83=_0x467d05||{},_0x2a004d=_0x3edc83['id'],_0x407cc9=_0x2a004d?String(_0x2a004d):_0xef6acf();this['graphicLayers'][_0x6675dd(0x1aa)](_0x407cc9)&&(console[_0x6675dd(0x1d9)]('id'['concat'](_0x407cc9,'\u5DF2\u7ECF\u5B58\u5728\uFF0C\u5DF2\u81EA\u52A8\u751F\u6210\u968F\u673Aid')),_0x407cc9=_0xef6acf());var _0x34f91d=null,_0x37d785=_0x5a083c['analysisSourceType'](_0x10927b);if(_0x37d785===_0x6675dd(0x191))_0x34f91d=_0x10927b;else _0x37d785==='sourceId'?_0x34f91d=this['graphicSources'][_0x6675dd(0x1aa)](_0x10927b):_0x34f91d=this[_0x6675dd(0x190)](_0x407cc9,_0x10927b);var _0x391825=new _0x13eb14({'id':_0x407cc9,'source':_0x34f91d,'options':_0x467d05,'mapContext':this[_0x6675dd(0x19f)]});return this[_0x6675dd(0x195)](_0x391825,_0x467d05),_0x391825;}},{'key':_0x5e18b4(0x1a7),'value':function _0x1c2aee(_0x5d283e,_0x41beb5){var _0x536c56=_0x5e18b4;if(!this['_canOperate']())return;var _0x30ab60=_0xef6acf(),_0x2cc394=this['addOriginalDataToSource'](_0x30ab60,_0x5d283e),_0xb29643=new _0x13eb14({'id':_0x30ab60,'source':_0x2cc394,'options':_0x41beb5,'mapContext':this[_0x536c56(0x19f)]});return this[_0x536c56(0x195)](_0xb29643,_0x41beb5),_0xb29643;}},{'key':'addCustomSourceToLayer','value':function _0x1f26f4(_0xe722,_0x1ede57){var _0x4f35ce=_0x5e18b4;if(!this[_0x4f35ce(0x1e3)]())return;var _0x2b4c16=_0xef6acf(),_0x1faf6e=this['addCustomSource'](_0x2b4c16,_0xe722),_0x4ed042=new _0x13eb14({'id':_0x2b4c16,'source':_0x1faf6e,'options':_0x1ede57,'mapContext':this['_mapContext']});return this['_addLayerToMap'](_0x4ed042,_0x1ede57),_0x4ed042;}},{'key':'_addLayerToMap','value':function _0x56923d(_0x3ec967,_0x1b69cf){var _0x37db11=_0x5e18b4,_0x27f179=this;_0x3ec967['isEntity']?_0x3ec967['layers']['forEach'](function(_0x18c494){var _0x50f83c=_0x2a2c;_0x18c494[_0x50f83c(0x1c5)]&&_0x27f179['getMap']()['entities'][_0x50f83c(0x1a5)](_0x18c494['entity']);}):[_0x37db11(0x1bf),'billboardP',_0x37db11(0x1bc)][_0x37db11(0x1ac)](_0x1b69cf['type'])?this[_0x37db11(0x1ce)]()['scene'][_0x37db11(0x1dd)][_0x37db11(0x1a5)](_0x3ec967[_0x37db11(0x1c3)]):this[_0x37db11(0x1ce)]()['scene'][_0x37db11(0x1dd)][_0x37db11(0x1a5)](_0x3ec967[_0x37db11(0x1c3)]['primitive']),this['graphicLayers'][_0x37db11(0x1ae)](_0x3ec967['id'],_0x3ec967);}},{'key':'_removeGraphicMapLayer','value':function _0x4af533(_0x31d3ff){var _0x3f36ce=_0x5e18b4;if(!this['_canOperate']())return;this[_0x3f36ce(0x1b4)][_0x3f36ce(0x1c9)](_0x31d3ff);}},{'key':_0x5e18b4(0x1a4),'value':function _0x42d76d(_0xcd1ce4){var _0x33f535=_0x5e18b4;if(!this['_canOperate']())return;this['graphicSources'][_0x33f535(0x1c9)](_0xcd1ce4);var _0x101c13=this['graphicLayers'][_0x33f535(0x1ad)](),_0x58b6bb=_createForOfIteratorHelper(_0x101c13),_0x3ea5dd;try{for(_0x58b6bb['s']();!(_0x3ea5dd=_0x58b6bb['n']())[_0x33f535(0x1b1)];){var _0x14ebb2=_0x3ea5dd[_0x33f535(0x19d)];_0x14ebb2['sourceId']===_0xcd1ce4&&_0x14ebb2[_0x33f535(0x1b5)]();}}catch(_0x5ea1c8){_0x58b6bb['e'](_0x5ea1c8);}finally{_0x58b6bb['f']();}}},{'key':'_clearGraphicMapLayer','value':function _0x2125df(){if(!this['_canOperate']())return;this['graphicLayers']['clear']();}},{'key':'_clearGraphicMapSource','value':function _0x48bd3a(){var _0x5ad5e3=_0x5e18b4;if(!this[_0x5ad5e3(0x1e3)]())return;this['graphicSources'][_0x5ad5e3(0x1e0)]();}},{'key':'getLayer','value':function _0xddf0fa(_0x20b47c){var _0x5c93fd=_0x5e18b4;if(!this['_canOperate']())return;return isString(_0x20b47c)?this[_0x5c93fd(0x1b4)][_0x5c93fd(0x1aa)](_0x20b47c):_0x20b47c;}},{'key':_0x5e18b4(0x1df),'value':function _0x532e9e(_0x658311){var _0x11136d=_0x5e18b4;if(!this[_0x11136d(0x1e3)]())return;return isString(_0x658311)?this[_0x11136d(0x1c7)][_0x11136d(0x1aa)](_0x658311):_0x658311;}},{'key':_0x5e18b4(0x1e1),'value':function _0x1cf807(_0x199768,_0x28d717){var _0x483b04=_0x5e18b4;if(!this[_0x483b04(0x1e3)]())return;var _0x585c74=this['getLayer'](_0x199768);if(!_0x585c74){_0x1340c2[_0x483b04(0x1d9)]('未找到对应图层');return;}_0x585c74[_0x483b04(0x1c6)](_0x28d717);}},{'key':_0x5e18b4(0x1d1),'value':function _0x361ddf(_0x388931){var _0x3ca50b=_0x5e18b4;if(!this[_0x3ca50b(0x1e3)]())return;var _0x13dead=this[_0x3ca50b(0x19b)](_0x388931);if(!_0x13dead){_0x1340c2[_0x3ca50b(0x1d9)](_0x3ca50b(0x1ab));return;}_0x13dead['remove']();}},{'key':'removeSource','value':function _0x469a8e(_0x1b06a8){var _0x3d4cb5=_0x5e18b4;if(!this[_0x3d4cb5(0x1e3)]())return;var _0x4d7a1b=this[_0x3d4cb5(0x1df)](_0x1b06a8);if(!_0x4d7a1b){_0x1340c2[_0x3d4cb5(0x1d9)](_0x3d4cb5(0x1d3));return;}_0x4d7a1b['remove']();}},{'key':_0x5e18b4(0x1c1),'value':function _0x133933(){var _0x51ee3f=_0x5e18b4;if(!this['_canOperate']())return;var _0x40360f=Array[_0x51ee3f(0x1ba)](this[_0x51ee3f(0x1b4)]['values']());for(var _0x2e045c=0x0,_0x1c2a3b=_0x40360f;_0x2e045c<_0x1c2a3b['length'];_0x2e045c++){var _0x5be11a=_0x1c2a3b[_0x2e045c];_0x5be11a[_0x51ee3f(0x1b5)]();}this['_clearGraphicMapSource']();}},{'key':_0x5e18b4(0x1d7),'value':function _0x106b94(){var _0x3ea882=_0x5e18b4;if(!this['_canOperate']())return;var _0x42cb5b=this['graphicSources'][_0x3ea882(0x1ad)](),_0x34484a=_createForOfIteratorHelper(_0x42cb5b),_0x49f2f0;try{for(_0x34484a['s']();!(_0x49f2f0=_0x34484a['n']())[_0x3ea882(0x1b1)];){var _0x616a69=_0x49f2f0[_0x3ea882(0x19d)];_0x616a69['_toDestroy']();}}catch(_0x3e8b72){_0x34484a['e'](_0x3e8b72);}finally{_0x34484a['f']();}this[_0x3ea882(0x1bb)]();}},{'key':_0x5e18b4(0x194),'value':function _0xa2f68e(_0x574f4c,_0xdbe245){var _0x24ff35=_0x5e18b4;if(!this[_0x24ff35(0x1e3)]())return;var _0x2628bd=this['getLayer'](_0x574f4c);if(!_0x2628bd){_0x1340c2[_0x24ff35(0x1d9)](_0x24ff35(0x1ab));return;}_0x2628bd['setStyle'](_0xdbe245);}},{'key':'setLayerData','value':function _0x5baae1(_0x1c7dc9,_0xbd42bd){var _0x545c1d=_0x5e18b4;if(!this[_0x545c1d(0x1e3)]())return;var _0x239635=null,_0x3c6442=_0x5a083c[_0x545c1d(0x1b2)](_0xbd42bd);if(_0x3c6442===_0x545c1d(0x191))_0x239635=_0xbd42bd;else _0x3c6442===_0x545c1d(0x1c0)?_0x239635=this[_0x545c1d(0x1c7)][_0x545c1d(0x1aa)](_0xbd42bd):_0x239635=this['addSource'](_0xef6acf(),_0xbd42bd);var _0x4cf9a8=[];if(_0x1c7dc9===_0x545c1d(0x1e2)){var _0x24f285=this[_0x545c1d(0x1b4)]['values'](),_0x1420d4=_createForOfIteratorHelper(_0x24f285),_0x4ce109;try{for(_0x1420d4['s']();!(_0x4ce109=_0x1420d4['n']())['done'];){var _0x3fdea6=_0x4ce109[_0x545c1d(0x19d)];_0x3fdea6['sourceId']===_0x239635['id']&&_0x4cf9a8['push'](_0x3fdea6);}}catch(_0x1b39cf){_0x1420d4['e'](_0x1b39cf);}finally{_0x1420d4['f']();}}else _0x4cf9a8[_0x545c1d(0x196)](this['getLayer'](_0x1c7dc9));_0x4cf9a8[_0x545c1d(0x1db)](function(_0x38fb03){var _0x244b9c=_0x545c1d;_0x38fb03?_0x38fb03['setData'](_0x239635):_0x1340c2['warn']('\u56FE\u5C42'[_0x244b9c(0x193)](_0x38fb03['id'],_0x244b9c(0x19a)));});}},{'key':_0x5e18b4(0x1bd),'value':function _0x8d6423(_0x584152,_0x2a4345){var _0x408071=_0x5e18b4;if(!this[_0x408071(0x1e3)]())return;var _0x1ef0f5=this['getSource'](_0x584152);if(!_0x1ef0f5){_0x1340c2['warn']('未找到对应的数据源');return;}_0x1ef0f5['setData'](_0x2a4345);}},{'key':_0x5e18b4(0x1a6),'value':function _0x5d93c5(_0x5ed76f,_0x206fc8){var _0x3b2586=_0x5e18b4;if(!this[_0x3b2586(0x1e3)]())return;var _0x4a84df=this[_0x3b2586(0x19b)](_0x5ed76f);if(!_0x4a84df){_0x1340c2[_0x3b2586(0x1d9)](_0x3b2586(0x1ab));return;}_0x4a84df['flyTo'](_0x206fc8);}},{'key':_0x5e18b4(0x1b6),'value':function _0x1cbf5c(_0x1d00d0,_0x92fedb){var _0x3b28f3=_0x5e18b4,_0xa96a48=this;if(!this[_0x3b28f3(0x1e3)]())return;if(isArray(_0x1d00d0)){var _0x2d2c59=_0x1d00d0['map'](function(_0x13eb8e){return _0xa96a48['getLayer'](_0x13eb8e);}),_0x253f77=flattenDeep(_0x2d2c59[_0x3b28f3(0x1d8)](function(_0x17692f){var _0x3ab38e=_0x3b28f3;return _0x17692f['layers'][_0x3ab38e(0x1d8)](function(_0x5b01d6){var _0x554324=_0x3ab38e;return _0x5b01d6['source'][_0x554324(0x1cf)];});}));_0x1340c2['cameraFlyToPositions'](this[_0x3b28f3(0x1ce)]()['camera'],_0x253f77,_0x92fedb);}}},{'key':_0x5e18b4(0x197),'value':function _0x11d1d1(){var _0x2d3012=_0x5e18b4;if(!this[_0x2d3012(0x1e3)]())return;this['clearLayer'](),this[_0x2d3012(0x1b4)]=new Map(),this[_0x2d3012(0x1c7)]=new Map(),this[_0x2d3012(0x1a2)]=!![];}}]),_0x3d2530;}());export{GraphicLayerCollection as default};
@@ -7,6 +7,7 @@ export default class HtmlEntity extends BaseEntity {
7
7
  verticalOrigin: number;
8
8
  postDomBack: any;
9
9
  private _clampToGround;
10
+ private _scrollProxyCleanup;
10
11
  constructor(options: any);
11
12
  private _init;
12
13
  private _canOperate;
@@ -15,5 +16,8 @@ export default class HtmlEntity extends BaseEntity {
15
16
  remove(): void;
16
17
  updateStyle(style: any): void;
17
18
  private _setStyle;
19
+ private _bindScrollProxy;
20
+ private _clearScrollProxy;
21
+ private _runElementCleanups;
18
22
  updateData(data: any): void;
19
23
  }