deeptwins-engine-3d 0.1.76 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/Build/DeepTwins/Image/noise.png +0 -0
- package/dist/assets/Build/DeepTwins/Workers/CustomRasterClip.worker.js +1 -2
- package/dist/assets/Build/DeepTwins/Workers/MvtVector.worker.js +1 -1
- package/dist/assets/Build/Map3d/ThirdParty/Workers/zip-web-worker.js +640 -0
- package/dist/assets/Build/Map3d/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/dist/assets/Build/Map3d/ThirdParty/zip-module.wasm +0 -0
- package/dist/assets/Build/Map3d/Workers/chunk-27NG6PQR.js +456 -0
- package/dist/assets/Build/Map3d/Workers/chunk-2JVMMMWT.js +353 -0
- package/dist/assets/Build/Map3d/Workers/chunk-2Y2XYQCS.js +1481 -0
- package/dist/assets/Build/Map3d/Workers/chunk-34RF3V5G.js +220 -0
- package/dist/assets/Build/Map3d/Workers/chunk-35H7BYLJ.js +1800 -0
- package/dist/assets/Build/Map3d/Workers/chunk-57OGEF5V.js +435 -0
- package/dist/assets/Build/Map3d/Workers/chunk-5PX3DYJA.js +196 -0
- package/dist/assets/Build/Map3d/Workers/chunk-7B5XGQRN.js +171 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ATLWOZFF.js +39 -0
- package/dist/assets/Build/Map3d/Workers/chunk-BMSUECTA.js +1055 -0
- package/dist/assets/Build/Map3d/Workers/chunk-C6IA4TKW.js +476 -0
- package/dist/assets/Build/Map3d/Workers/chunk-CZ44I32U.js +157 -0
- package/dist/assets/Build/Map3d/Workers/chunk-DE6UV44R.js +122 -0
- package/dist/assets/Build/Map3d/Workers/chunk-DUCCKVOG.js +834 -0
- package/dist/assets/Build/Map3d/Workers/chunk-EBJBPIYX.js +239 -0
- package/dist/assets/Build/Map3d/Workers/chunk-EYSYQ2R6.js +138 -0
- package/dist/assets/Build/Map3d/Workers/chunk-FMCAAUQI.js +368 -0
- package/dist/assets/Build/Map3d/Workers/chunk-GMYZNRRQ.js +2717 -0
- package/dist/assets/Build/Map3d/Workers/chunk-GWPNZZV4.js +781 -0
- package/dist/assets/Build/Map3d/Workers/chunk-HLP2U4KW.js +758 -0
- package/dist/assets/Build/Map3d/Workers/chunk-HSJSUPQV.js +500 -0
- package/dist/assets/Build/Map3d/Workers/chunk-I73Q3AG7.js +58 -0
- package/dist/assets/Build/Map3d/Workers/chunk-IMZ4YIMV.js +511 -0
- package/dist/assets/Build/Map3d/Workers/chunk-IZSK4DVF.js +421 -0
- package/dist/assets/Build/Map3d/Workers/chunk-JKLMRPKK.js +75 -0
- package/dist/assets/Build/Map3d/Workers/chunk-KGM345JM.js +691 -0
- package/dist/assets/Build/Map3d/Workers/chunk-L4IR5U4G.js +102 -0
- package/dist/assets/Build/Map3d/Workers/chunk-MG4EVQH2.js +44 -0
- package/dist/assets/Build/Map3d/Workers/chunk-NXWEFAZJ.js +300 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PDFAJISJ.js +59 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PHWZFJR5.js +100 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PLE7CHBE.js +101 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PN3GIZ5Q.js +163 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PXL5XLHV.js +1073 -0
- package/dist/assets/Build/Map3d/Workers/chunk-QYXOF5JC.js +959 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R2LIFXV3.js +115 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R4W6IRJZ.js +10357 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R5PZXG56.js +1258 -0
- package/dist/assets/Build/Map3d/Workers/chunk-RZQLZIUI.js +629 -0
- package/dist/assets/Build/Map3d/Workers/chunk-SIBDD6Y4.js +390 -0
- package/dist/assets/Build/Map3d/Workers/chunk-U5NN6JTQ.js +398 -0
- package/dist/assets/Build/Map3d/Workers/chunk-UA5RPPP3.js +73 -0
- package/dist/assets/Build/Map3d/Workers/chunk-UXLKFS3C.js +305 -0
- package/dist/assets/Build/Map3d/Workers/chunk-VUX4BQIM.js +37 -0
- package/dist/assets/Build/Map3d/Workers/chunk-WJDUUUJS.js +684 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XBJOJHWX.js +139 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XJDMTNKD.js +634 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XUCXZZE5.js +963 -0
- package/dist/assets/Build/Map3d/Workers/chunk-YIKGVMJ5.js +287 -0
- package/dist/assets/Build/Map3d/Workers/chunk-YTNCIBPQ.js +262 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ZMDUYETO.js +55 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ZW52HXFN.js +2857 -0
- package/dist/esm/analyze/LineOfSightAnalysis.js +1 -326
- package/dist/esm/analyze/SubmergenceAnalysis.js +1 -137
- package/dist/esm/analyze/SunLightAnalysis.js +1 -91
- package/dist/esm/analyze/TerrainExcavationAnalysis.js +1 -612
- package/dist/esm/analyze/ViewshedAnalysis.js +1 -292
- package/dist/esm/cameraControl/ModelRoamHistory.js +1 -639
- package/dist/esm/cameraControl/ModelRoamRealTime.js +1 -874
- package/dist/esm/cameraControl/Roam.js +1 -418
- package/dist/esm/cameraControl/Rotate.js +1 -134
- package/dist/esm/cameraControl/RotateInPlace.js +1 -99
- package/dist/esm/constant.d.ts +90 -0
- package/dist/esm/constant.js +1 -1287
- package/dist/esm/deepTwins/index.js +1 -121
- package/dist/esm/drawCommand/index.js +1 -3
- package/dist/esm/drawCommand/viewShed/Event.js +1 -142
- package/dist/esm/drawCommand/viewShed/RectangularSensorPrimitive.js +1 -1306
- package/dist/esm/drawCommand/viewShed/ViewShadowPrimitive.js +1 -66
- package/dist/esm/drawCommand/viewShed/ViewShedAnalyserLayer.js +1 -466
- package/dist/esm/drawCommand/viewShed/ViewShedMap.js +1 -1238
- package/dist/esm/drawCommand/viewShed/config.js +1 -21
- package/dist/esm/drawCommand/volumeCloud/GeometryPrimitive.js +1 -89
- package/dist/esm/drawCommand/volumeCloud/ImprovedNoise.js +1 -112
- package/dist/esm/drawCommand/volumeCloud/VolumeClouds.js +1 -91
- package/dist/esm/drawer/algorithm.js +1 -314
- package/dist/esm/drawer/common.js +1 -965
- package/dist/esm/drawer/coordinate.js +1 -184
- package/dist/esm/drawer/index.js +1 -688
- package/dist/esm/drawer/plotUtil.js +1 -266
- package/dist/esm/drawer/shape/Assemble.js +1 -415
- package/dist/esm/drawer/shape/AttackArrow.js +1 -442
- package/dist/esm/drawer/shape/BaseShape.js +1 -383
- package/dist/esm/drawer/shape/Bow.js +1 -375
- package/dist/esm/drawer/shape/Circle.js +1 -461
- package/dist/esm/drawer/shape/Curve.js +1 -386
- package/dist/esm/drawer/shape/DragPoint.js +1 -211
- package/dist/esm/drawer/shape/Elliptic.js +1 -491
- package/dist/esm/drawer/shape/Formation.js +1 -395
- package/dist/esm/drawer/shape/PincerArrow.js +1 -445
- package/dist/esm/drawer/shape/Point.js +1 -131
- package/dist/esm/drawer/shape/Polygon.js +1 -368
- package/dist/esm/drawer/shape/Polyline.js +1 -325
- package/dist/esm/drawer/shape/RegularPolygon.js +1 -468
- package/dist/esm/drawer/shape/RightAngleArrow.js +1 -423
- package/dist/esm/drawer/shape/Sector.js +1 -568
- package/dist/esm/drawer/shape/StraightArrow.js +1 -422
- package/dist/esm/drawer/shape/SwallowtailArrow.js +1 -438
- package/dist/esm/drawer/types.js +1 -11
- package/dist/esm/drawer/utils.js +1 -381
- package/dist/esm/global.css +22 -1
- package/dist/esm/graphicLayer/BaseEntity.js +1 -51
- package/dist/esm/graphicLayer/BaseLayer.js +1 -730
- package/dist/esm/graphicLayer/BasePointPrimitive.js +1 -45
- package/dist/esm/graphicLayer/BasePrimitive.js +1 -36
- package/dist/esm/graphicLayer/BasePrimitiveInstance.js +1 -37
- package/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
- package/dist/esm/graphicLayer/BaseSource.js +1 -630
- package/dist/esm/graphicLayer/BillboardEntity.js +1 -106
- package/dist/esm/graphicLayer/BillboardPrimitive.js +1 -119
- package/dist/esm/graphicLayer/BoxEntity.js +1 -99
- package/dist/esm/graphicLayer/BoxPrimitive.js +1 -48
- package/dist/esm/graphicLayer/BoxPrimitiveInstance.js +1 -91
- package/dist/esm/graphicLayer/EllipseEntity.js +1 -110
- package/dist/esm/graphicLayer/EllipsePrimitive.js +1 -47
- package/dist/esm/graphicLayer/EllipsePrimitiveInstance.js +1 -98
- package/dist/esm/graphicLayer/EllipsoidEntity.js +1 -118
- package/dist/esm/graphicLayer/EllipsoidPrimitive.js +1 -48
- package/dist/esm/graphicLayer/EllipsoidPrimitiveInstance.js +1 -113
- package/dist/esm/graphicLayer/GraphicLayerCollection.js +1 -491
- package/dist/esm/graphicLayer/HtmlEntity.d.ts +4 -0
- package/dist/esm/graphicLayer/HtmlEntity.js +1 -189
- package/dist/esm/graphicLayer/LabelEntity.js +1 -110
- package/dist/esm/graphicLayer/LabelPrimitive.js +1 -127
- package/dist/esm/graphicLayer/ModelEntity.js +1 -122
- package/dist/esm/graphicLayer/ModelPrimitive.js +1 -59
- package/dist/esm/graphicLayer/ModelPrimitiveInstance.js +1 -86
- package/dist/esm/graphicLayer/PointEntity.js +1 -94
- package/dist/esm/graphicLayer/PointPrimitive.js +1 -107
- package/dist/esm/graphicLayer/PolygonEntity.js +1 -103
- package/dist/esm/graphicLayer/PolygonGroundPrimitive.js +1 -49
- package/dist/esm/graphicLayer/PolygonGroundPrimitiveImageMaterialInstance.js +1 -87
- package/dist/esm/graphicLayer/PolygonPrimitive.js +1 -60
- package/dist/esm/graphicLayer/PolygonPrimitiveImageMaterialInstance.js +1 -84
- package/dist/esm/graphicLayer/PolygonPrimitiveInstance.js +1 -101
- package/dist/esm/graphicLayer/PolylineEntity.js +1 -96
- package/dist/esm/graphicLayer/PolylineGroundPrimitive.js +1 -55
- package/dist/esm/graphicLayer/PolylineGroundPrimitiveInstance.js +1 -85
- package/dist/esm/graphicLayer/PolylinePrimitive.js +1 -53
- package/dist/esm/graphicLayer/PolylinePrimitiveInstance.js +1 -85
- package/dist/esm/graphicLayer/PolylineVolumeEntity.js +1 -105
- package/dist/esm/graphicLayer/PolylineVolumePrimitive.js +1 -47
- package/dist/esm/graphicLayer/PolylineVolumePrimitiveInstance.js +1 -94
- package/dist/esm/graphicLayer/WallEntity.js +1 -96
- package/dist/esm/graphicLayer/WallPrimitive.js +1 -47
- package/dist/esm/graphicLayer/WallPrimitiveInstance.js +1 -88
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +1 -175
- package/dist/esm/lowAltitude/BarrierLayer.js +1 -172
- package/dist/esm/lowAltitude/BaseGridMvtLayer.js +1 -122
- package/dist/esm/lowAltitude/FactorLayer.js +1 -199
- package/dist/esm/lowAltitude/FlightPlanning.js +1 -411
- package/dist/esm/lowAltitude/FlightRiskEvaluation.js +1 -543
- package/dist/esm/lowAltitude/GridDraw.js +1 -137
- package/dist/esm/lowAltitude/PoiLayer.js +1 -74
- package/dist/esm/lowAltitude/RoutePlanning.js +1 -318
- package/dist/esm/lowAltitude/VisitLayer.js +1 -180
- package/dist/esm/map/Event.js +1 -377
- package/dist/esm/map/GroundSkyBox.js +1 -166
- package/dist/esm/map/Map.js +1 -881
- package/dist/esm/map/Property.js +1 -35
- package/dist/esm/material/AtmosphericDispersion.js +1 -569
- package/dist/esm/material/GlobalVolumetricCloud.js +1 -377
- package/dist/esm/material/VolumeCloud.js +1 -115
- package/dist/esm/material/WeatherEffects.js +1 -351
- package/dist/esm/material/entity/BaseMaterialProperty.js +1 -51
- package/dist/esm/material/entity/CircleWaveMaterialProperty.js +1 -101
- package/dist/esm/material/entity/DynamicWallMaterialProperty.js +1 -101
- package/dist/esm/material/entity/ImageGlowingMaterialProperty.js +1 -89
- package/dist/esm/material/entity/ImageMaterialProperty.js +1 -34
- package/dist/esm/material/entity/PolylineTrailLinkMaterialProperty.js +1 -132
- package/dist/esm/material/primitive/BaseMaterialAppearance.js +1 -28
- package/dist/esm/material/primitive/ImageGlowingMaterialAppearance.js +1 -77
- package/dist/esm/material/primitive/ImageMaterialAppearance.js +1 -77
- package/dist/esm/measure/Area.js +1 -220
- package/dist/esm/measure/BaseDraw.js +1 -105
- package/dist/esm/measure/Distance.js +1 -223
- package/dist/esm/measure/index.js +1 -266
- package/dist/esm/measure/types.js +1 -17
- package/dist/esm/measure/utils.js +1 -319
- package/dist/esm/particle/BaseParticle.js +1 -196
- package/dist/esm/particle/FireParticle.js +1 -65
- package/dist/esm/particle/FountainParticle.js +1 -80
- package/dist/esm/particle/SmokeParticle.js +1 -65
- package/dist/esm/particle/common.js +1 -23
- package/dist/esm/particle/index.js +1 -5
- package/dist/esm/property/PositionProperty.js +1 -56
- package/dist/esm/tileLayer/ArcGisLayer.js +1 -41
- package/dist/esm/tileLayer/CustomRasterClipWorkerClient.js +1 -147
- package/dist/esm/tileLayer/CustomRasterLayer.js +1 -1136
- package/dist/esm/tileLayer/ImageryLayer.js +1 -44
- package/dist/esm/tileLayer/MvtVectorLoad.js +1 -1549
- package/dist/esm/tileLayer/MvtVectorWorkerClient.js +1 -126
- package/dist/esm/tileLayer/RasterLayer.js +1 -23
- package/dist/esm/tileLayer/WmsLayer.js +1 -26
- package/dist/esm/tileLayer/WmtsLayer.js +1 -23
- package/dist/esm/tool/BuildClampedPolygonGrid.js +1 -278
- package/dist/esm/tool/Compass.js +1 -282
- package/dist/esm/tool/PrimitiveCluster.js +1 -706
- package/dist/esm/tool/TimerInterval.js +1 -58
- package/dist/esm/tool/common.js +1 -405
- package/dist/esm/tool/fetch.js +1 -222
- package/dist/esm/tool/heatmap.js +1 -631
- package/dist/esm/tool/utils.d.ts +1 -0
- package/dist/esm/tool/utils.js +1 -501
- package/dist/esm/toolTip/index.js +1 -79
- package/dist/esm/videoFusion/BaseVideo.d.ts +7 -0
- package/dist/esm/videoFusion/BaseVideo.js +1 -330
- package/dist/esm/videoFusion/VideoProject.js +1 -230
- package/dist/esm/videoFusion/VideoTexture.js +1 -163
- package/dist/esm/visualization/BaseHeatmap.js +1 -271
- package/dist/esm/visualization/BoundaryHighlight.d.ts +135 -0
- package/dist/esm/visualization/BoundaryHighlight.js +1 -0
- package/dist/esm/visualization/DynamicWater.js +1 -289
- package/dist/esm/visualization/Frustum.js +1 -248
- package/dist/esm/visualization/Heatmap2d.js +1 -97
- package/dist/esm/visualization/Heatmap3d.js +1 -281
- package/dist/esm/visualization/MigrationEffect.js +1 -397
- package/dist/esm/visualization/PointCluster.js +1 -220
- package/dist/esm/visualization/RadarScan.js +1 -333
- package/dist/esm/visualization/SampledTerrainRiver.d.ts +180 -0
- package/dist/esm/visualization/SampledTerrainRiver.js +1 -0
- package/dist/esm/visualization/SampledTerrainWater.d.ts +170 -0
- package/dist/esm/visualization/SampledTerrainWater.js +1 -0
- package/dist/esm/visualization/WindField.d.ts +72 -0
- package/dist/esm/visualization/WindField.js +1 -0
- package/dist/esm/visualization/windCore.d.ts +161 -0
- package/dist/esm/visualization/windCore.js +8 -0
- package/dist/umd/deeptwins-engine-3d.min.css +1 -1
- package/dist/umd/deeptwins-engine-3d.min.js +1 -1
- package/package.json +6 -4
|
@@ -1,325 +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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
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); }
|
|
5
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
|
-
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; }
|
|
8
|
-
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
9
|
-
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
10
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
14
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
15
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
17
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18
|
-
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); } }
|
|
19
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
20
|
-
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; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
22
|
-
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); }
|
|
23
|
-
import { isNil } from 'lodash';
|
|
24
|
-
import { v4 as uuidV4 } from 'uuid';
|
|
25
|
-
import PositionProperty from "../../property/PositionProperty";
|
|
26
|
-
import * as utils from "../../tool/utils";
|
|
27
|
-
import { STATUS } from "../types";
|
|
28
|
-
import BaseShape from "./BaseShape";
|
|
29
|
-
import DragPoint from "./DragPoint";
|
|
30
|
-
|
|
31
|
-
// 创建形状线
|
|
32
|
-
export var ShapePolyline = /*#__PURE__*/function () {
|
|
33
|
-
/**
|
|
34
|
-
* 构造函数,用于创建一个线条对象
|
|
35
|
-
* @param map 地图实例对象,用于获取地图上下文
|
|
36
|
-
* @param options 配置选项对象
|
|
37
|
-
* @param options.positions 线条的坐标点数组
|
|
38
|
-
* @param options.style 线条的样式配置
|
|
39
|
-
*/
|
|
40
|
-
function ShapePolyline(map, _ref) {
|
|
41
|
-
var positions = _ref.positions,
|
|
42
|
-
style = _ref.style;
|
|
43
|
-
_classCallCheck(this, ShapePolyline);
|
|
44
|
-
_defineProperty(this, "_mapContext", void 0);
|
|
45
|
-
_defineProperty(this, "id", '');
|
|
46
|
-
_defineProperty(this, "layer", void 0);
|
|
47
|
-
_defineProperty(this, "isDestroyed", false);
|
|
48
|
-
_defineProperty(this, "_geoJson", void 0);
|
|
49
|
-
_defineProperty(this, "_style", void 0);
|
|
50
|
-
this._mapContext = map._mapContext;
|
|
51
|
-
this.id = uuidV4();
|
|
52
|
-
this._geoJson = {
|
|
53
|
-
type: 'Feature',
|
|
54
|
-
geometry: {
|
|
55
|
-
type: 'LineString',
|
|
56
|
-
coordinates: positions
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
this._style = style;
|
|
60
|
-
this._create();
|
|
61
|
-
}
|
|
62
|
-
_createClass(ShapePolyline, [{
|
|
63
|
-
key: "getMap",
|
|
64
|
-
value: function getMap() {
|
|
65
|
-
return this._mapContext && this._mapContext.getMap();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// 是否能进行操作
|
|
69
|
-
}, {
|
|
70
|
-
key: "_canOperate",
|
|
71
|
-
value: function _canOperate() {
|
|
72
|
-
if (this.isDestroyed) {
|
|
73
|
-
utils.error('ShapePolyline实例已销毁');
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
return true;
|
|
77
|
-
}
|
|
78
|
-
}, {
|
|
79
|
-
key: "_create",
|
|
80
|
-
value: function _create() {
|
|
81
|
-
if (!this._canOperate()) return;
|
|
82
|
-
this.layer = this.getMap().addGraphicLayer(this._geoJson, {
|
|
83
|
-
type: 'polyline',
|
|
84
|
-
id: this.id,
|
|
85
|
-
style: this._style,
|
|
86
|
-
positionProperty: new PositionProperty()
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// 更新
|
|
91
|
-
}, {
|
|
92
|
-
key: "update",
|
|
93
|
-
value: function update(positions) {
|
|
94
|
-
if (!this._canOperate()) return;
|
|
95
|
-
if (this.layer) {
|
|
96
|
-
this._geoJson.geometry.coordinates = positions;
|
|
97
|
-
this.layer.setData(this._geoJson);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// 销毁
|
|
102
|
-
}, {
|
|
103
|
-
key: "destroy",
|
|
104
|
-
value: function destroy() {
|
|
105
|
-
if (!this._canOperate()) return;
|
|
106
|
-
this.isDestroyed = true;
|
|
107
|
-
this.layer && this.layer.remove();
|
|
108
|
-
this.layer = null;
|
|
109
|
-
}
|
|
110
|
-
}]);
|
|
111
|
-
return ShapePolyline;
|
|
112
|
-
}();
|
|
113
|
-
var Polyline = /*#__PURE__*/function (_BaseShape) {
|
|
114
|
-
_inherits(Polyline, _BaseShape);
|
|
115
|
-
var _super = _createSuper(Polyline);
|
|
116
|
-
function Polyline(drawContext, config) {
|
|
117
|
-
var _this;
|
|
118
|
-
_classCallCheck(this, Polyline);
|
|
119
|
-
_this = _super.call(this, drawContext);
|
|
120
|
-
_defineProperty(_assertThisInitialized(_this), "type", 'polyline');
|
|
121
|
-
_defineProperty(_assertThisInitialized(_this), "shapePolylineLayer", void 0);
|
|
122
|
-
// 鼠标移动时的临时点
|
|
123
|
-
_defineProperty(_assertThisInitialized(_this), "_tempPosition", void 0);
|
|
124
|
-
_this.clampToGround = isNil(config === null || config === void 0 ? void 0 : config.clampToGround) ? _this.clampToGround : config.clampToGround;
|
|
125
|
-
_this.polylineStyle.clampToGround = _this.clampToGround;
|
|
126
|
-
return _this;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// 数据转换
|
|
130
|
-
_createClass(Polyline, [{
|
|
131
|
-
key: "transformData",
|
|
132
|
-
value: function transformData(positions) {
|
|
133
|
-
var _this2 = this;
|
|
134
|
-
this.positions = positions;
|
|
135
|
-
this.shapePolylineLayer = new ShapePolyline(this.getMap(), {
|
|
136
|
-
map: this.getMap(),
|
|
137
|
-
positions: this._getDrawPolylinePositions(),
|
|
138
|
-
style: this.polylineStyle
|
|
139
|
-
});
|
|
140
|
-
positions.forEach(function (position, index) {
|
|
141
|
-
var layer = new DragPoint(_this2.getMap(), {
|
|
142
|
-
positions: position,
|
|
143
|
-
style: _this2.pointStyle
|
|
144
|
-
});
|
|
145
|
-
layer.isStart = index === 0;
|
|
146
|
-
layer.endEdit();
|
|
147
|
-
layer.show(false);
|
|
148
|
-
_this2.dragPoints.push(layer);
|
|
149
|
-
});
|
|
150
|
-
// 存入
|
|
151
|
-
this._drawContext.setDrawerLayer(this.id, this);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// 获取绘制中的点位
|
|
155
|
-
}, {
|
|
156
|
-
key: "_getDrawPolylinePositions",
|
|
157
|
-
value: function _getDrawPolylinePositions() {
|
|
158
|
-
return this._tempPosition ? [].concat(_toConsumableArray(this.positions), [this._tempPosition]) : _toConsumableArray(this.positions);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// 添加点位
|
|
162
|
-
}, {
|
|
163
|
-
key: "addPoint",
|
|
164
|
-
value: function addPoint(position) {
|
|
165
|
-
var _this$positions;
|
|
166
|
-
var lng = position.lng,
|
|
167
|
-
lat = position.lat,
|
|
168
|
-
alt = position.alt;
|
|
169
|
-
if (!((_this$positions = this.positions) !== null && _this$positions !== void 0 && _this$positions.length)) {
|
|
170
|
-
// 创建
|
|
171
|
-
this.positions = [[lng, lat, alt]];
|
|
172
|
-
this.shapePolylineLayer = new ShapePolyline(this.getMap(), {
|
|
173
|
-
map: this.getMap(),
|
|
174
|
-
positions: this._getDrawPolylinePositions(),
|
|
175
|
-
style: this.polylineStyle
|
|
176
|
-
});
|
|
177
|
-
} else {
|
|
178
|
-
var _this$shapePolylineLa;
|
|
179
|
-
// 添加
|
|
180
|
-
this.positions.push([lng, lat, alt]);
|
|
181
|
-
(_this$shapePolylineLa = this.shapePolylineLayer) === null || _this$shapePolylineLa === void 0 || _this$shapePolylineLa.update(this._getDrawPolylinePositions());
|
|
182
|
-
}
|
|
183
|
-
// 创建拖动点位
|
|
184
|
-
this._createDragPoint(position);
|
|
185
|
-
// 绘制中
|
|
186
|
-
this.drawing(this);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// 创建拖动点位
|
|
190
|
-
}, {
|
|
191
|
-
key: "_createDragPoint",
|
|
192
|
-
value: function _createDragPoint(position) {
|
|
193
|
-
var _this$positions2;
|
|
194
|
-
var lng = position.lng,
|
|
195
|
-
lat = position.lat,
|
|
196
|
-
alt = position.alt;
|
|
197
|
-
var layer = new DragPoint(this.getMap(), {
|
|
198
|
-
positions: [lng, lat, alt],
|
|
199
|
-
style: this.pointStyle
|
|
200
|
-
});
|
|
201
|
-
layer.isStart = ((_this$positions2 = this.positions) === null || _this$positions2 === void 0 ? void 0 : _this$positions2.length) === 1;
|
|
202
|
-
this.dragPoints.push(layer);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// 删除上一个
|
|
206
|
-
}, {
|
|
207
|
-
key: "removePrev",
|
|
208
|
-
value: function removePrev() {
|
|
209
|
-
var _this$positions3, _this$positions4, _this$positions5, _this$positions6;
|
|
210
|
-
if (!((_this$positions3 = this.positions) !== null && _this$positions3 !== void 0 && _this$positions3.length)) return;
|
|
211
|
-
var i = ((_this$positions4 = this.positions) === null || _this$positions4 === void 0 ? void 0 : _this$positions4.length) - 1;
|
|
212
|
-
this.positions.splice(i, 1);
|
|
213
|
-
if (!((_this$positions5 = this.positions) !== null && _this$positions5 !== void 0 && _this$positions5.length)) {
|
|
214
|
-
var _this$shapePolylineLa2;
|
|
215
|
-
(_this$shapePolylineLa2 = this.shapePolylineLayer) === null || _this$shapePolylineLa2 === void 0 || _this$shapePolylineLa2.destroy();
|
|
216
|
-
this.shapePolylineLayer = null;
|
|
217
|
-
} else {
|
|
218
|
-
var _this$shapePolylineLa3;
|
|
219
|
-
(_this$shapePolylineLa3 = this.shapePolylineLayer) === null || _this$shapePolylineLa3 === void 0 || _this$shapePolylineLa3.update(this._getDrawPolylinePositions());
|
|
220
|
-
}
|
|
221
|
-
if (this.dragPoints[i]) {
|
|
222
|
-
this.dragPoints[i].destroy();
|
|
223
|
-
this.dragPoints.splice(i, 1);
|
|
224
|
-
}
|
|
225
|
-
// 绘制中
|
|
226
|
-
this.drawing(this);
|
|
227
|
-
this._drawContext.options.onMouseMoveChange && this._drawContext.options.onMouseMoveChange({
|
|
228
|
-
layer: this,
|
|
229
|
-
positions: this._getDrawPolylinePositions()
|
|
230
|
-
});
|
|
231
|
-
if (!((_this$positions6 = this.positions) !== null && _this$positions6 !== void 0 && _this$positions6.length)) {
|
|
232
|
-
this._drawContext._changeStatus(STATUS.START_DRAW);
|
|
233
|
-
this._drawContext._updateTooltip();
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// 更新临时点位
|
|
238
|
-
}, {
|
|
239
|
-
key: "updateTempPosition",
|
|
240
|
-
value: function updateTempPosition(position) {
|
|
241
|
-
var _this$shapePolylineLa4;
|
|
242
|
-
if (!this.shapePolylineLayer) return;
|
|
243
|
-
var lng = position.lng,
|
|
244
|
-
lat = position.lat,
|
|
245
|
-
alt = position.alt;
|
|
246
|
-
this._tempPosition = [lng, lat, alt];
|
|
247
|
-
(_this$shapePolylineLa4 = this.shapePolylineLayer) === null || _this$shapePolylineLa4 === void 0 || _this$shapePolylineLa4.update(this._getDrawPolylinePositions());
|
|
248
|
-
this._drawContext.options.onMouseMoveChange && this._drawContext.options.onMouseMoveChange({
|
|
249
|
-
layer: this,
|
|
250
|
-
positions: this._getDrawPolylinePositions()
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
// 结束绘制
|
|
255
|
-
}, {
|
|
256
|
-
key: "endDraw",
|
|
257
|
-
value: function endDraw() {
|
|
258
|
-
var _this$shapePolylineLa5;
|
|
259
|
-
if (this.positions.length < 2) return;
|
|
260
|
-
this._tempPosition = null;
|
|
261
|
-
(_this$shapePolylineLa5 = this.shapePolylineLayer) === null || _this$shapePolylineLa5 === void 0 || _this$shapePolylineLa5.update(this._getDrawPolylinePositions());
|
|
262
|
-
// 存入
|
|
263
|
-
this._drawContext.setDrawerLayer(this.id, this);
|
|
264
|
-
this.drawEnd(this);
|
|
265
|
-
this.startEdit();
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
// 开始编辑
|
|
269
|
-
}, {
|
|
270
|
-
key: "startEdit",
|
|
271
|
-
value: function startEdit() {
|
|
272
|
-
_get(_getPrototypeOf(Polyline.prototype), "startEdit", this).call(this);
|
|
273
|
-
this._startEdgeEditing();
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
// 开始鼠标拖拽
|
|
277
|
-
}, {
|
|
278
|
-
key: "mouseDragStart",
|
|
279
|
-
value: function mouseDragStart(position, dragLayer) {
|
|
280
|
-
this._handleDragStart(dragLayer);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
// 鼠标拖拽
|
|
284
|
-
}, {
|
|
285
|
-
key: "mouseDragChange",
|
|
286
|
-
value: function mouseDragChange(position) {
|
|
287
|
-
var _this$shapePolylineLa6, _this$_drawContext$op, _this$_drawContext$op2;
|
|
288
|
-
if (!this.dragging) return;
|
|
289
|
-
this.positions = this._handleDragChange(position);
|
|
290
|
-
(_this$shapePolylineLa6 = this.shapePolylineLayer) === null || _this$shapePolylineLa6 === void 0 || _this$shapePolylineLa6.update(this._getDrawPolylinePositions());
|
|
291
|
-
// 调用点位改变事件
|
|
292
|
-
((_this$_drawContext$op = this._drawContext.options) === null || _this$_drawContext$op === void 0 ? void 0 : _this$_drawContext$op.onPointsChange) && ((_this$_drawContext$op2 = this._drawContext.options) === null || _this$_drawContext$op2 === void 0 ? void 0 : _this$_drawContext$op2.onPointsChange({
|
|
293
|
-
layer: this,
|
|
294
|
-
positions: this.positions
|
|
295
|
-
}));
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
// 拖拽结束
|
|
299
|
-
}, {
|
|
300
|
-
key: "mouseDragEnd",
|
|
301
|
-
value: function mouseDragEnd() {
|
|
302
|
-
this._handleDragEnd();
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
// 结束编辑
|
|
306
|
-
}, {
|
|
307
|
-
key: "endEdit",
|
|
308
|
-
value: function endEdit(layer) {
|
|
309
|
-
var emitComplete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
310
|
-
_get(_getPrototypeOf(Polyline.prototype), "endEdit", this).call(this, layer, emitComplete);
|
|
311
|
-
this._stopEdgeEditing();
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
// 销毁
|
|
315
|
-
}, {
|
|
316
|
-
key: "destroy",
|
|
317
|
-
value: function destroy() {
|
|
318
|
-
_get(_getPrototypeOf(Polyline.prototype), "destroy", this).call(this);
|
|
319
|
-
this.shapePolylineLayer && this.shapePolylineLayer.destroy();
|
|
320
|
-
this.shapePolylineLayer = null;
|
|
321
|
-
}
|
|
322
|
-
}]);
|
|
323
|
-
return Polyline;
|
|
324
|
-
}(BaseShape);
|
|
325
|
-
export default Polyline;
|
|
1
|
+
(function(_0x322f38,_0x581025){var _0x4c3f35=_0x4a41,_0x5ee66e=_0x322f38();while(!![]){try{var _0x4ff8e1=parseInt(_0x4c3f35(0x15f))/0x1+parseInt(_0x4c3f35(0x19f))/0x2*(-parseInt(_0x4c3f35(0x17f))/0x3)+parseInt(_0x4c3f35(0x15c))/0x4*(-parseInt(_0x4c3f35(0x18e))/0x5)+parseInt(_0x4c3f35(0x14b))/0x6+parseInt(_0x4c3f35(0x184))/0x7*(parseInt(_0x4c3f35(0x146))/0x8)+-parseInt(_0x4c3f35(0x186))/0x9*(-parseInt(_0x4c3f35(0x159))/0xa)+-parseInt(_0x4c3f35(0x151))/0xb*(-parseInt(_0x4c3f35(0x18c))/0xc);if(_0x4ff8e1===_0x581025)break;else _0x5ee66e['push'](_0x5ee66e['shift']());}catch(_0x57b04b){_0x5ee66e['push'](_0x5ee66e['shift']());}}}(_0x19c8,0xbbb46));function _0x4a41(_0x2b7ff5,_0x4e5711){_0x2b7ff5=_0x2b7ff5-0x145;var _0x19c8d3=_0x19c8();var _0x4a4115=_0x19c8d3[_0x2b7ff5];if(_0x4a41['laQQCJ']===undefined){var _0x59b159=function(_0x255a8e){var _0x3e5cc4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x3caa6a='',_0x9cc2f8='';for(var _0x50354d=0x0,_0x5c0fc4,_0x4ce49a,_0x158229=0x0;_0x4ce49a=_0x255a8e['charAt'](_0x158229++);~_0x4ce49a&&(_0x5c0fc4=_0x50354d%0x4?_0x5c0fc4*0x40+_0x4ce49a:_0x4ce49a,_0x50354d++%0x4)?_0x3caa6a+=String['fromCharCode'](0xff&_0x5c0fc4>>(-0x2*_0x50354d&0x6)):0x0){_0x4ce49a=_0x3e5cc4['indexOf'](_0x4ce49a);}for(var _0x62614f=0x0,_0x158ad7=_0x3caa6a['length'];_0x62614f<_0x158ad7;_0x62614f++){_0x9cc2f8+='%'+('00'+_0x3caa6a['charCodeAt'](_0x62614f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x9cc2f8);};_0x4a41['KzHyVL']=_0x59b159,_0x4a41['Zafafl']={},_0x4a41['laQQCJ']=!![];}var _0x147f62=_0x19c8d3[0x0],_0x453d64=_0x2b7ff5+_0x147f62,_0x2258da=_0x4a41['Zafafl'][_0x453d64];return!_0x2258da?(_0x4a4115=_0x4a41['KzHyVL'](_0x4a4115),_0x4a41['Zafafl'][_0x453d64]=_0x4a4115):_0x4a4115=_0x2258da,_0x4a4115;}function _typeof(_0x158229){'@babel/helpers - typeof';var _0x310aad=_0x4a41;return _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol[_0x310aad(0x16f)]?function(_0x62614f){return typeof _0x62614f;}:function(_0x158ad7){var _0xd44b80=_0x310aad;return _0x158ad7&&'function'==typeof Symbol&&_0x158ad7[_0xd44b80(0x182)]===Symbol&&_0x158ad7!==Symbol['prototype']?'symbol':typeof _0x158ad7;},_typeof(_0x158229);}function _toConsumableArray(_0x4f5a83){return _arrayWithoutHoles(_0x4f5a83)||_iterableToArray(_0x4f5a83)||_unsupportedIterableToArray(_0x4f5a83)||_nonIterableSpread();}function _nonIterableSpread(){var _0xcf5a60=_0x4a41;throw new TypeError(_0xcf5a60(0x176));}function _unsupportedIterableToArray(_0x11161c,_0x1a760a){var _0x33cc64=_0x4a41;if(!_0x11161c)return;if(typeof _0x11161c===_0x33cc64(0x19e))return _arrayLikeToArray(_0x11161c,_0x1a760a);var _0x4d4d24=Object[_0x33cc64(0x163)]['toString']['call'](_0x11161c)['slice'](0x8,-0x1);if(_0x4d4d24===_0x33cc64(0x16c)&&_0x11161c[_0x33cc64(0x182)])_0x4d4d24=_0x11161c['constructor']['name'];if(_0x4d4d24===_0x33cc64(0x148)||_0x4d4d24===_0x33cc64(0x19c))return Array['from'](_0x11161c);if(_0x4d4d24==='Arguments'||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[_0x33cc64(0x17d)](_0x4d4d24))return _arrayLikeToArray(_0x11161c,_0x1a760a);}function _iterableToArray(_0x824b29){var _0x295953=_0x4a41;if(typeof Symbol!==_0x295953(0x14c)&&_0x824b29[Symbol['iterator']]!=null||_0x824b29['@@iterator']!=null)return Array['from'](_0x824b29);}function _arrayWithoutHoles(_0x526bfa){if(Array['isArray'](_0x526bfa))return _arrayLikeToArray(_0x526bfa);}function _arrayLikeToArray(_0x386952,_0x2f125f){var _0x4e4f03=_0x4a41;if(_0x2f125f==null||_0x2f125f>_0x386952[_0x4e4f03(0x160)])_0x2f125f=_0x386952['length'];for(var _0xd6b42e=0x0,_0x4719a1=new Array(_0x2f125f);_0xd6b42e<_0x2f125f;_0xd6b42e++)_0x4719a1[_0xd6b42e]=_0x386952[_0xd6b42e];return _0x4719a1;}function _get(){var _0x2af3b4=_0x4a41;return typeof Reflect!==_0x2af3b4(0x14c)&&Reflect['get']?_get=Reflect[_0x2af3b4(0x15e)]['bind']():_get=function _0x309080(_0xbf6d48,_0x4760b0,_0x49fcc6){var _0x53744e=_0x2af3b4,_0x2834a1=_superPropBase(_0xbf6d48,_0x4760b0);if(!_0x2834a1)return;var _0x2e8e79=Object['getOwnPropertyDescriptor'](_0x2834a1,_0x4760b0);if(_0x2e8e79['get'])return _0x2e8e79[_0x53744e(0x15e)][_0x53744e(0x16a)](arguments['length']<0x3?_0xbf6d48:_0x49fcc6);return _0x2e8e79['value'];},_get[_0x2af3b4(0x16d)](this,arguments);}function _superPropBase(_0x319779,_0x4f40be){var _0x5210a1=_0x4a41;while(!Object[_0x5210a1(0x163)][_0x5210a1(0x16e)][_0x5210a1(0x16a)](_0x319779,_0x4f40be)){_0x319779=_getPrototypeOf(_0x319779);if(_0x319779===null)break;}return _0x319779;}function _0x19c8(){var _0x3f6278=['y3jLyxrL','z2v0','mZm1nty2svjRrwjz','BgvUz3rO','Bw91C2veCMfNrw5K','B3b0Aw9UCW','ChjVDg90ExbL','x3rLBxbqB3nPDgLVBG','x3n0B3bfzgDLrwrPDgLUzW','Bw91C2veCMfNq2HHBMDL','z2v0twfW','zhjHD0vUza','u1rbuLrFrfjbvW','y2fSBa','C3rHCNrfzgL0','t2jQzwn0','yxbWBhK','AgfZt3DUuhjVCgvYDhK','AxrLCMf0B3i','AxntDgfYDa','y2XHBxbuB0DYB3vUza','Dg9qCMLTAxrPDMu','C2v0rhjHD2vYtgf5zxi','x21HCenVBNrLEhq','x2nOyw5Nzvn0yxr1CW','sw52ywXPzcbHDhrLBxb0ihrVihnWCMvHzcbUB24TAxrLCMfIBguGAw5ZDgfUy2uUcKLUig9YzgvYihrVigjLigL0zxjHyMXLlcbUB24TyxjYyxKGB2jQzwn0CYbTDxn0igHHDMuGysbBu3LTyM9SlML0zxjHDg9YxsGPig1LDgHVzc4','zgvMAw5LuhjVCgvYDhK','rMvHDhvYzq','ywX0','z2v0uhjVDg90ExbLt2y','C3bSAwnL','y29UC3rYDwn0','DgvZDa','zxjYB3i','mZq4B05ksNzw','zM9YrwfJAa','C3r5Bgu','y29UC3rYDwn0B3i','DMfSDwu','mJG5mxrOAvz1qG','DgHPCYbOyxnUj3qGyMvLBIbPBML0AwfSAxnLzcaTihn1CgvYkcKGAgfZBID0igjLzw4Gy2fSBgvK','ntrLsu1kqKe','C2v0rgf0yq','yMLUza','x2HHBMrSzurYywDfBMq','x2HHBMrSzurYywDtDgfYDa','C3LTyM9S','mtmYyvH6ve1R','zgvMyxvSDa','nvPfuffpDW','B25qB2LUDhndAgfUz2u','Bgf5zxi','zgvZDhjVEq','DxbKyxrL','y29UzMLNDxjHyMXL','zNvUy3rPB24','Axnezxn0CM95zwq','Bgf0','x3n0EwXL','B25nB3vZzu1VDMvdAgfUz2u','C2v0uhjVDg90ExbLt2y','zhjHD2LUzW','C2HHCgvqB2X5BgLUzuXHEwvY','u2v0','y29Uy2f0','C3rYAw5N','otyYnNPnCurbAq','Bg5N','u2HHCgvqB2X5BgLUzEwUNUs+I+w3SUMuGoAVGq','Cg9PBNrtDhLSzq','Cg9SEwXPBMu','zw5KrwrPDa','nJmZnNnRr0XOua','ChvZAa','twfW','x2nHBK9WzxjHDgu','x2DLDerYyxDqB2X5BgLUzvbVC2L0Aw9UCW','mJC0nZK1mNDwy2nJsq','Dw5KzwzPBMvK','Cg9SEwXPBMvtDhLSzq','x3vWzgf0zvrVB2X0Axa','x2rYyxDdB250zxH0','zhjHz1bVAw50CW','mZe2odaWCNPNAxvi','DhLWzq','x2DLB0PZB24','Bw91C2veCMfNu3rHCNq','C2HVDW','Cg9ZAxrPB25Z','B2jQzwn0','y29VCMrPBMf0zxm','nJy1nZuWzK16r2Th','C2HHBq','x2nYzwf0zq','mJaZotaZmMrJzKXNyW'];_0x19c8=function(){return _0x3f6278;};return _0x19c8();}function _inherits(_0x3ad6c6,_0x26d209){var _0x973916=_0x4a41;if(typeof _0x26d209!==_0x973916(0x194)&&_0x26d209!==null)throw new TypeError('Super\x20expression\x20must\x20either\x20be\x20null\x20or\x20a\x20function');_0x3ad6c6['prototype']=Object[_0x973916(0x15d)](_0x26d209&&_0x26d209[_0x973916(0x163)],{'constructor':{'value':_0x3ad6c6,'writable':!![],'configurable':!![]}}),Object[_0x973916(0x177)](_0x3ad6c6,'prototype',{'writable':![]});if(_0x26d209)_setPrototypeOf(_0x3ad6c6,_0x26d209);}function _setPrototypeOf(_0x4920af,_0x1c9a10){var _0x385056=_0x4a41;return _setPrototypeOf=Object['setPrototypeOf']?Object[_0x385056(0x199)][_0x385056(0x188)]():function _0x773672(_0x107216,_0x1eab5b){return _0x107216['__proto__']=_0x1eab5b,_0x107216;},_setPrototypeOf(_0x4920af,_0x1c9a10);}function _createSuper(_0x150333){var _0x48e2f1=_isNativeReflectConstruct();return function _0x58f4db(){var _0x3894b6=_0x4a41,_0x1145db=_getPrototypeOf(_0x150333),_0xe2717c;if(_0x48e2f1){var _0x516af1=_getPrototypeOf(this)['constructor'];_0xe2717c=Reflect[_0x3894b6(0x17c)](_0x1145db,arguments,_0x516af1);}else _0xe2717c=_0x1145db[_0x3894b6(0x16d)](this,arguments);return _possibleConstructorReturn(this,_0xe2717c);};}function _possibleConstructorReturn(_0x5300f5,_0xf0d2d7){var _0x43a979=_0x4a41;if(_0xf0d2d7&&(_typeof(_0xf0d2d7)===_0x43a979(0x157)||typeof _0xf0d2d7==='function'))return _0xf0d2d7;else{if(_0xf0d2d7!==void 0x0)throw new TypeError('Derived\x20constructors\x20may\x20only\x20return\x20object\x20or\x20undefined');}return _assertThisInitialized(_0x5300f5);}function _assertThisInitialized(_0x3eec7d){var _0x17953a=_0x4a41;if(_0x3eec7d===void 0x0)throw new ReferenceError(_0x17953a(0x185));return _0x3eec7d;}function _isNativeReflectConstruct(){var _0x355323=_0x4a41;if(typeof Reflect==='undefined'||!Reflect['construct'])return![];if(Reflect['construct'][_0x355323(0x15a)])return![];if(typeof Proxy===_0x355323(0x194))return!![];try{return Boolean[_0x355323(0x163)]['valueOf'][_0x355323(0x16a)](Reflect[_0x355323(0x17c)](Boolean,[],function(){})),!![];}catch(_0x1f4731){return![];}}function _getPrototypeOf(_0x20e178){var _0x4b5c64=_0x4a41;return _getPrototypeOf=Object['setPrototypeOf']?Object[_0x4b5c64(0x17a)]['bind']():function _0x45c76c(_0x188baa){return _0x188baa['__proto__']||Object['getPrototypeOf'](_0x188baa);},_getPrototypeOf(_0x20e178);}function _classCallCheck(_0x2f519c,_0x42dcba){if(!(_0x2f519c instanceof _0x42dcba))throw new TypeError('Cannot\x20call\x20a\x20class\x20as\x20a\x20function');}function _defineProperties(_0x514691,_0x46df0e){var _0x440407=_0x4a41;for(var _0x18edc4=0x0;_0x18edc4<_0x46df0e['length'];_0x18edc4++){var _0x3f166c=_0x46df0e[_0x18edc4];_0x3f166c['enumerable']=_0x3f166c['enumerable']||![],_0x3f166c[_0x440407(0x193)]=!![];if(_0x440407(0x183)in _0x3f166c)_0x3f166c['writable']=!![];Object[_0x440407(0x177)](_0x514691,_toPropertyKey(_0x3f166c['key']),_0x3f166c);}}function _createClass(_0x1f56b5,_0x1bb997,_0x23b88b){var _0x44e3ec=_0x4a41;if(_0x1bb997)_defineProperties(_0x1f56b5[_0x44e3ec(0x163)],_0x1bb997);if(_0x23b88b)_defineProperties(_0x1f56b5,_0x23b88b);return Object['defineProperty'](_0x1f56b5,'prototype',{'writable':![]}),_0x1f56b5;}function _defineProperty(_0x5e90e5,_0x4fbbdf,_0x1a6449){var _0x2cd6fc=_0x4a41;return _0x4fbbdf=_toPropertyKey(_0x4fbbdf),_0x4fbbdf in _0x5e90e5?Object[_0x2cd6fc(0x177)](_0x5e90e5,_0x4fbbdf,{'value':_0x1a6449,'enumerable':!![],'configurable':!![],'writable':!![]}):_0x5e90e5[_0x4fbbdf]=_0x1a6449,_0x5e90e5;}function _toPropertyKey(_0x2b4a5a){var _0x44aae7=_0x4a41,_0x14b08e=_toPrimitive(_0x2b4a5a,_0x44aae7(0x19e));return _0x44aae7(0x18b)==_typeof(_0x14b08e)?_0x14b08e:String(_0x14b08e);}function _toPrimitive(_0x132bbb,_0x5191af){var _0x575278=_0x4a41;if(_0x575278(0x157)!=_typeof(_0x132bbb)||!_0x132bbb)return _0x132bbb;var _0x9d3aff=_0x132bbb[Symbol[_0x575278(0x172)]];if(void 0x0!==_0x9d3aff){var _0x398c50=_0x9d3aff[_0x575278(0x16a)](_0x132bbb,_0x5191af||_0x575278(0x18d));if(_0x575278(0x157)!=_typeof(_0x398c50))return _0x398c50;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return('string'===_0x5191af?String:Number)(_0x132bbb);}import{isNil}from'lodash';import{v4 as _0x3caa6a}from'uuid';import _0x9cc2f8 from'../../property/PositionProperty';import*as _0x50354d from'../../tool/utils';import{STATUS}from'../types';import _0x5c0fc4 from'./BaseShape';import _0x4ce49a from'./DragPoint';export var ShapePolyline=(function(){var _0x2d0ea2=_0x4a41;function _0x520a4d(_0x53eb84,_0x42eeb1){var _0x5d9345=_0x4a41,_0x3b6d31=_0x42eeb1['positions'],_0x2b4dc9=_0x42eeb1[_0x5d9345(0x181)];_classCallCheck(this,_0x520a4d),_defineProperty(this,_0x5d9345(0x174),void 0x0),_defineProperty(this,'id',''),_defineProperty(this,_0x5d9345(0x190),void 0x0),_defineProperty(this,_0x5d9345(0x195),![]),_defineProperty(this,_0x5d9345(0x153),void 0x0),_defineProperty(this,'_style',void 0x0),this[_0x5d9345(0x174)]=_0x53eb84[_0x5d9345(0x174)],this['id']=_0x3caa6a(),this['_geoJson']={'type':_0x5d9345(0x178),'geometry':{'type':'LineString','coordinates':_0x3b6d31}},this['_style']=_0x2b4dc9,this['_create']();}return _createClass(_0x520a4d,[{'key':_0x2d0ea2(0x167),'value':function _0x55031d(){var _0x122cfc=_0x2d0ea2;return this[_0x122cfc(0x174)]&&this[_0x122cfc(0x174)][_0x122cfc(0x167)]();}},{'key':_0x2d0ea2(0x149),'value':function _0x291287(){var _0x83b282=_0x2d0ea2;if(this[_0x83b282(0x195)])return _0x50354d[_0x83b282(0x17e)](_0x83b282(0x1a1)),![];return!![];}},{'key':_0x2d0ea2(0x15b),'value':function _0x128abf(){var _0x384580=_0x2d0ea2;if(!this['_canOperate']())return;this[_0x384580(0x190)]=this['getMap']()['addGraphicLayer'](this['_geoJson'],{'type':_0x384580(0x1a3),'id':this['id'],'style':this[_0x384580(0x197)],'positionProperty':new _0x9cc2f8()});}},{'key':'update','value':function _0x282db2(_0x5322b1){var _0x394aae=_0x2d0ea2;if(!this[_0x394aae(0x149)]())return;this[_0x394aae(0x190)]&&(this[_0x394aae(0x153)]['geometry'][_0x394aae(0x158)]=_0x5322b1,this['layer'][_0x394aae(0x187)](this[_0x394aae(0x153)]));}},{'key':_0x2d0ea2(0x191),'value':function _0x206e76(){var _0x45aa92=_0x2d0ea2;if(!this['_canOperate']())return;this['isDestroyed']=!![],this[_0x45aa92(0x190)]&&this['layer']['remove'](),this['layer']=null;}}]),_0x520a4d;}());var Polyline=function(_0x12206e){var _0x134a46=_0x4a41;_inherits(_0x4375f0,_0x12206e);var _0x398858=_createSuper(_0x4375f0);function _0x4375f0(_0xce2e87,_0xd3ca6c){var _0x4e76c6=_0x4a41,_0x11188d;return _classCallCheck(this,_0x4375f0),_0x11188d=_0x398858['call'](this,_0xce2e87),_defineProperty(_assertThisInitialized(_0x11188d),_0x4e76c6(0x152),_0x4e76c6(0x1a3)),_defineProperty(_assertThisInitialized(_0x11188d),_0x4e76c6(0x19b),void 0x0),_defineProperty(_assertThisInitialized(_0x11188d),_0x4e76c6(0x164),void 0x0),_0x11188d['clampToGround']=isNil(_0xd3ca6c===null||_0xd3ca6c===void 0x0?void 0x0:_0xd3ca6c['clampToGround'])?_0x11188d['clampToGround']:_0xd3ca6c['clampToGround'],_0x11188d[_0x4e76c6(0x14d)][_0x4e76c6(0x171)]=_0x11188d['clampToGround'],_0x11188d;}return _createClass(_0x4375f0,[{'key':'transformData','value':function _0x565129(_0x1c8660){var _0x559438=_0x4a41,_0x23b40a=this;this[_0x559438(0x156)]=_0x1c8660,this['shapePolylineLayer']=new ShapePolyline(this[_0x559438(0x167)](),{'map':this['getMap'](),'positions':this['_getDrawPolylinePositions'](),'style':this['polylineStyle']}),_0x1c8660[_0x559438(0x180)](function(_0x3d6b4b,_0x44494c){var _0x5204ce=_0x559438,_0x47e903=new _0x4ce49a(_0x23b40a['getMap'](),{'positions':_0x3d6b4b,'style':_0x23b40a[_0x5204ce(0x1a2)]});_0x47e903[_0x5204ce(0x170)]=_0x44494c===0x0,_0x47e903[_0x5204ce(0x145)](),_0x47e903[_0x5204ce(0x155)](![]),_0x23b40a['dragPoints'][_0x5204ce(0x147)](_0x47e903);}),this['_drawContext'][_0x559438(0x173)](this['id'],this);}},{'key':_0x134a46(0x14a),'value':function _0x193085(){var _0x189c54=_0x134a46;return this[_0x189c54(0x164)]?[][_0x189c54(0x19d)](_toConsumableArray(this['positions']),[this[_0x189c54(0x164)]]):_toConsumableArray(this['positions']);}},{'key':'addPoint','value':function _0x20d280(_0x342def){var _0x531824=_0x134a46,_0xe4aedf,_0x37f5f0=_0x342def[_0x531824(0x1a0)],_0x205bcc=_0x342def['lat'],_0x409b53=_0x342def[_0x531824(0x179)];if(!((_0xe4aedf=this['positions'])!==null&&_0xe4aedf!==void 0x0&&_0xe4aedf['length']))this['positions']=[[_0x37f5f0,_0x205bcc,_0x409b53]],this['shapePolylineLayer']=new ShapePolyline(this['getMap'](),{'map':this[_0x531824(0x167)](),'positions':this['_getDrawPolylinePositions'](),'style':this['polylineStyle']});else{var _0x55e957;this['positions']['push']([_0x37f5f0,_0x205bcc,_0x409b53]),(_0x55e957=this[_0x531824(0x19b)])===null||_0x55e957===void 0x0||_0x55e957['update'](this['_getDrawPolylinePositions']());}this['_createDragPoint'](_0x342def),this['drawing'](this);}},{'key':'_createDragPoint','value':function _0x1a9a09(_0x451eb7){var _0x40874f=_0x134a46,_0x4e9107,_0x40d697=_0x451eb7['lng'],_0x37e8d3=_0x451eb7['lat'],_0x20dec2=_0x451eb7['alt'],_0x237601=new _0x4ce49a(this[_0x40874f(0x167)](),{'positions':[_0x40d697,_0x37e8d3,_0x20dec2],'style':this['pointStyle']});_0x237601[_0x40874f(0x170)]=((_0x4e9107=this[_0x40874f(0x156)])===null||_0x4e9107===void 0x0?void 0x0:_0x4e9107[_0x40874f(0x160)])===0x1,this[_0x40874f(0x150)][_0x40874f(0x147)](_0x237601);}},{'key':'removePrev','value':function _0x4ef63b(){var _0x58d708=_0x134a46,_0xbea766,_0x3b8c94,_0xc7ff0c,_0x886bbc;if(!((_0xbea766=this[_0x58d708(0x156)])!==null&&_0xbea766!==void 0x0&&_0xbea766[_0x58d708(0x160)]))return;var _0x3364b9=((_0x3b8c94=this[_0x58d708(0x156)])===null||_0x3b8c94===void 0x0?void 0x0:_0x3b8c94['length'])-0x1;this['positions']['splice'](_0x3364b9,0x1);if(!((_0xc7ff0c=this['positions'])!==null&&_0xc7ff0c!==void 0x0&&_0xc7ff0c[_0x58d708(0x160)])){var _0xd21304;(_0xd21304=this['shapePolylineLayer'])===null||_0xd21304===void 0x0||_0xd21304['destroy'](),this[_0x58d708(0x19b)]=null;}else{var _0x557a6a;(_0x557a6a=this['shapePolylineLayer'])===null||_0x557a6a===void 0x0||_0x557a6a[_0x58d708(0x192)](this[_0x58d708(0x14a)]());}this['dragPoints'][_0x3364b9]&&(this['dragPoints'][_0x3364b9][_0x58d708(0x191)](),this['dragPoints'][_0x58d708(0x17b)](_0x3364b9,0x1)),this[_0x58d708(0x19a)](this),this[_0x58d708(0x14f)]['options'][_0x58d708(0x198)]&&this['_drawContext']['options']['onMouseMoveChange']({'layer':this,'positions':this[_0x58d708(0x14a)]()}),!((_0x886bbc=this['positions'])!==null&&_0x886bbc!==void 0x0&&_0x886bbc[_0x58d708(0x160)])&&(this['_drawContext'][_0x58d708(0x175)](STATUS[_0x58d708(0x169)]),this['_drawContext'][_0x58d708(0x14e)]());}},{'key':'updateTempPosition','value':function _0x370cc1(_0x5a7d41){var _0x2f282a=_0x134a46,_0x59f744;if(!this[_0x2f282a(0x19b)])return;var _0x30e351=_0x5a7d41[_0x2f282a(0x1a0)],_0x5046fb=_0x5a7d41[_0x2f282a(0x196)],_0x4c7471=_0x5a7d41[_0x2f282a(0x179)];this[_0x2f282a(0x164)]=[_0x30e351,_0x5046fb,_0x4c7471],(_0x59f744=this['shapePolylineLayer'])===null||_0x59f744===void 0x0||_0x59f744['update'](this[_0x2f282a(0x14a)]()),this['_drawContext']['options'][_0x2f282a(0x198)]&&this[_0x2f282a(0x14f)][_0x2f282a(0x162)]['onMouseMoveChange']({'layer':this,'positions':this[_0x2f282a(0x14a)]()});}},{'key':'endDraw','value':function _0xf204a0(){var _0x3b4408=_0x134a46,_0x521938;if(this[_0x3b4408(0x156)]['length']<0x2)return;this[_0x3b4408(0x164)]=null,(_0x521938=this[_0x3b4408(0x19b)])===null||_0x521938===void 0x0||_0x521938['update'](this[_0x3b4408(0x14a)]()),this['_drawContext'][_0x3b4408(0x173)](this['id'],this),this[_0x3b4408(0x168)](this),this['startEdit']();}},{'key':_0x134a46(0x16b),'value':function _0x13ed9e(){var _0x2e0b5a=_0x134a46;_get(_getPrototypeOf(_0x4375f0[_0x2e0b5a(0x163)]),'startEdit',this)[_0x2e0b5a(0x16a)](this),this['_startEdgeEditing']();}},{'key':_0x134a46(0x154),'value':function _0x152a8f(_0x2b086f,_0x8602f8){var _0x208f65=_0x134a46;this[_0x208f65(0x18a)](_0x8602f8);}},{'key':_0x134a46(0x166),'value':function _0x366215(_0x544e49){var _0x522fe1=_0x134a46,_0x1be01d,_0x5b399b,_0x46b1c5;if(!this['dragging'])return;this['positions']=this['_handleDragChange'](_0x544e49),(_0x1be01d=this[_0x522fe1(0x19b)])===null||_0x1be01d===void 0x0||_0x1be01d[_0x522fe1(0x192)](this[_0x522fe1(0x14a)]()),((_0x5b399b=this['_drawContext']['options'])===null||_0x5b399b===void 0x0?void 0x0:_0x5b399b[_0x522fe1(0x18f)])&&((_0x46b1c5=this[_0x522fe1(0x14f)][_0x522fe1(0x162)])===null||_0x46b1c5===void 0x0?void 0x0:_0x46b1c5[_0x522fe1(0x18f)]({'layer':this,'positions':this['positions']}));}},{'key':_0x134a46(0x161),'value':function _0x31d1b9(){var _0x582baf=_0x134a46;this[_0x582baf(0x189)]();}},{'key':'endEdit','value':function _0x159aab(_0x383c7f){var _0x2ea9c2=_0x134a46,_0x6c3323=arguments['length']>0x1&&arguments[0x1]!==undefined?arguments[0x1]:!![];_get(_getPrototypeOf(_0x4375f0[_0x2ea9c2(0x163)]),_0x2ea9c2(0x145),this)['call'](this,_0x383c7f,_0x6c3323),this[_0x2ea9c2(0x165)]();}},{'key':'destroy','value':function _0x4a0a5e(){var _0x33a684=_0x134a46;_get(_getPrototypeOf(_0x4375f0[_0x33a684(0x163)]),'destroy',this)['call'](this),this['shapePolylineLayer']&&this[_0x33a684(0x19b)][_0x33a684(0x191)](),this[_0x33a684(0x19b)]=null;}}]),_0x4375f0;}(_0x5c0fc4);export default Polyline;
|