easy-three-utils 0.0.360 → 0.0.362

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.
@@ -34,6 +34,10 @@ export interface GraphicStyleOptions {
34
34
  serifColor?: string;
35
35
  serifDirect?: number;
36
36
  serifWidth?: number;
37
+ lockZoom?: boolean;
38
+ width?: number;
39
+ height?: number;
40
+ scale?: number;
37
41
  label?: {
38
42
  text: string;
39
43
  }
@@ -93,12 +97,18 @@ export interface Plot {
93
97
  /** 获取图层配置 */
94
98
  getGraphicLayerOptions(): GraphicLayerOptions;
95
99
 
96
- /** 获取当前矢量配置 */
100
+ /** 获取当前点击激活的矢量配置 */
97
101
  getGraphicOptions(): GraphicOptions;
98
102
 
99
- /** 设置当前矢量配置 */
103
+ /** 根据id获取矢量配置 */
104
+ getGraphicOptionsById(id: string): GraphicOptions;
105
+
106
+ /** 设置当前点击激活的矢量配置 */
100
107
  setGraphicOptions(options: GraphicOptions): void;
101
108
 
109
+ /** 根据id设置矢量配置 */
110
+ setGraphicOptionsById(id: string, options: GraphicOptions): void;
111
+
102
112
  /** 闪烁效果 */
103
113
  flashEffect(graphic: Record<'options', GraphicOptions>, interval: number, totalNum: number): void;
104
114
 
@@ -129,6 +139,12 @@ export interface Plot {
129
139
 
130
140
  /** 保存并退出时序编辑 */
131
141
  saveAndExitEditTiming(): void;
142
+
143
+ /** 根据id设置点位类型军标速度 */
144
+ setPointPlotSpeedById(id: string, options: {
145
+ status: boolean;
146
+ speed: number;
147
+ }): void;
132
148
  }
133
149
 
134
150
  /** 工具工厂函数 */
@@ -1 +1,536 @@
1
- var _0xodM='jsjiami.com.v7';(function(_0x370327,_0x5c53bc,_0x2d3a40,_0x206541,_0x763234,_0x4df55a,_0x1bce91){return _0x370327=_0x370327>>0x7,_0x4df55a='hs',_0x1bce91='hs',function(_0x470f26,_0x3ff45b,_0x1e2657,_0x40f29e,_0x57ba9d){const _0x5b3bd9=_0x35b3;_0x40f29e='tfi',_0x4df55a=_0x40f29e+_0x4df55a,_0x57ba9d='up',_0x1bce91+=_0x57ba9d,_0x4df55a=_0x1e2657(_0x4df55a),_0x1bce91=_0x1e2657(_0x1bce91),_0x1e2657=0x0;const _0x371842=_0x470f26();while(!![]&&--_0x206541+_0x3ff45b){try{_0x40f29e=parseInt(_0x5b3bd9(0x2fa,'y^DK'))/0x1+-parseInt(_0x5b3bd9(0x27d,'C5$^'))/0x2+-parseInt(_0x5b3bd9(0x2d0,'ja%x'))/0x3+parseInt(_0x5b3bd9(0x271,'R3C7'))/0x4+parseInt(_0x5b3bd9(0x2df,'uJt9'))/0x5*(parseInt(_0x5b3bd9(0x254,'*(t^'))/0x6)+-parseInt(_0x5b3bd9(0x26a,'OW$s'))/0x7*(-parseInt(_0x5b3bd9(0x22f,'F]!w'))/0x8)+-parseInt(_0x5b3bd9(0x1ea,'4%ve'))/0x9;}catch(_0x341723){_0x40f29e=_0x1e2657;}finally{_0x57ba9d=_0x371842[_0x4df55a]();if(_0x370327<=_0x206541)_0x1e2657?_0x763234?_0x40f29e=_0x57ba9d:_0x763234=_0x57ba9d:_0x1e2657=_0x57ba9d;else{if(_0x1e2657==_0x763234['replace'](/[DKePwYUITGXLkyJRnV=]/g,'')){if(_0x40f29e===_0x3ff45b){_0x371842['un'+_0x4df55a](_0x57ba9d);break;}_0x371842[_0x1bce91](_0x57ba9d);}}}}}(_0x2d3a40,_0x5c53bc,function(_0x24db9e,_0x34325f,_0x3c7106,_0x3b6a01,_0x2ec30d,_0x1e17f3,_0x240c9e){return _0x34325f='\x73\x70\x6c\x69\x74',_0x24db9e=arguments[0x0],_0x24db9e=_0x24db9e[_0x34325f](''),_0x3c7106='\x72\x65\x76\x65\x72\x73\x65',_0x24db9e=_0x24db9e[_0x3c7106]('\x76'),_0x3b6a01='\x6a\x6f\x69\x6e',(0x1be4ff,_0x24db9e[_0x3b6a01](''));});}(0x6180,0x5ec26,_0x3218,0xc5),_0x3218)&&(_0xodM=0x154);function _0x3218(){const _0x3054ff=(function(){return[_0xodM,'yIjRDskDjVRwinaGmywiTX.GcYoJPme.vL7eeKyU==','WOtdM8oBqCob','WQO1BttdSG','WQRdOL9BWOi','AtVcSSoSW7u','WOVdLv4+W60','Dmo5W5BcLGOvgqjD','W6BdN8kKWRVcVmkWWQNdPmoIW68ze8kf','5BY45yMc5Rgz5P2n5Qk95Rcx5lIZ5l+o5PsI5OY0772c5PsW6z6F5l255AYo7760','pIlcPmoeW5G','b27cIZddS8krWQZdVIOvka','jmkMW5rhpcS','u8kal8kIna','W4/dUmoNoq','fmoVWOKNW4tdMc8','fKBcN8oqsa','WR4LzdZdUG','xZ7cQ8oLW4q','WOtdKdex','WQpdOMFcISoxWOO','W5/cMSkJs8kIpq','hJRcUmk0','pbVcKSkvWRy','WQhdHsOikG','WPpdH8ozz8oJ','cmoCW7VcUxO','WQb/cCkRW6DxpdKlW53cHHKLvW','WORdP8omxSoaWOu','WQpdQJyZcq','W4mbarOpACoL','emoeC8oI','pmoSW7RcLXlcOG','i8kzo8orWQ0','W5umWPvAWQi','v8kJW4yiWOJdTZ7dQL8tpCkd','W6xcSWqtW63dPa7dUa','fgVcRSobyW','hmklb8oQ','kZNcRSkYWRxdU1n9W5y','WPeXqdldVG','sdJcLJhcKa','W60AWRbyWPa','WPJdHhGgW5lcNtC','WPvWnG4G','jSkpgSoVWRBdVmkQ','B8kIomk9fmkZWRiwW7edyfBdS8oA','W7uQsCozWQuoDbCxW7lcIq0H','W4babGLrmCkXWQXKqu7cQSkQWO1UuguTW686W6RcIcZcR8keWOmpBSkVWRddOuRdV8o+kti','wZFcTSobW50dbduDofWBWR81','WRVcOSo8pCoKt8oV','WQlcTeNcSY4','WRFdIYO+lNaw','W4dcMmk9ySkL','W70lnXie','WODuW5SJrW','AEAvUos6MoEZVEwDKUEyLUAwQEAnRE+8HW','WOpdRq1yWOtdQWdcVvxcPCo+WQJdKCkxgCo3xWpcOmkYWPpcQCowWRRcIxBdLSoHidyglZBdLLHD','WRjZnSkBW7S','WOdcTSkOW7/cHXaZrtFdSq','Dmo5W4xcJra2aGvt','d3/dJKFdMgBdRLK7E2eHWP0','W6tcKSkYW4dcT1yK','5Qkl57QSW6XiWRlcV18','WRRdRf0','WRjrCZa7','cSosW6hcVuLJW6X7ca','gComW6lcLvO','i2dcL8o3','rHPyW6ldSG','W6WWkbGI','W4JcMCkmECkF','WP/dVCosuG','ndeUW5i','W5pcI8kaWQeaWOlcN8kwWPhdRG','WPhcVCk/W5hcGrGSqY0','ittcHmoDW6GQhHrlWQFcNG','CCkJnSk9','W6RdPmoKoW4','WRddQfNcNSoQWQukBxTAgCoeW7rn','W5JdHwNdL8knWPFdKmoJvCov','WRdcJSoLW4xdV8oOW6ZdGCoGW5W/kCkQW4y','W5ZdLYmPCMOvW51BWQf4','W4/dMZOl','nmoAWQWXW6S','WQFcHmoIW6VdUCoGW7pdH8o6','WPxcVCkgW6VcUJ8','W7BdVHlcQrmVW7CqWRO','j8oZW4tcRtlcGSoA','gWeiW64/','ymooimo7','WORdSmoBE8ogWPiiWQG','W49/ohFcOCk2','aIRcL8o4W6yWpq','WOhdPSoeW6pdRq','nwPJW6K','hI7cKCo4W6C5jX1B','WOLelWi','WQbdCdKWW7bzbJpdLs8GWPRdRSkfWOldOG','WPdcRmovW6tdIG','WQxdIXiOaf0'].concat((function(){return['scdcO8oOW5WegY8zch0dWPO0','5RgM5PYt6i+k5yY65yQL55+u6yAd772q','ghVcII3dLmkyWQhdVsS','W5ldUWtcRGav','WQmFfSoqlJGfkCk3','WPJdVmoqqa','WQZcOSkOW6FcUG','jh3cImo7AIdcRuJdKW','cCo/WPfAW7pcNttdJa','eYyhW4y4W6dcNa','WOBcOmkTW4JcNrGG','dSknd8o2WRhdU8k6t2CCiYq','WQpcT1/cVtG','jhT0W4y3W67dUMxdJYq','iv/cTmobua','5Rga5P+B6i275y2U5yUf556t6yAm77YS','EmospSo5W6ZdUG','WQbxiXCgW57cGsddOmkGWQddGW','aCo4WOu4W5RdLa','WOOEuIddUW','W5xdOmkoWPua','WQ50hSkaW6bsksi','W7fNv8ozW71cyGja','vwNdKCkNWRPSkr9yWO/cQCoy','v8oIW4JcHJqEhXa','WRPnW7OsBCkIWPyEW5a','D8ogW6JcUd4','WQ5lW6KlA8kSWPW','zsT4W7xdUW','WOVdMr/cKW8AW4y','p8kyfmokWQm','aCkZW49o','W5tcISkBWPqk','W77dHdiaDf8CW4vx','hCkxW7vukW','eJe1W5CwD8kwWO/dUa','WPfXW6aSCW','W5KDWRjiWPS','W7ldTbGHBq','WQdcKgxcRWaq','BSoJW4FcKXewfrC','WQxcJSo8W63dU8oS','W43cHITdWPFdHg0aW69TWONdHCkYiCoufX4MW6O','WOZdSCoqFCouWOqdWO7cMCoZFwVdIMpdPWTM','xrVcPmooW4a','pmoXW5hcQI7cISogeZtdUSkHrrHxrq','cIJcGSoHW6e3lq','W4jBlhdcKW','a8oYWPS+W5JdMcpdH8k6','W6v2uCo3W6feEWXqkuG','AmkKk8k6cCkYWRqcW6u','WO7cOmkLW5/cNb8frdldT8ohCde','iY7cUW','WRddSSosW5FdHsJcJ8kv','WRrUd8kfW7TrjtCB','W4xdGxddVq','WPdcH8ooiSoa','aSoaWQHiW5y','WQldGb8pga','WOTGod85','W4zhySoxW5a','WQhdIYSso3OrW41Y','W4hcISkqWQKcWPFcHSkrWPBdVG','h8otW7BcKe9RW7q','W73dKrNcNIK','WRxcUr/cV8kTWQyCnt9FB8koW58eWPDICszfF8kpW5xdPc7dJZJcUCokbvNdNmkrW6tdGColWOO','Dc1YW7eHW5FdNua','bw7cLse','dSokBCoUW549vmoOW6O','W53cVSkpv8km','WQpcHmowW6FdOSodW4/dPSoh','bmoeW4BcSba','aZVcJSo0','mXmIW5ax','WPdcTmoCp8oa','WPJdOmonxSojWOWeWRZcJW','W5RdI8ohmby','kh5G','fv0ZW7i5WQtcTq4Ua8k6r3xdIG','f8o8W57cS18','WR/cR8kZW7FcTa','pCkqjmovWPBdNa','WRpdQf7cRCoQWQSd','lSknd8o2WRhdU8k6','WQxcLSkTW6pcKG','amkaWQJcR0a','W4dcSHScW5tdRHu','WR/dT8oBW74','WRaReSkiWQODoIfWbMZdTcS','CmkQkmkKca','WOVdN3qt','W4FcMSkiFmkNiey2','EmoagmoeW74','D8k1n8k0e8k9','jmkVWRpcQ0et','jCkaySkVWQVcOxJcMGKLWRBdMmkS','jCk+WQFcQfi','hN7dIeRcJtRdOhKO','jmkMW5rrnW','W6NdOc3cOda','rSosiSoDW5W'].concat((function(){return['WO7cOSk4W5hcMH8W','owBcJq','WR8fg8onoXGsjSkK','z8o4WRZcTfmUW6j3','WR3dOCo+W4hdGG','q8o7W7FcPsG','qSkOW5TVWPZcGxRdU8klrIDrkq','sSk5cmk/aq','huGZW5WKWQVcTG','hSoyW6hcOe9LW7O','ohNcJSo7AYNcTW','aSoSW4dcUNK','dSosW5JcH3je','WQvyW7eECq','dmkrfSoqWQ0','B8k/hSk2cmkFWO4RW5i','WQxdUCo6W7tdKZtcMmkKW7DyWOW','hCopW7pcPfvJW6a','yCoEg8oPW7y','tJVcIbVcHJNcV3K3','WO/dL2SfW58','gmoSW5ZcVq3cGmogfq','hmopW73cUx5RW7fHhSoPWOFdNSk5','amoTWOq+W4/dLa','e8ogWR5TW60','WQPCW6ypzSk3','g0tcTapdOa','WRnpCHy','WOxdTCosuG','WRdcPSk0W7pcQ18','nSk6WPBdJLDbqHvZECoIEc8','voAxK+s6KoEZJEwFM+EyJEAwJ+AmJU+8Ga','WRldL2K','WPdcK8k0W6dcVq','W6BdImkaWQaita','WOyMfCoqka','WQOsBb0','WQFdUf7cSq','C8k6hCk0eq','WQT/e8klW6fE','W6arWQXfWRxcUa','jbBcQmkUWPS','W67cV8kRumkv','W6hdK8kZWP8I','WPapuXzwFmk0WRv5','iSkLWPtcL3G4','W7Hvi2ZcNG','emo5W5VcHNu','CqJcJaBcPq','oCofW4RcOeq','W5RcRbWdW5ldPHi','W4tdNSkNWPGR','WPldLSodW5zjW47dH8k8WRBdKqJcLCom','WOBdJCoBx8on','pqdcKmo0W60','o8o3W4lcRtpcI8oabYa','WRpcJu7cJcC3WOO','WRhdM0OUW74','ghVcGsJdNW','WQTXEb0w','ssdcSchcPXa','b8k/W6f3aW','jdSkW48aW6xcKbq','hCo8WOuY','id3cImoKW5m','WPqtdSoZnq','j0WUW5K','jmkVWR/cOhyfW6fFWRVdIG','usRcLbxcNdy','W4ZdKNZdQmkvWORdMG','jG8iW7W7','WPNdSCoswmorWO4','WR1wW48EBmkpWQW3W6C','ee7cVSo0qW','ct3cQSkSWQNdHKK','o2JcN8oZzq','W5NcUqynW4NdOa','vchcMr7cNtRcS2W','WQdcU8oLmq','eSo5WOWqW57dKdZdGCkGvG','WQBcMKlcKZK7','WQldJdCm','DmoOW5dcSbqggqTkqa','ktxcO8krWQu','zSospCoXW67dTW','WPjhzXKv','AmkKimk/aG','hIdcUmk1WRxdHKvJW4a','W73dNIm6uW','W58wCffDWOxcHqJdU8kFWOBdKG','aLK1W4yU','W7VcMSkfyCk9h2ym','ttDKW5tdO8oo','W6JdHmoneWW','iHibW4yG','Ct1MW4RdH8okoem','WPvgu1jxmmkWWPSlvfNdL8kU','WONcGCkBW57cNG'];}()));}()));}());_0x3218=function(){return _0x3054ff;};return _0x3218();};import*as _0x2ba595 from'cesium-plot-main';import'cesium-plot-plugin';function _0x35b3(_0x18c626,_0x21feb3){const _0x321852=_0x3218();return _0x35b3=function(_0x35b390,_0x53e891){_0x35b390=_0x35b390-0x1da;let _0x64f71e=_0x321852[_0x35b390];if(_0x35b3['kkZzjX']===undefined){var _0x570400=function(_0x5e9f60){const _0x44f122='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5a19b1='',_0x536e5d='';for(let _0x371108=0x0,_0x7ddbd5,_0x36b503,_0x34a788=0x0;_0x36b503=_0x5e9f60['charAt'](_0x34a788++);~_0x36b503&&(_0x7ddbd5=_0x371108%0x4?_0x7ddbd5*0x40+_0x36b503:_0x36b503,_0x371108++%0x4)?_0x5a19b1+=String['fromCharCode'](0xff&_0x7ddbd5>>(-0x2*_0x371108&0x6)):0x0){_0x36b503=_0x44f122['indexOf'](_0x36b503);}for(let _0x339e78=0x0,_0x4fc870=_0x5a19b1['length'];_0x339e78<_0x4fc870;_0x339e78++){_0x536e5d+='%'+('00'+_0x5a19b1['charCodeAt'](_0x339e78)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x536e5d);};const _0x2294a1=function(_0x1be407,_0x50d7a3){let _0x5caa81=[],_0x2bc3d1=0x0,_0x1d3ad9,_0x47910c='';_0x1be407=_0x570400(_0x1be407);let _0x4fa10c;for(_0x4fa10c=0x0;_0x4fa10c<0x100;_0x4fa10c++){_0x5caa81[_0x4fa10c]=_0x4fa10c;}for(_0x4fa10c=0x0;_0x4fa10c<0x100;_0x4fa10c++){_0x2bc3d1=(_0x2bc3d1+_0x5caa81[_0x4fa10c]+_0x50d7a3['charCodeAt'](_0x4fa10c%_0x50d7a3['length']))%0x100,_0x1d3ad9=_0x5caa81[_0x4fa10c],_0x5caa81[_0x4fa10c]=_0x5caa81[_0x2bc3d1],_0x5caa81[_0x2bc3d1]=_0x1d3ad9;}_0x4fa10c=0x0,_0x2bc3d1=0x0;for(let _0x1cf697=0x0;_0x1cf697<_0x1be407['length'];_0x1cf697++){_0x4fa10c=(_0x4fa10c+0x1)%0x100,_0x2bc3d1=(_0x2bc3d1+_0x5caa81[_0x4fa10c])%0x100,_0x1d3ad9=_0x5caa81[_0x4fa10c],_0x5caa81[_0x4fa10c]=_0x5caa81[_0x2bc3d1],_0x5caa81[_0x2bc3d1]=_0x1d3ad9,_0x47910c+=String['fromCharCode'](_0x1be407['charCodeAt'](_0x1cf697)^_0x5caa81[(_0x5caa81[_0x4fa10c]+_0x5caa81[_0x2bc3d1])%0x100]);}return _0x47910c;};_0x35b3['VHgheG']=_0x2294a1,_0x18c626=arguments,_0x35b3['kkZzjX']=!![];}const _0x9ed63f=_0x321852[0x0],_0x50aeea=_0x35b390+_0x9ed63f,_0xee5b7e=_0x18c626[_0x50aeea];return!_0xee5b7e?(_0x35b3['hRxvMn']===undefined&&(_0x35b3['hRxvMn']=!![]),_0x64f71e=_0x35b3['VHgheG'](_0x64f71e,_0x53e891),_0x18c626[_0x50aeea]=_0x64f71e):_0x64f71e=_0xee5b7e,_0x64f71e;},_0x35b3(_0x18c626,_0x21feb3);}import*as _0x38aec5 from'@turf/turf';const usePlot=_0x3d78dd=>{const _0x271544=_0x35b3,_0x26f089={'SxGUQ':function(_0x238d40,_0x4d479c){return _0x238d40!==_0x4d479c;},'uiKwn':'YKyeC','uwlCx':function(_0x163d63,_0xba9bfc){return _0x163d63!==_0xba9bfc;},'sdGtW':'IyJxQ','UipjZ':function(_0x268181,_0x1de68f){return _0x268181(_0x1de68f);},'oUnXo':'kITRU','xSfPD':_0x271544(0x2dd,'PYh4'),'tdozz':_0x271544(0x2a3,'8dJK'),'GGDfG':function(_0x40fa2b,_0x5a1138){return _0x40fa2b===_0x5a1138;},'jfUWt':_0x271544(0x1fa,'nvmZ'),'wHpAw':'geojson','XHhWp':_0x271544(0x298,'1yWW'),'DTGgC':_0x271544(0x2db,'PYh4'),'gPXvo':function(_0x5afc6c,_0x5514ff){return _0x5afc6c+_0x5514ff;},'lwHZf':'暂不支持\x20','Vymkl':_0x271544(0x296,'TEL1'),'DfTkK':_0x271544(0x238,'He@@'),'NmSXD':_0x271544(0x2e0,'&ELA'),'DyrFl':'ygPWk','VYhrX':_0x271544(0x1ec,'CaLr'),'DxyQo':_0x271544(0x1e0,'@p1K'),'fubfj':function(_0xd2c4c7,_0xcdffc2){return _0xd2c4c7===_0xcdffc2;},'IPSvy':_0x271544(0x28f,'y^DK'),'CXFic':_0x271544(0x213,'ufbo'),'UBAJA':'vQdGA','jlRbE':function(_0x28fbf4,_0x3f20f7){return _0x28fbf4!==_0x3f20f7;},'eFSaB':_0x271544(0x1f0,'aEP2'),'bRMuH':function(_0x1342fc,_0x4b76fc){return _0x1342fc||_0x4b76fc;},'FltTS':function(_0x8842,_0x2a581d,_0xc45cf7){return _0x8842(_0x2a581d,_0xc45cf7);},'VMOdg':function(_0x4e482f,_0x4535ae){return _0x4e482f>=_0x4535ae;},'lGlNC':function(_0x35fdca,_0xafaf1c){return _0x35fdca!==_0xafaf1c;},'lWgnU':_0x271544(0x2d4,'*cpF'),'aIfHo':function(_0x128960,_0x39b94c){return _0x128960||_0x39b94c;},'NUZMJ':'VJvkw','GzhMd':function(_0x263dd8,_0x12d97e){return _0x263dd8>_0x12d97e;},'anrzQ':_0x271544(0x20b,'1pq4'),'oOdvf':function(_0x5414e6,_0x3cd89c){return _0x5414e6-_0x3cd89c;},'iLxEy':'RSBIN','EJBHx':'XFJct','PZsed':function(_0x3c5668,_0x407d51){return _0x3c5668-_0x407d51;},'VMbrr':_0x271544(0x2bd,'[&&D'),'HCHrE':function(_0x5ef002,_0x2f83ae){return _0x5ef002+_0x2f83ae;},'CWFxX':function(_0x19e60e,_0x13f697){return _0x19e60e===_0x13f697;},'fIKvf':_0x271544(0x2ee,'O8uj'),'rUtiN':_0x271544(0x266,'PMg!'),'laeaa':_0x271544(0x2cc,'yYh1'),'HPvqS':function(_0x3bec6b,_0x4666f1){return _0x3bec6b===_0x4666f1;},'zVeDE':function(_0x1776e6,_0x513539){return _0x1776e6===_0x513539;},'bvVgM':'qponC','VGVnb':_0x271544(0x2f1,'aEP2'),'GQAzT':function(_0x4331a7,_0xf74752){return _0x4331a7 instanceof _0xf74752;},'pKLGZ':_0x271544(0x26b,'nvmZ'),'JYcrZ':'oDvFJ','kgItw':_0x271544(0x2a8,'aEP2'),'vgzLz':_0x271544(0x2ac,'FWA^'),'ZhZgW':_0x271544(0x200,'He@@'),'RerCD':_0x271544(0x1dd,'8dJK'),'QiQlf':'f32c2a35-bb73-4d8d-94cf-f880f68e5b80','ETzhl':_0x271544(0x2b7,'hstR'),'lEzXW':_0x271544(0x23c,'PYh4'),'mbmqX':function(_0x470876,_0x436192){return _0x470876*_0x436192;},'YxWxc':function(_0x23da40,_0x3e6ef3){return _0x23da40*_0x3e6ef3;},'AOeBL':function(_0x3845bd,_0x5b1e89){return _0x3845bd>_0x5b1e89;}},_0xdcd1ca=[_0x271544(0x253,'3iuS'),_0x271544(0x1e6,'h!@$'),_0x26f089[_0x271544(0x276,'R3C7')],_0x26f089[_0x271544(0x27e,'nvmZ')]];if(!_0xdcd1ca[_0x271544(0x227,'ufbo')](__MACHINEID__)){if(_0x26f089['GGDfG'](_0x26f089['ETzhl'],_0x271544(0x2da,'lhb0'))){if(!_0x4337de)return;return _0x1f94e1[_0x271544(0x1f7,')U**')](_0x5bdf49),_0x2a6841[_0x271544(0x283,'aEP2')]();}else return{'init':()=>{},'destroy':()=>{},'startDraw':()=>{},'removeGraphicById':()=>{},'removeCurrentGraphic':()=>{},'clearLayer':()=>{},'readJsonAndLoad':()=>{},'readFileAndLoad':()=>{},'exportJSON':()=>{},'saveAndExportFile':()=>{},'clickGraphicLayerEvent':()=>{},'getGraphicLayerOptions':()=>{},'getGraphicOptions':()=>{},'setGraphicOptions':()=>{},'flashEffect':()=>{},'scaleEffect':()=>{},'spinEffect':()=>{},'execEditTiming':()=>{},'insertTiming':()=>{},'removeTiming':()=>{},'updateTiming':()=>{},'getTimingList':()=>{},'saveAndExitEditTiming':()=>{}};}let _0x3d61a1=new Date(_0x26f089[_0x271544(0x24d,'ja%x')])['getTime']();const _0x1c83aa=_0x3d61a1+_0x26f089['mbmqX'](_0x26f089[_0x271544(0x1e3,'8dJK')](_0x26f089[_0x271544(0x2f9,'CaLr')](_0x26f089['YxWxc'](0x11,0x18),0x3c),0x3c),0x3e8),_0x46402c=Date[_0x271544(0x278,'EBV6')]();if(_0x26f089[_0x271544(0x2e7,'EBV6')](_0x46402c,_0x1c83aa))return{'init':()=>{},'destroy':()=>{},'startDraw':()=>{},'removeGraphicById':()=>{},'removeCurrentGraphic':()=>{},'clearLayer':()=>{},'readJsonAndLoad':()=>{},'readFileAndLoad':()=>{},'exportJSON':()=>{},'saveAndExportFile':()=>{},'clickGraphicLayerEvent':()=>{},'getGraphicLayerOptions':()=>{},'getGraphicOptions':()=>{},'setGraphicOptions':()=>{},'flashEffect':()=>{},'scaleEffect':()=>{},'spinEffect':()=>{},'execEditTiming':()=>{},'insertTiming':()=>{},'removeTiming':()=>{},'updateTiming':()=>{},'getTimingList':()=>{},'saveAndExitEditTiming':()=>{}};let _0x23edeb,_0xb555cf,_0x1de16b,_0xd87989=[],_0x1eae4d;const _0x26f952=()=>{const _0xd5f8bf=_0x271544;if(_0x26f089[_0xd5f8bf(0x2b4,'EqnA')](_0x26f089[_0xd5f8bf(0x1e7,'ufbo')],_0x26f089[_0xd5f8bf(0x289,'R3C7')]))_0x4f3875=_0x2c562b;else{if(_0x23edeb)return;_0x23edeb=new _0x2ba595[(_0xd5f8bf(0x297,'PYh4'))](_0x3d78dd),_0x1de16b=new _0x2ba595[(_0xd5f8bf(0x284,'eF#X'))][(_0xd5f8bf(0x21d,'EG!R'))]({'hasEdit':!![],'isAutoEditing':!![]}),_0x23edeb[_0xd5f8bf(0x208,'FWA^')](_0x1de16b),_0x1de16b['on'](_0x2ba595['EventType']['click'],_0x519cb3=>{const _0x160013=_0xd5f8bf;_0xb555cf=_0x1de16b[_0x160013(0x1fe,'uJt9')](_0x519cb3[_0x160013(0x265,'EG!R')][_0x160013(0x27f,'x]%$')]['id']);});}},_0x38730d=()=>{const _0x1350bd=_0x271544;_0x1de16b&&(_0x26f089[_0x1350bd(0x1ee,'yYh1')](_0x26f089[_0x1350bd(0x24c,'A%lv')],_0x1350bd(0x261,'aEP2'))?(_0x1de16b[_0x1350bd(0x280,'aEP2')](),_0x1de16b=null):_0x275298['on'](_0x52ff51[_0x1350bd(0x233,'He@@')][_0x1350bd(0x2e9,'7RTp')],_0xe9486a=>{const _0x36fc86=_0x1350bd,_0xac1134=_0x2d7d7e['getGraphicById'](_0xe9486a[_0x36fc86(0x2af,'@p1K')][_0x36fc86(0x1da,'EG!R')]['id']),_0x2c33fd=_0xac1134[_0x36fc86(0x2f7,'vJ%[')]();if(_0x2c33fd[_0x36fc86(0x2f6,'1uP7')][_0x36fc86(0x2c4,'4%ve')]('time'))return;_0x262df6({'id':_0xe9486a[_0x36fc86(0x2bc,'D$X^')][_0x36fc86(0x281,'EBV6')]['id'],'graphic':_0xac1134});})),_0xb555cf=null,_0x23edeb=null;},_0x4b2861=async(_0x1cb4c9,_0x28c750)=>{const _0x5a7ce2=_0x271544,_0x1c08fb={'code':_0x1cb4c9['code'],'name':_0x1cb4c9[_0x5a7ce2(0x2b6,'C5$^')],'type':_0x1cb4c9[_0x5a7ce2(0x207,'R3C7')],'style':Object[_0x5a7ce2(0x215,'F]!w')]({},{'color':_0x5a7ce2(0x273,'4%ve'),'lineWidth':1.5},_0x1cb4c9[_0x5a7ce2(0x272,'HGPA')])},_0x1c568d=await _0x1de16b[_0x5a7ce2(0x1e9,')8Wb')](_0x1c08fb);_0x26f089[_0x5a7ce2(0x237,'CaLr')](_0x28c750,{'id':_0x1c568d[_0x5a7ce2(0x2a9,'h!@$')]['id'],'graphic':_0x1c568d});},_0x381b7f=_0x5ee5fe=>{const _0x3ac38a=_0x271544;if(!_0x1de16b)return;const _0x2ace5c=_0x1de16b[_0x3ac38a(0x1fc,'3iuS')](_0x5ee5fe);_0x2ace5c&&_0x2ace5c[_0x3ac38a(0x2cb,'R3C7')]();},_0x5dd014=()=>{const _0x367c05=_0x271544;if(!_0xb555cf)throw new Error(_0x367c05(0x221,'1yWW'));_0xb555cf[_0x367c05(0x270,'HGPA')]();},_0x37886f=()=>{const _0x559da5=_0x271544;if(_0x26f089[_0x559da5(0x206,'TEL1')]!==_0x26f089[_0x559da5(0x2f0,'FWA^')])_0x1de16b['clear']();else return;},_0xc49373=_0x6eaaa6=>{const _0x2fbef7=_0x271544;_0x1de16b[_0x2fbef7(0x21a,'y^DK')](_0x6eaaa6,{'clear':!![],'flyTo':!![]});},_0x622a60=_0x4d8f1d=>{const _0xcbcd7a=_0x271544,_0x30bf55={'NYnYN':_0x26f089[_0xcbcd7a(0x232,')U**')]},_0x527b2a=_0x4d8f1d[_0xcbcd7a(0x255,'&ELA')],_0x482217=_0x527b2a?.['substring'](_0x527b2a[_0xcbcd7a(0x2e2,'&ELA')]('.')+0x1,_0x527b2a['length'])[_0xcbcd7a(0x287,'1pq4')]();if(_0x26f089[_0xcbcd7a(0x210,'uJt9')](_0x482217,_0x26f089[_0xcbcd7a(0x2f8,'EG!R')])||_0x482217===_0x26f089[_0xcbcd7a(0x21e,'@p1K')]){if(_0x26f089['SxGUQ'](_0xcbcd7a(0x24a,'DvdY'),_0x26f089[_0xcbcd7a(0x236,'eF#X')])){const _0x10fbfd=new FileReader();_0x10fbfd[_0xcbcd7a(0x2ba,'HGPA')](_0x4d8f1d[_0xcbcd7a(0x245,'1yWW')],_0x26f089[_0xcbcd7a(0x24e,'OW$s')]),_0x10fbfd[_0xcbcd7a(0x279,'cvVM')]=function(_0xbc1193){const _0x953194=_0xcbcd7a,_0xa6a530=this['result'];_0x1de16b[_0x953194(0x26d,'(3u(')](_0xa6a530,{'clear':!![],'flyTo':!![]});};}else{const _0x58a2d0=_0x108a52[_0xcbcd7a(0x2a4,'HGPA')]();return{'time':_0x444ebc[_0xcbcd7a(0x218,'PMg!')](_0x58a2d0['name'])[_0xcbcd7a(0x292,'yYh1')]};}}else{if(_0xcbcd7a(0x259,'vJ%[')===_0xcbcd7a(0x2a7,'4%ve'))throw new Error(_0x26f089[_0xcbcd7a(0x24b,'y^DK')](_0x26f089[_0xcbcd7a(0x26e,'R3C7')]+_0x482217,_0x26f089[_0xcbcd7a(0x2aa,'nA%R')]));else{const _0xf3d24b=_0x30bf55[_0xcbcd7a(0x252,'F]!w')]['split']('|');let _0x25abd0=0x0;while(!![]){switch(_0xf3d24b[_0x25abd0++]){case'0':_0xeb1b7c['on'](_0x1fa75e[_0xcbcd7a(0x204,'F]!w')]['click'],_0x1cd102=>{const _0x392cf1=_0xcbcd7a;_0x20b7c3=_0x41df7d[_0x392cf1(0x1de,'7RTp')](_0x1cd102[_0x392cf1(0x2f5,'8dJK')][_0x392cf1(0x20a,'hstR')]['id']);});continue;case'1':_0x47910c=new _0x4fa10c['layer'][(_0xcbcd7a(0x223,'ja%x'))]({'hasEdit':!![],'isAutoEditing':!![]});continue;case'2':_0x1cf697[_0xcbcd7a(0x247,'1pq4')](_0x372cf0);continue;case'3':_0x5caa81=new _0x2bc3d1[(_0xcbcd7a(0x246,'O8uj'))](_0x1d3ad9);continue;case'4':if(_0x50d7a3)return;continue;}break;}}}},_0x5b123e=()=>{const _0x3242d9=_0x271544;if(_0x26f089[_0x3242d9(0x2c0,'EBV6')](_0x1de16b[_0x3242d9(0x243,'OW$s')]()[_0x3242d9(0x26f,'nvmZ')],0x0)){if(_0x26f089['GGDfG']('BCdzH',_0x26f089[_0x3242d9(0x25c,'DvdY')])){const _0x2e9b59=_0x417ea9[_0x3242d9(0x1ed,'3iuS')](_0x11eab8=>{const _0x10326e=_0x3242d9,_0x300d54=_0x11eab8[_0x10326e(0x2f7,'vJ%[')]();return{'time':_0x391bc5[_0x10326e(0x274,'EqnA')](_0x300d54[_0x10326e(0x25a,'hstR')])[_0x10326e(0x292,'yYh1')]};});return _0x2e9b59;}else throw new Error(_0x26f089[_0x3242d9(0x1e4,'eF#X')]);}const _0x3edf21=_0x1de16b[_0x3242d9(0x203,'1yWW')]();return JSON[_0x3242d9(0x20d,'hstR')](_0x3edf21);},_0x58c3c7=()=>{const _0x577943=_0x271544;if(_0x26f089[_0x577943(0x22e,'tnk0')]!==_0x26f089['DyrFl']){if(!_0x3ca09d)return;const _0x4ce2c6=_0x82b4b7[_0x577943(0x260,'x]%$')](_0x1ee6d8);_0x4ce2c6&&_0x4ce2c6[_0x577943(0x2be,'FWA^')]();}else{if(_0x26f089[_0x577943(0x25b,'TEL1')](_0x1de16b['getGraphics']()[_0x577943(0x2c3,'h!@$')],0x0))throw new Error('当前没有标注任何数据,无需保存!');const _0x383608=_0x1de16b['toJSON']();_0x2ba595[_0x577943(0x2ea,'A%lv')]['downloadFile'](_0x26f089[_0x577943(0x2a5,'BTFl')],JSON[_0x577943(0x22b,'eF#X')](_0x383608));}},_0x1da6dc=_0x4aa1a9=>{const _0x842dd7=_0x271544,_0x286f05={'jDIRH':'time','DvSZL':function(_0xd5ea97,_0x58a0a0){return _0x26f089['UipjZ'](_0xd5ea97,_0x58a0a0);}};_0x26f089[_0x842dd7(0x300,'4%ve')](_0x26f089[_0x842dd7(0x2b8,'cvVM')],_0x842dd7(0x257,'(3u('))?(_0xbf4051=_0x11f6dc[_0x842dd7(0x211,'A%lv')](),_0x4d6c3c=_0xa6f6f8[_0x842dd7(0x286,'nvmZ')]({'closure':!![]})):_0x1de16b['on'](_0x2ba595[_0x842dd7(0x2fe,'O8uj')][_0x842dd7(0x262,'PMg!')],_0x1d12ad=>{const _0x3d7486=_0x842dd7,_0x3258b8=_0x1de16b['getGraphicById'](_0x1d12ad[_0x3d7486(0x240,'hstR')]['options']['id']),_0x5c59d7=_0x3258b8['toJSON']();if(_0x5c59d7[_0x3d7486(0x293,'FWA^')][_0x3d7486(0x23a,')8Wb')](_0x286f05[_0x3d7486(0x2a6,'aEP2')]))return;_0x286f05[_0x3d7486(0x27c,')8Wb')](_0x4aa1a9,{'id':_0x1d12ad[_0x3d7486(0x2e6,'C5$^')][_0x3d7486(0x205,'vJ%[')]['id'],'graphic':_0x3258b8});});},_0x30ebd5=()=>{const _0x4160a4=_0x1de16b['toJSON']();return _0x4160a4;},_0x4790cc=()=>{const _0x3ea48b=_0x271544;if(_0x26f089['fubfj'](_0x3ea48b(0x220,'EBV6'),_0x26f089[_0x3ea48b(0x234,'EqnA')])){if(!_0xb555cf)throw new Error(_0x26f089['CXFic']);const _0x206c47=_0xb555cf[_0x3ea48b(0x211,'A%lv')]();return _0x206c47;}else{const _0x5a0bf7=_0x11803a['parse'](_0x41a6fc['stringify'](_0xd0a16c)),_0x411465={'time':_0x692480[_0x3ea48b(0x2c5,'DvdY')]};_0x5a0bf7['name']=_0x15ee66['stringify'](_0x411465),_0x5a0bf7[_0x3ea48b(0x1ef,'aEP2')]=_0x282d88['positions'],delete _0x5a0bf7['id'];const _0x2f4ba4=new _0x553213[(_0x3ea48b(0x2c1,'O8uj'))][(_0x3ea48b(0x28c,'vJ%['))](_0x5a0bf7);_0x5cacac['addGraphic'](_0x2f4ba4),_0x1cf395[_0x3ea48b(0x20c,'*(t^')](_0x2f4ba4);}},_0x3b0563=_0xe40f=>{const _0x1acca3=_0x271544,_0x1f7ca2={'CbTSg':_0x1acca3(0x1f1,'EBV6'),'xQRnD':function(_0x5664a7,_0xd96dae){return _0x26f089['UipjZ'](_0x5664a7,_0xd96dae);}};if(_0x26f089[_0x1acca3(0x201,'C5$^')](_0x26f089[_0x1acca3(0x2ff,'lhb0')],_0x26f089[_0x1acca3(0x2d8,'PMg!')])){if(!_0xb555cf){if(_0x26f089['jlRbE'](_0x26f089['eFSaB'],_0x26f089[_0x1acca3(0x25e,'*cpF')])){const _0x9ddf8b=_0x260719[_0x1acca3(0x2f2,'ufbo')](_0x4091ea[_0x1acca3(0x21c,'1yWW')][_0x1acca3(0x277,'1yWW')]['id']),_0x365a0c=_0x9ddf8b[_0x1acca3(0x211,'A%lv')]();if(_0x365a0c['name']['includes'](_0x1f7ca2[_0x1acca3(0x2fc,'EBV6')]))return;_0x1f7ca2[_0x1acca3(0x282,'aEP2')](_0x5ad1ad,{'id':_0x2b3a9f[_0x1acca3(0x2bc,'D$X^')][_0x1acca3(0x1df,'DvdY')]['id'],'graphic':_0x9ddf8b});}else return;}return _0xb555cf['setOptions'](_0xe40f),_0xb555cf[_0x1acca3(0x211,'A%lv')]();}else _0x5cbfd8['destroy'](),_0x2a4d19=null;},_0xd88ad=(_0x264802,_0x4db324,_0x1db617)=>{const _0xe59569=_0x271544,_0x34e3ed={'hjDgv':function(_0x6e2a6,_0x974cd){return _0x6e2a6>=_0x974cd;},'EnxVt':function(_0x464536,_0x333263){const _0x82f039=_0x35b3;return _0x26f089[_0x82f039(0x1fb,'*cpF')](_0x464536,_0x333263);}};if(_0x26f089['bRMuH'](!_0x264802,!_0x4db324)||!_0x1db617)return;let _0x5362a3=0x0,_0x53450f=![];if(_0x4db324<0x1f4)return;const _0x344a9f=_0x26f089[_0xe59569(0x2cf,'He@@')](setInterval,()=>{const _0x56b527=_0xe59569;if(_0x34e3ed[_0x56b527(0x29d,'nvmZ')](_0x5362a3,_0x1db617)){_0x34e3ed[_0x56b527(0x285,'EG!R')](clearInterval,_0x344a9f);return;}_0x264802[_0x56b527(0x2c8,'A%lv')]=_0x53450f,_0x53450f=!_0x53450f,!_0x53450f&&_0x5362a3++;},_0x4db324);},_0x1e1371=(_0x4fb26f,_0x23aeaf)=>{const _0x3cf693=_0x271544;if(_0x26f089['lGlNC'](_0x26f089[_0x3cf693(0x2b2,'yYh1')],_0x26f089[_0x3cf693(0x241,'BTFl')]))return;else{if(_0x26f089[_0x3cf693(0x23e,'7RTp')](!_0x4fb26f,!_0x23aeaf)||!_0x1eae4d){if(_0x26f089['NUZMJ']===_0x3cf693(0x267,'HGPA'))return;else{if(_0x26f089['VMOdg'](_0x58099a,_0x20ce59)){_0x26f089[_0x3cf693(0x2dc,'7RTp')](_0x2ba608,_0x42e270);return;}_0x3ce5b3[_0x3cf693(0x217,'FWA^')]=_0x89951,_0x3b9c3e=!_0x382e42,!_0x1a644e&&_0x3cc5f5++;}}let _0x12cc3e,_0x40235a;_0x26f089[_0x3cf693(0x2ca,'O8uj')](_0xd87989[_0x3cf693(0x222,'R3C7')],0x0)?_0x26f089[_0x3cf693(0x226,'nA%R')]('PprxI',_0x26f089[_0x3cf693(0x301,'CaLr')])?(_0x12cc3e=_0xd87989[_0xd87989[_0x3cf693(0x29f,'CaLr')]-0x1]['toJSON'](),_0x40235a=_0xd87989[_0x26f089[_0x3cf693(0x2d9,'FWA^')](_0xd87989[_0x3cf693(0x29f,'CaLr')],0x1)]['toGeoJSON']({'closure':!![]})):_0x4c3a9d['loadJSON'](_0x8fa20f,{'clear':!![],'flyTo':!![]}):(_0x12cc3e=_0x1eae4d[_0x3cf693(0x2ec,'(3u(')](),_0x40235a=_0x1eae4d[_0x3cf693(0x2bf,'eF#X')]({'closure':!![]}));if(_0x40235a['geometry']['coordinates'][0x0][_0x3cf693(0x2d3,'tnk0')]!==0x0){const _0x211197=_0x38aec5[_0x3cf693(0x212,'7RTp')](_0x40235a,_0x4fb26f),_0x3caf86=_0x2ba595[_0x3cf693(0x2fd,'EG!R')][_0x3cf693(0x20f,'yYh1')](_0x211197,{'style':{..._0x12cc3e[_0x3cf693(0x2cd,'nvmZ')]}}),_0x3da5d5=Object[_0x3cf693(0x209,'BTFl')]({},_0x3caf86[0x0],{'name':JSON[_0x3cf693(0x2ae,'vJ%[')]({'time':_0x23aeaf,'scale':_0x4fb26f})}),_0x76f9d=new _0x2ba595[(_0x3cf693(0x288,'aEP2'))][(_0x3cf693(0x2d6,'tnk0'))](_0x3da5d5);_0x1de16b[_0x3cf693(0x1e8,'1yWW')](_0x76f9d),_0xd87989['push'](_0x76f9d);}}},_0x5334e0=(_0x5677c2,_0x33ba44)=>{const _0x1e4208=_0x271544;if(!_0x5677c2||!_0x33ba44||!_0x1eae4d)return;let _0x84209d,_0x559a93;if(_0xd87989[_0x1e4208(0x29e,'ufbo')]>0x0){if(_0x26f089['GGDfG'](_0x26f089['iLxEy'],_0x26f089[_0x1e4208(0x2a1,'(3u(')])){const _0xdd323e=_0xde0572[_0x1e4208(0x1db,'nvmZ')](_0xb4708a,_0x45cb63),_0x41c73b=_0x26ae46[_0x1e4208(0x2b9,'x]%$')][_0x1e4208(0x23d,'FWA^')](_0xdd323e,{'style':{..._0x4944cd['style']}}),_0x3155d9=_0x4f6760['assign']({},_0x41c73b[0x0],{'name':_0x4b73a5[_0x1e4208(0x248,'ufbo')]({'time':_0x5a9738,'scale':_0x1220c0})}),_0x23d21b=new _0x132ac6[(_0x1e4208(0x240,'hstR'))]['PolyPlot'](_0x3155d9);_0x4bb2dc[_0x1e4208(0x250,')U**')](_0x23d21b),_0x11fa20['push'](_0x23d21b);}else _0x84209d=_0xd87989[_0xd87989['length']-0x1]['toJSON'](),_0x559a93=_0xd87989[_0x26f089[_0x1e4208(0x2ad,'hstR')](_0xd87989[_0x1e4208(0x2bb,'4%ve')],0x1)][_0x1e4208(0x258,'uJt9')]({'closure':!![]});}else{if(_0x26f089[_0x1e4208(0x2e1,'hstR')]('GJOBC',_0x26f089[_0x1e4208(0x29a,'cvVM')])){const _0x5d3dbe=_0xabab2a[_0x1e4208(0x2d1,'x]%$')](_0x1d8e19[_0x1e4208(0x244,'nvmZ')](_0x24d044));_0x5d3dbe[_0x1e4208(0x20e,'ja%x')]=_0x57b681,_0x5d3dbe['positions']=_0x5e7c70[_0x1e4208(0x24f,'A%lv')];const _0x4ef32a=new _0x369d38[(_0x1e4208(0x2bc,'D$X^'))][(_0x1e4208(0x2b5,'TEL1'))](_0x5d3dbe);_0x2018b8=_0x4ef32a,_0x8ea267[_0x1e4208(0x2c6,'C5$^')](_0x4ef32a),_0x4ef32a[_0x1e4208(0x2c9,')8Wb')]({'style':{..._0x5d3dbe[_0x1e4208(0x2b1,'&ELA')]}});}else _0x84209d=_0x1eae4d[_0x1e4208(0x2ec,'(3u(')](),_0x559a93=_0x1eae4d[_0x1e4208(0x286,'nvmZ')]({'closure':!![]});}const _0x5ecdb4=_0x2ba595[_0x1e4208(0x1f9,'hstR')][_0x1e4208(0x28d,'aEP2')](_0x1eae4d[_0x1e4208(0x290,'eF#X')])['toArray'](),_0x1a0e92=_0x38aec5[_0x1e4208(0x23f,'vJ%[')](_0x559a93,_0x5677c2,{'pivot':_0x5ecdb4}),_0x4aa0c4=_0x2ba595[_0x1e4208(0x1f6,'[&&D')]['geoJsonToGraphics'](_0x1a0e92,{'style':{..._0x84209d[_0x1e4208(0x2a2,'nA%R')]}}),_0x27969c=Object[_0x1e4208(0x2f3,'FWA^')]({},_0x4aa0c4[0x0],{'name':JSON[_0x1e4208(0x235,'[&&D')]({'time':_0x33ba44,'angle':_0x5677c2})}),_0x1ad124=new _0x2ba595[(_0x1e4208(0x22d,'eF#X'))][(_0x1e4208(0x22a,')8Wb'))](_0x27969c);_0x1de16b['addGraphic'](_0x1ad124),_0xd87989[_0x1e4208(0x29c,'3iuS')](_0x1ad124);},_0x4bd174=()=>{const _0x36886d=_0x271544;if(_0x26f089[_0x36886d(0x2e8,'lhb0')](_0x26f089['bvVgM'],_0x26f089['bvVgM'])){if(!_0xb555cf)return;_0xb555cf['parent']?'raimG'===_0x26f089['VGVnb']?_0x1eae4d=_0xb555cf[_0x36886d(0x2e3,'EqnA')]:_0x1f6897[_0x36886d(0x2c7,'@p1K')]():_0x1eae4d=_0xb555cf;const _0x176de2=_0x1eae4d[_0x36886d(0x2b3,'4%ve')](),_0x13b2af=_0x176de2[_0x36886d(0x25a,'hstR')];if(_0x26f089['GQAzT'](_0x176de2['positions'],Array)){if(_0x26f089[_0x36886d(0x291,'&ELA')]===_0x26f089[_0x36886d(0x22c,')8Wb')])return;else throw new _0x3bbf63(_0x26f089[_0x36886d(0x1f3,'8dJK')](_0x26f089[_0x36886d(0x27b,'1pq4')]+_0x26e582,_0x36886d(0x1e5,'EG!R')));}_0x1eae4d['remove'](),_0x1eae4d=null,_0x176de2[_0x36886d(0x2ce,'O8uj')]['list'][_0x36886d(0x1e1,'A%lv')]((_0x46dc3d,_0x4429dd)=>{const _0x3f3388=_0x36886d,_0xd03de9={'gHRQe':function(_0x58c008,_0x2fe6e9){const _0x21a441=_0x35b3;return _0x26f089[_0x21a441(0x2d5,'[&&D')](_0x58c008,_0x2fe6e9);},'VZuvh':_0x26f089[_0x3f3388(0x225,'lhb0')]};if(_0x3f3388(0x2f4,'A%lv')!==_0x26f089['fIKvf']){if(_0x4429dd===0x0){if(_0x26f089['SxGUQ'](_0x26f089['rUtiN'],_0x26f089[_0x3f3388(0x303,'ja%x')]))_0x43b095&&(_0x882800[_0x3f3388(0x264,'3iuS')](),_0x26ed35=null),_0x555766=null,_0x146b6e=null;else{const _0x359083=JSON['parse'](JSON[_0x3f3388(0x228,'OW$s')](_0x176de2));_0x359083[_0x3f3388(0x269,'1pq4')]=_0x13b2af,_0x359083[_0x3f3388(0x1f8,'1yWW')]=_0x46dc3d[_0x3f3388(0x242,'C5$^')];const _0xb86194=new _0x2ba595[(_0x3f3388(0x21b,'TEL1'))][(_0x3f3388(0x2fb,'h!@$'))](_0x359083);_0x1eae4d=_0xb86194,_0x1de16b['addGraphic'](_0xb86194),_0xb86194['setOptions']({'style':{..._0x359083['style']}});}}else{if(_0x26f089['SxGUQ'](_0x26f089[_0x3f3388(0x2c2,'EBV6')],_0x26f089['laeaa']))_0x42c2b6[_0x3f3388(0x1f4,'(3u(')]();else{const _0x1503b4=JSON[_0x3f3388(0x218,'PMg!')](JSON[_0x3f3388(0x25d,'FWA^')](_0x176de2)),_0x2ce47a={'time':_0x46dc3d[_0x3f3388(0x292,'yYh1')]};_0x1503b4[_0x3f3388(0x2b6,'C5$^')]=JSON[_0x3f3388(0x214,'&ELA')](_0x2ce47a),_0x1503b4[_0x3f3388(0x256,'1uP7')]=_0x46dc3d[_0x3f3388(0x202,'uJt9')],delete _0x1503b4['id'];const _0x17ac2e=new _0x2ba595[(_0x3f3388(0x302,'PYh4'))][(_0x3f3388(0x2d2,'(3u('))](_0x1503b4);_0x1de16b[_0x3f3388(0x21f,'*(t^')](_0x17ac2e),_0xd87989[_0x3f3388(0x2ed,'O8uj')](_0x17ac2e);}}}else{if(_0xd03de9[_0x3f3388(0x1f2,'tnk0')](_0x551755[_0x3f3388(0x1ff,'He@@')]()['length'],0x0))throw new _0x53a88e(_0xd03de9['VZuvh']);const _0x556c23=_0x20991d[_0x3f3388(0x239,'@p1K')]();return _0x95708c[_0x3f3388(0x28a,'4%ve')](_0x556c23);}});}else{if(_0x26f089[_0x36886d(0x2e4,'nvmZ')](_0x215ef9['getGraphics']()[_0x36886d(0x294,'PMg!')],0x0))throw new _0x3dd2f1(_0x26f089['NmSXD']);const _0x224c74=_0x52ed4c[_0x36886d(0x2eb,'3iuS')]();_0x37807a[_0x36886d(0x231,'EqnA')]['downloadFile'](_0x26f089['VYhrX'],_0x522d6c['stringify'](_0x224c74));}},_0x5eb8ef=_0x5dc3c5=>{const _0x3b7605=_0x271544;if(!_0x1eae4d||!_0x5dc3c5)return;const _0x8cd103=_0x1eae4d[_0x3b7605(0x263,'EG!R')](),_0x4491f1={'time':_0x5dc3c5};_0x8cd103[_0x3b7605(0x249,'D$X^')]=JSON[_0x3b7605(0x2de,')8Wb')](_0x4491f1),delete _0x8cd103['id'],_0x1de16b[_0x3b7605(0x216,'cvVM')](_0x8cd103)['then'](_0x3ef8d5=>{const _0x1045e0=_0x3b7605;_0xd87989[_0x1045e0(0x2e5,'*cpF')](_0x3ef8d5);}),_0x1de16b[_0x3b7605(0x251,'aEP2')]();},_0x48e577=_0x5be04c=>{const _0x4a3c0b=_0x271544;if(!_0x1eae4d)return;_0xd87989[_0x5be04c][_0x4a3c0b(0x224,'C5$^')](),_0xd87989[_0x4a3c0b(0x28e,'C5$^')](_0x5be04c,0x1);},_0x1a4971=(_0x1a51b3,_0x3c6406)=>{const _0x13b10f=_0x271544;if(_0x26f089[_0x13b10f(0x2a0,'O8uj')]!==_0x26f089['kgItw']){const _0x40f0b5=JSON[_0x13b10f(0x219,'EBV6')](_0x3c6406);_0xd87989[_0x1a51b3][_0x13b10f(0x1fd,'D$X^')]({'name':_0x40f0b5});}else throw new _0x492063(_0x26f089[_0x13b10f(0x2b0,'PYh4')]);},_0x207f4c=()=>{const _0x3770fd={'kmTzH':'没有获取到矢量!'},_0x2bb08d=_0xd87989['map'](_0x3ebec1=>{const _0x1cc53c=_0x35b3;if(_0x26f089[_0x1cc53c(0x230,'EG!R')]!==_0x26f089['vgzLz']){if(!_0x295d2a)throw new _0x167f27(_0x3770fd[_0x1cc53c(0x1e2,'(3u(')]);const _0x2d474f=_0x269ca6['toJSON']();return _0x2d474f;}else{const _0x5daf31=_0x3ebec1[_0x1cc53c(0x299,'nA%R')]();return{'time':JSON[_0x1cc53c(0x2ef,'A%lv')](_0x5daf31[_0x1cc53c(0x269,'1pq4')])[_0x1cc53c(0x1f5,'FWA^')]};}});return _0x2bb08d;},_0x265901=()=>{const _0x575ea3=_0x271544;if(!_0xd87989['length'])return;const _0x23d2b1=_0xd87989[_0x575ea3(0x25f,'*(t^')](_0x32783a=>{const _0x3c1696=_0x575ea3,_0x714eb2=_0x32783a[_0x3c1696(0x263,'EG!R')](),_0x393cbc=JSON[_0x3c1696(0x28b,'PYh4')](_0x714eb2[_0x3c1696(0x29b,'lhb0')]);return{'time':_0x393cbc[_0x3c1696(0x26c,'PYh4')],'positions':_0x714eb2['positions']};});_0x23d2b1[_0x575ea3(0x268,'h!@$')]({'time':0x0,'positions':_0x1eae4d[_0x575ea3(0x2f7,'vJ%[')]()['positions']}),_0x1eae4d['setOptions']({'positions':{'type':_0x26f089[_0x575ea3(0x275,'F]!w')],'list':_0x23d2b1}}),_0xd87989[_0x575ea3(0x1e1,'A%lv')](_0x531a0e=>_0x531a0e[_0x575ea3(0x23b,'uJt9')]()),_0xd87989=[],_0x1eae4d=null;};return{'init':_0x26f952,'destroy':_0x38730d,'startDraw':_0x4b2861,'removeGraphicById':_0x381b7f,'removeCurrentGraphic':_0x5dd014,'clearLayer':_0x37886f,'readJsonAndLoad':_0xc49373,'readFileAndLoad':_0x622a60,'exportJSON':_0x5b123e,'saveAndExportFile':_0x58c3c7,'clickGraphicLayerEvent':_0x1da6dc,'getGraphicLayerOptions':_0x30ebd5,'getGraphicOptions':_0x4790cc,'setGraphicOptions':_0x3b0563,'flashEffect':_0xd88ad,'scaleEffect':_0x1e1371,'spinEffect':_0x5334e0,'execEditTiming':_0x4bd174,'insertTiming':_0x5eb8ef,'removeTiming':_0x48e577,'updateTiming':_0x1a4971,'getTimingList':_0x207f4c,'saveAndExitEditTiming':_0x265901};};export{usePlot};var version_ = 'jsjiami.com.v7';
1
+ import * as cesiumPlot from "cesium-plot-main"
2
+ import "cesium-plot-plugin"
3
+ import * as turf from '@turf/turf'
4
+
5
+ /**
6
+ * @ClassName cesiumPlot
7
+ * @Author sjq
8
+ * @Date 2025/9/15 17:30
9
+ * @Description 绘制jb工具
10
+ * @Version 1.0
11
+ */
12
+
13
+ const usePlot = (viewer) => {
14
+
15
+ const whiteList = [
16
+ 'b42f5bf0-f43b-4e19-ba88-1a24cfe99322',
17
+ '61e29ca1-4af2-4939-9e0f-1ba3596c8cb9',
18
+ 'd3fc617e-fd3a-4753-bfbe-196769e2e2b2',
19
+ 'f32c2a35-bb73-4d8d-94cf-f880f68e5b80'
20
+ ]
21
+
22
+ if (!whiteList.includes(__MACHINEID__)) {
23
+ return {
24
+ init: () => { },
25
+ destroy: () => { },
26
+ startDraw: () => { },
27
+ removeGraphicById: () => { },
28
+ removeCurrentGraphic: () => { },
29
+ clearLayer: () => { },
30
+ readJsonAndLoad: () => { },
31
+ readFileAndLoad: () => { },
32
+ exportJSON: () => { },
33
+ saveAndExportFile: () => { },
34
+ clickGraphicLayerEvent: () => { },
35
+ getGraphicLayerOptions: () => { },
36
+ getGraphicOptions: () => { },
37
+ setGraphicOptions: () => { },
38
+ flashEffect: () => { },
39
+ scaleEffect: () => { },
40
+ spinEffect: () => { },
41
+ execEditTiming: () => { },
42
+ insertTiming: () => { },
43
+ removeTiming: () => { },
44
+ updateTiming: () => { },
45
+ getTimingList: () => { },
46
+ saveAndExitEditTiming: () => { }
47
+ }
48
+ }
49
+
50
+ let startTime = new Date("2025-09-30T00:00:00").getTime()
51
+ const expireTime = startTime + 17 * 24 * 60 * 60 * 1000
52
+ const now = Date.now()
53
+ if (now > expireTime) {
54
+ return {
55
+ init: () => { },
56
+ destroy: () => { },
57
+ startDraw: () => { },
58
+ removeGraphicById: () => { },
59
+ removeCurrentGraphic: () => { },
60
+ clearLayer: () => { },
61
+ readJsonAndLoad: () => { },
62
+ readFileAndLoad: () => { },
63
+ exportJSON: () => { },
64
+ saveAndExportFile: () => { },
65
+ clickGraphicLayerEvent: () => { },
66
+ getGraphicLayerOptions: () => { },
67
+ getGraphicOptions: () => { },
68
+ setGraphicOptions: () => { },
69
+ flashEffect: () => { },
70
+ scaleEffect: () => { },
71
+ spinEffect: () => { },
72
+ execEditTiming: () => { },
73
+ insertTiming: () => { },
74
+ removeTiming: () => { },
75
+ updateTiming: () => { },
76
+ getTimingList: () => { },
77
+ saveAndExitEditTiming: () => { }
78
+ }
79
+ }
80
+
81
+ let map
82
+ let graphic
83
+ let graphicLayer
84
+
85
+ let graphicArr = []
86
+ let currentGraphic
87
+
88
+ const init = () => {
89
+ if (map) return
90
+
91
+ map = new cesiumPlot.Map(viewer)
92
+ graphicLayer = new cesiumPlot.layer.GraphicLayer({
93
+ hasEdit: true,
94
+ isAutoEditing: true
95
+ })
96
+ map.addLayer(graphicLayer)
97
+
98
+ graphicLayer.on(cesiumPlot.EventType.click, (e) => {
99
+ graphic = graphicLayer.getGraphicById(e.graphic.options.id)
100
+ })
101
+ }
102
+
103
+ const destroy = () => {
104
+ if (graphicLayer) {
105
+ graphicLayer.destroy()
106
+ graphicLayer = null
107
+ }
108
+
109
+ graphic = null
110
+ map = null
111
+ }
112
+
113
+ const startDraw = async (options, cb) => {
114
+ const graphicOptions = {
115
+ code: options.code,
116
+ name: options.name,
117
+ type: options.type,
118
+ style: Object.assign({}, {
119
+ color: "#128ed6ff",
120
+ lineWidth: 0.8,
121
+ clampToGround: true,
122
+ lockZoom: false
123
+ }, options.style)
124
+ }
125
+
126
+ let graphic = await graphicLayer.startDraw(graphicOptions)
127
+ if (graphicOptions.type === 'pointPlot') {
128
+ const position = graphic.toJSON().position
129
+ graphic.remove()
130
+ graphic = new cesiumPlot.graphic.PointPlot(Object.assign({}, graphicOptions, {
131
+ position: {
132
+ type: 'time',
133
+ speed: 0.0000000001,
134
+ list: [
135
+ position,
136
+ [position[0], position[1] - 0.5, position[2]],
137
+ [position[0] - 0.5, position[1] - 0.5, position[2]]
138
+ ]
139
+ }
140
+ }))
141
+ }
142
+
143
+ graphicLayer.addGraphic(graphic)
144
+
145
+ cb({
146
+ id: graphic.options.id,
147
+ graphic
148
+ })
149
+ }
150
+
151
+ const removeGraphicById = (id) => {
152
+ if (!graphicLayer) return
153
+ const graphic = graphicLayer.getGraphicById(id)
154
+ if (graphic) {
155
+ graphic.remove()
156
+ }
157
+ }
158
+
159
+ const removeCurrentGraphic = () => {
160
+ if (!graphic) {
161
+ throw new Error("没有获取到矢量!")
162
+ }
163
+
164
+ graphic.remove()
165
+ }
166
+
167
+ const clearLayer = () => {
168
+ graphicLayer.clear()
169
+ }
170
+
171
+ const readJsonAndLoad = (json) => {
172
+ graphicLayer.loadJSON(json, { clear: true, flyTo: true })
173
+ }
174
+
175
+ const readFileAndLoad = (file) => {
176
+ const fileName = file.name
177
+ const fileType = fileName?.substring(fileName.lastIndexOf(".") + 1, fileName.length).toLowerCase()
178
+
179
+ if (fileType === "json" || fileType === "geojson") {
180
+ const reader = new FileReader()
181
+ reader.readAsText(file.originFileObj, "UTF-8")
182
+ reader.onloadend = function (e) {
183
+ const json = this.result
184
+ graphicLayer.loadJSON(json, { clear: true, flyTo: true })
185
+ }
186
+ } else {
187
+ throw new Error("暂不支持 " + fileType + " 文件类型的数据!")
188
+ }
189
+ }
190
+
191
+ const exportJSON = () => {
192
+ if (graphicLayer.getGraphics().length === 0) {
193
+ throw new Error("当前没有标注任何数据,无需保存!")
194
+ }
195
+
196
+ const geojson = graphicLayer.toJSON()
197
+ return JSON.stringify(geojson)
198
+ }
199
+
200
+ const saveAndExportFile = () => {
201
+ if (graphicLayer.getGraphics().length === 0) {
202
+ throw new Error("当前没有标注任何数据,无需保存!")
203
+ }
204
+ const geojson = graphicLayer.toJSON()
205
+ cesiumPlot.Util.downloadFile("标绘.json", JSON.stringify(geojson))
206
+ }
207
+
208
+ const clickGraphicLayerEvent = (cb) => {
209
+ graphicLayer.on(cesiumPlot.EventType.click, (e) => {
210
+
211
+ const graphic = graphicLayer.getGraphicById(e.graphic.options.id)
212
+ const params = graphic.toJSON()
213
+
214
+ if (params.name.includes('time')) {
215
+ return
216
+ }
217
+
218
+ cb({
219
+ id: e.graphic.options.id,
220
+ graphic
221
+ })
222
+ })
223
+ }
224
+
225
+ /**
226
+ * @clampToGround 是否贴地 boolean
227
+ * @color 标绘颜色 string
228
+ * @fill 是否填充 boolean
229
+ * @chasIntext 是否显示文本 boolean
230
+ * @lineType 线段类型 number
231
+ * @lineWidth 线段宽度 number
232
+ * @serif 是否显示衬线 boolean
233
+ * @serifColor 衬线颜色 string
234
+ * @serifDirect 衬线类型 number
235
+ * @serifWidth 衬线类型 number
236
+ */
237
+
238
+ const getGraphicLayerOptions = () => {
239
+ const options = graphicLayer.toJSON()
240
+ return options
241
+ }
242
+
243
+ const getGraphicOptions = () => {
244
+ if (!graphic) {
245
+ throw new Error("没有获取到矢量!")
246
+ }
247
+
248
+ const options = graphic.toJSON()
249
+ return options
250
+ }
251
+
252
+ const getGraphicOptionsById = (id) => {
253
+ const graphic = graphicLayer.getGraphicById(id)
254
+ if (!graphic) return
255
+
256
+ const options = graphic.toJSON()
257
+ return options
258
+ }
259
+
260
+ const setGraphicOptions = (options) => {
261
+ if (!graphic) {
262
+ return
263
+ }
264
+
265
+ graphic.setOptions(options)
266
+
267
+ return graphic.toJSON()
268
+ }
269
+
270
+ const setGraphicOptionsById = (id, options) => {
271
+ const graphic = graphicLayer.getGraphicById(id)
272
+ if (!graphic) return
273
+
274
+ graphic.setOptions(options)
275
+
276
+ return graphic.toJSON()
277
+ }
278
+
279
+ const flashEffect = (graphic, interval, totalNum) => {
280
+ if (!graphic || !interval || !totalNum) return
281
+
282
+ let number = 0;
283
+ let status = false;
284
+
285
+ if (interval < 500) {
286
+ return
287
+ }
288
+ const timer = setInterval(() => {
289
+ if (number >= totalNum) {
290
+ clearInterval(timer)
291
+ return
292
+ }
293
+ graphic.show = status
294
+ status = !status
295
+ !status && number++;
296
+ }, interval)
297
+ }
298
+
299
+ const scaleEffect = (scale, time) => {
300
+ if (!scale || !time || !currentGraphic) {
301
+ return
302
+ }
303
+
304
+ let params;
305
+ let poly;
306
+
307
+ if (graphicArr.length > 0) {
308
+ params = graphicArr[graphicArr.length - 1].toJSON()
309
+ poly = graphicArr[graphicArr.length - 1].toGeoJSON({ closure: true })
310
+ } else {
311
+ params = currentGraphic.toJSON()
312
+ poly = currentGraphic.toGeoJSON({ closure: true })
313
+ }
314
+
315
+ if (poly.geometry.coordinates[0].length !== 0) {
316
+ const rotatedPoly = turf.transformScale(poly, scale)
317
+ const spinGraphicParams = cesiumPlot.Util.geoJsonToGraphics(rotatedPoly, {
318
+ style: { ...params.style }
319
+ })
320
+
321
+ const customParams = Object.assign({}, spinGraphicParams[0], {
322
+ name: JSON.stringify({
323
+ time,
324
+ scale
325
+ })
326
+ })
327
+
328
+ const customGraphic = new cesiumPlot.graphic[customParams.type.charAt(0).toUpperCase() + customParams.type.slice(1)](customParams)
329
+ graphicLayer.addGraphic(customGraphic)
330
+ graphicArr.push(customGraphic)
331
+ }
332
+ }
333
+
334
+ const spinEffect = (angle, time) => {
335
+ if (!angle || !time || !currentGraphic) {
336
+ return
337
+ }
338
+
339
+ let params;
340
+ let poly;
341
+
342
+ if (graphicArr.length > 0) {
343
+ params = graphicArr[graphicArr.length - 1].toJSON()
344
+ poly = graphicArr[graphicArr.length - 1].toGeoJSON({ closure: true })
345
+ } else {
346
+ params = currentGraphic.toJSON()
347
+ poly = currentGraphic.toGeoJSON({ closure: true })
348
+ }
349
+
350
+ const centerPoint = cesiumPlot.LngLatPoint.fromCartesian(currentGraphic.center).toArray()
351
+ const rotatedPoly = turf.transformRotate(poly, angle, { pivot: centerPoint })
352
+
353
+ const spinGraphicParams = cesiumPlot.Util.geoJsonToGraphics(rotatedPoly, {
354
+ style: { ...params.style }
355
+ })
356
+
357
+ const customParams = Object.assign({}, spinGraphicParams[0], {
358
+ name: JSON.stringify({
359
+ time,
360
+ angle
361
+ })
362
+ })
363
+
364
+ const customGraphic = new cesiumPlot.graphic[customParams.type.charAt(0).toUpperCase() + customParams.type.slice(1)](customParams)
365
+ graphicLayer.addGraphic(customGraphic)
366
+ graphicArr.push(customGraphic)
367
+ }
368
+
369
+ const execEditTiming = () => {
370
+ if (!graphic) {
371
+ return
372
+ }
373
+
374
+ if (graphic.parent) {
375
+ currentGraphic = graphic.parent
376
+ } else {
377
+ currentGraphic = graphic
378
+ }
379
+
380
+ const params = currentGraphic.toJSON()
381
+ const pName = params.name
382
+ if (params.positions instanceof Array) {
383
+ return
384
+ }
385
+
386
+ currentGraphic.remove()
387
+ currentGraphic = null
388
+
389
+ params.positions.list.forEach((item, i) => {
390
+ if (i === 0) {
391
+ const customParams = JSON.parse(JSON.stringify(params))
392
+
393
+ customParams.name = pName
394
+ customParams.position = item.position
395
+
396
+ const customGraphic = new cesiumPlot.graphic[customParams.type.charAt(0).toUpperCase() + customParams.type.slice(1)](customParams)
397
+ currentGraphic = customGraphic
398
+
399
+ graphicLayer.addGraphic(customGraphic)
400
+ customGraphic.setOptions({
401
+ style: { ...customParams.style }
402
+ })
403
+ } else {
404
+ const customParams = JSON.parse(JSON.stringify(params))
405
+ const customName = {
406
+ time: item.time
407
+ }
408
+
409
+ customParams.name = JSON.stringify(customName)
410
+ customParams.positions = item.positions
411
+ delete customParams.id
412
+
413
+ const customGraphic = new cesiumPlot.graphic[customParams.type.charAt(0).toUpperCase() + customParams.type.slice(1)](customParams)
414
+
415
+ graphicLayer.addGraphic(customGraphic)
416
+ graphicArr.push(customGraphic)
417
+ }
418
+ })
419
+ }
420
+
421
+ const insertTiming = (time) => {
422
+ if (!currentGraphic || !time) return
423
+
424
+ const params = currentGraphic.toJSON()
425
+ const customName = {
426
+ time
427
+ }
428
+
429
+ params.name = JSON.stringify(customName)
430
+ delete params.id
431
+
432
+ graphicLayer.startDraw(params).then(graphic => {
433
+ graphicArr.push(graphic)
434
+ })
435
+
436
+ graphicLayer.endDraw()
437
+ }
438
+
439
+ const removeTiming = (index) => {
440
+ if (!currentGraphic) return
441
+ graphicArr[index].remove()
442
+ graphicArr.splice(index, 1)
443
+ }
444
+
445
+ const updateTiming = (index, options) => {
446
+ const name = JSON.stringify(options)
447
+ graphicArr[index].setOptions({
448
+ name
449
+ })
450
+ }
451
+
452
+ const getTimingList = () => {
453
+ const list = graphicArr.map(graphic => {
454
+ const params = graphic.toJSON()
455
+ return {
456
+ time: JSON.parse(params.name).time
457
+ }
458
+ })
459
+
460
+ return list
461
+ }
462
+
463
+ const saveAndExitEditTiming = () => {
464
+
465
+ if (!graphicArr.length) return
466
+
467
+ const list = graphicArr.map(graphic => {
468
+ const options = graphic.toJSON()
469
+ const params = JSON.parse(options.name)
470
+ return {
471
+ time: params.time,
472
+ positions: options.positions
473
+ }
474
+ })
475
+
476
+ list.unshift({
477
+ time: 0,
478
+ positions: currentGraphic.toJSON().positions
479
+ })
480
+
481
+ currentGraphic.setOptions({
482
+ positions: {
483
+ type: 'time',
484
+ list
485
+ }
486
+ })
487
+
488
+ graphicArr.forEach(graphic => graphic.remove())
489
+ graphicArr = []
490
+ currentGraphic = null
491
+ }
492
+
493
+ const setPointPlotSpeedById = (id, params) => {
494
+ const graphic = graphicLayer.getGraphicById(id)
495
+ if (!graphic) return
496
+
497
+ const options = graphic.toJSON()
498
+
499
+ graphic.setOptions(Object.assign({}, options, {
500
+ position: Object.assign({}, options.position, { speed: params.status ? params.speed : 0.000000001 })
501
+ }))
502
+ }
503
+
504
+ return {
505
+ init,
506
+ destroy,
507
+ startDraw,
508
+ removeGraphicById,
509
+ removeCurrentGraphic,
510
+ clearLayer,
511
+ readJsonAndLoad,
512
+ readFileAndLoad,
513
+ exportJSON,
514
+ saveAndExportFile,
515
+ clickGraphicLayerEvent,
516
+ getGraphicLayerOptions,
517
+ getGraphicOptions,
518
+ getGraphicOptionsById,
519
+ setGraphicOptions,
520
+ setGraphicOptionsById,
521
+ flashEffect,
522
+ scaleEffect,
523
+ spinEffect,
524
+ execEditTiming,
525
+ insertTiming,
526
+ removeTiming,
527
+ updateTiming,
528
+ getTimingList,
529
+ saveAndExitEditTiming,
530
+ setPointPlotSpeedById
531
+ }
532
+ }
533
+
534
+ export {
535
+ usePlot
536
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-three-utils",
3
- "version": "0.0.360",
3
+ "version": "0.0.362",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -8,5 +8,5 @@
8
8
  "author": "",
9
9
  "license": "ISC",
10
10
  "types": "./index.d.ts",
11
- "description": "修复无法编辑问题"
11
+ "description": "新增了点位的路径动画"
12
12
  }