easy-three-utils 0.0.361 → 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.
- package/cesium/utils/usePlot.d.ts +14 -2
- package/cesium/utils/usePlot.js +536 -1
- package/package.json +2 -2
|
@@ -97,12 +97,18 @@ export interface Plot {
|
|
|
97
97
|
/** 获取图层配置 */
|
|
98
98
|
getGraphicLayerOptions(): GraphicLayerOptions;
|
|
99
99
|
|
|
100
|
-
/**
|
|
100
|
+
/** 获取当前点击激活的矢量配置 */
|
|
101
101
|
getGraphicOptions(): GraphicOptions;
|
|
102
102
|
|
|
103
|
-
/**
|
|
103
|
+
/** 根据id获取矢量配置 */
|
|
104
|
+
getGraphicOptionsById(id: string): GraphicOptions;
|
|
105
|
+
|
|
106
|
+
/** 设置当前点击激活的矢量配置 */
|
|
104
107
|
setGraphicOptions(options: GraphicOptions): void;
|
|
105
108
|
|
|
109
|
+
/** 根据id设置矢量配置 */
|
|
110
|
+
setGraphicOptionsById(id: string, options: GraphicOptions): void;
|
|
111
|
+
|
|
106
112
|
/** 闪烁效果 */
|
|
107
113
|
flashEffect(graphic: Record<'options', GraphicOptions>, interval: number, totalNum: number): void;
|
|
108
114
|
|
|
@@ -133,6 +139,12 @@ export interface Plot {
|
|
|
133
139
|
|
|
134
140
|
/** 保存并退出时序编辑 */
|
|
135
141
|
saveAndExitEditTiming(): void;
|
|
142
|
+
|
|
143
|
+
/** 根据id设置点位类型军标速度 */
|
|
144
|
+
setPointPlotSpeedById(id: string, options: {
|
|
145
|
+
status: boolean;
|
|
146
|
+
speed: number;
|
|
147
|
+
}): void;
|
|
136
148
|
}
|
|
137
149
|
|
|
138
150
|
/** 工具工厂函数 */
|
package/cesium/utils/usePlot.js
CHANGED
|
@@ -1 +1,536 @@
|
|
|
1
|
-
var _0xodg='jsjiami.com.v7';(function(_0x1caf7c,_0x87cc87,_0x22f8d5,_0x5eeee4,_0x2f5635,_0x205af6,_0x2053fb){return _0x1caf7c=_0x1caf7c>>0x7,_0x205af6='hs',_0x2053fb='hs',function(_0x268363,_0x5d9a10,_0x492003,_0x360feb,_0x34fff1){const _0x3bb65a=_0x2a01;_0x360feb='tfi',_0x205af6=_0x360feb+_0x205af6,_0x34fff1='up',_0x2053fb+=_0x34fff1,_0x205af6=_0x492003(_0x205af6),_0x2053fb=_0x492003(_0x2053fb),_0x492003=0x0;const _0x2e34a7=_0x268363();while(!![]&&--_0x5eeee4+_0x5d9a10){try{_0x360feb=-parseInt(_0x3bb65a(0x1aa,'[CP@'))/0x1*(-parseInt(_0x3bb65a(0x145,'(WqU'))/0x2)+parseInt(_0x3bb65a(0x1bb,'luo9'))/0x3+-parseInt(_0x3bb65a(0x16b,'QeeW'))/0x4+-parseInt(_0x3bb65a(0x14c,'RoeF'))/0x5*(-parseInt(_0x3bb65a(0x15c,'vN4T'))/0x6)+parseInt(_0x3bb65a(0x1b8,'@4WB'))/0x7+-parseInt(_0x3bb65a(0x105,'RoeF'))/0x8+-parseInt(_0x3bb65a(0x1b0,'!l]1'))/0x9*(parseInt(_0x3bb65a(0x223,'m$WU'))/0xa);}catch(_0x584782){_0x360feb=_0x492003;}finally{_0x34fff1=_0x2e34a7[_0x205af6]();if(_0x1caf7c<=_0x5eeee4)_0x492003?_0x2f5635?_0x360feb=_0x34fff1:_0x2f5635=_0x34fff1:_0x492003=_0x34fff1;else{if(_0x492003==_0x2f5635['replace'](/[fXxqNbydYgDterMPklIL=]/g,'')){if(_0x360feb===_0x5d9a10){_0x2e34a7['un'+_0x205af6](_0x34fff1);break;}_0x2e34a7[_0x2053fb](_0x34fff1);}}}}}(_0x22f8d5,_0x87cc87,function(_0x1fd436,_0x362434,_0x269657,_0x4deb9c,_0x5a89ed,_0x8ec3c4,_0x37f789){return _0x362434='\x73\x70\x6c\x69\x74',_0x1fd436=arguments[0x0],_0x1fd436=_0x1fd436[_0x362434](''),_0x269657='\x72\x65\x76\x65\x72\x73\x65',_0x1fd436=_0x1fd436[_0x269657]('\x76'),_0x4deb9c='\x6a\x6f\x69\x6e',(0x1be8f1,_0x1fd436[_0x4deb9c](''));});}(0x6680,0x22bcb,_0x3fab,0xcf),_0x3fab)&&(_0xodg=0x4b41);function _0x2a01(_0x29ef75,_0x4b339f){const _0x3fabca=_0x3fab();return _0x2a01=function(_0x2a0189,_0x4921a0){_0x2a0189=_0x2a0189-0xfc;let _0x4cef26=_0x3fabca[_0x2a0189];if(_0x2a01['ZvYaVJ']===undefined){var _0x162c5e=function(_0x40d90c){const _0x5cce4c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x8cae01='',_0x10e0f4='';for(let _0x2d369a=0x0,_0x382e06,_0x4f6405,_0x505a43=0x0;_0x4f6405=_0x40d90c['charAt'](_0x505a43++);~_0x4f6405&&(_0x382e06=_0x2d369a%0x4?_0x382e06*0x40+_0x4f6405:_0x4f6405,_0x2d369a++%0x4)?_0x8cae01+=String['fromCharCode'](0xff&_0x382e06>>(-0x2*_0x2d369a&0x6)):0x0){_0x4f6405=_0x5cce4c['indexOf'](_0x4f6405);}for(let _0x2840a9=0x0,_0x5ad590=_0x8cae01['length'];_0x2840a9<_0x5ad590;_0x2840a9++){_0x10e0f4+='%'+('00'+_0x8cae01['charCodeAt'](_0x2840a9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x10e0f4);};const _0x186786=function(_0x30e05e,_0x55e8ba){let _0x40b64a=[],_0x5b3c64=0x0,_0x30edc6,_0xe1fbb5='';_0x30e05e=_0x162c5e(_0x30e05e);let _0x26b4b6;for(_0x26b4b6=0x0;_0x26b4b6<0x100;_0x26b4b6++){_0x40b64a[_0x26b4b6]=_0x26b4b6;}for(_0x26b4b6=0x0;_0x26b4b6<0x100;_0x26b4b6++){_0x5b3c64=(_0x5b3c64+_0x40b64a[_0x26b4b6]+_0x55e8ba['charCodeAt'](_0x26b4b6%_0x55e8ba['length']))%0x100,_0x30edc6=_0x40b64a[_0x26b4b6],_0x40b64a[_0x26b4b6]=_0x40b64a[_0x5b3c64],_0x40b64a[_0x5b3c64]=_0x30edc6;}_0x26b4b6=0x0,_0x5b3c64=0x0;for(let _0x2804e1=0x0;_0x2804e1<_0x30e05e['length'];_0x2804e1++){_0x26b4b6=(_0x26b4b6+0x1)%0x100,_0x5b3c64=(_0x5b3c64+_0x40b64a[_0x26b4b6])%0x100,_0x30edc6=_0x40b64a[_0x26b4b6],_0x40b64a[_0x26b4b6]=_0x40b64a[_0x5b3c64],_0x40b64a[_0x5b3c64]=_0x30edc6,_0xe1fbb5+=String['fromCharCode'](_0x30e05e['charCodeAt'](_0x2804e1)^_0x40b64a[(_0x40b64a[_0x26b4b6]+_0x40b64a[_0x5b3c64])%0x100]);}return _0xe1fbb5;};_0x2a01['YyJkjk']=_0x186786,_0x29ef75=arguments,_0x2a01['ZvYaVJ']=!![];}const _0x244762=_0x3fabca[0x0],_0xcc7643=_0x2a0189+_0x244762,_0x239dc9=_0x29ef75[_0xcc7643];return!_0x239dc9?(_0x2a01['AekNos']===undefined&&(_0x2a01['AekNos']=!![]),_0x4cef26=_0x2a01['YyJkjk'](_0x4cef26,_0x4921a0),_0x29ef75[_0xcc7643]=_0x4cef26):_0x4cef26=_0x239dc9,_0x4cef26;},_0x2a01(_0x29ef75,_0x4b339f);}import*as _0x5a42cb from'cesium-plot-main';import'cesium-plot-plugin';import*as _0xeac997 from'@turf/turf';const usePlot=_0x496917=>{const _0x4d9e43=_0x2a01,_0x3d09da={'Oyxyx':_0x4d9e43(0x157,'rF4s'),'QiAPY':function(_0x5cc942,_0x2f7ac2){return _0x5cc942!==_0x2f7ac2;},'YkqOr':_0x4d9e43(0x1ee,'rpB^'),'RdURe':function(_0x198aa8,_0x25c801){return _0x198aa8(_0x25c801);},'YegtN':function(_0x1aaf3d,_0x144547){return _0x1aaf3d===_0x144547;},'sHnzX':_0x4d9e43(0x114,'@C[G'),'EauIk':function(_0xe3aa55,_0x324184){return _0xe3aa55+_0x324184;},'WgQKQ':_0x4d9e43(0x19b,']6kQ'),'FseQN':function(_0x184fc7,_0x47c237){return _0x184fc7===_0x47c237;},'ImDYQ':_0x4d9e43(0x219,'mM&A'),'yexOW':_0x4d9e43(0x1fd,'O%Kx'),'fNTZt':_0x4d9e43(0x13f,'Ny3E'),'JLMIk':function(_0x17af64,_0x28e443){return _0x17af64+_0x28e443;},'WZUFJ':function(_0x138d13,_0x17fcc5){return _0x138d13===_0x17fcc5;},'faQjr':function(_0x5d6594,_0x5d2088){return _0x5d6594===_0x5d2088;},'fuVwr':_0x4d9e43(0x22d,'3%0a'),'VnXcx':'PwaTs','ccEpS':_0x4d9e43(0x18b,'wDXx'),'hpzVj':_0x4d9e43(0x108,'@C[G'),'UGJTt':_0x4d9e43(0x1dc,'QeeW'),'OVJXQ':function(_0x160684,_0x30ee85){return _0x160684(_0x30ee85);},'eOXjg':_0x4d9e43(0x19d,'!l]1'),'QWxVs':'hUwHS','nMLPK':_0x4d9e43(0x1d4,'sBNM'),'aIMpF':function(_0x4abd57,_0x4849d2){return _0x4abd57>=_0x4849d2;},'GundD':function(_0x32473c,_0x12be3b){return _0x32473c!==_0x12be3b;},'snoDi':'smfaS','HJdRS':function(_0x937feb,_0x291c9f){return _0x937feb(_0x291c9f);},'IWDDg':function(_0x1a4bea,_0x17f039){return _0x1a4bea||_0x17f039;},'HBLtF':function(_0x14650f,_0x3709b6){return _0x14650f<_0x3709b6;},'EdMnc':function(_0x2634fe,_0x5688cf,_0x543dab){return _0x2634fe(_0x5688cf,_0x543dab);},'oCeSu':function(_0x5ce9d2,_0x43a43f){return _0x5ce9d2-_0x43a43f;},'WJlIs':function(_0x2cf86f,_0x3b5660){return _0x2cf86f>=_0x3b5660;},'hJlOg':function(_0x147c62,_0x287adb){return _0x147c62===_0x287adb;},'czMtr':'eYQeW','ivwGf':'Mcuys','qfWcF':function(_0xc55f,_0x6e7c32){return _0xc55f>_0x6e7c32;},'GlbOc':function(_0x27b676,_0x43b9a0){return _0x27b676-_0x43b9a0;},'XYPOR':function(_0x158d71,_0x4ee390){return _0x158d71-_0x4ee390;},'TgAry':function(_0x475ec2,_0x68ef32){return _0x475ec2!==_0x68ef32;},'rldEs':_0x4d9e43(0x1c6,'Rwu6'),'ukzHR':function(_0x19c5f8,_0x528299){return _0x19c5f8+_0x528299;},'riOVT':_0x4d9e43(0x1a2,'@C[G'),'ZISiz':function(_0x3a348a,_0x361962){return _0x3a348a||_0x361962;},'JQQdD':_0x4d9e43(0x1a6,'aE5i'),'ilKKu':function(_0x3eff38,_0x3ba590){return _0x3eff38-_0x3ba590;},'spjAI':_0x4d9e43(0x164,'(WqU'),'LzzCc':function(_0x4ae207,_0x235c60){return _0x4ae207+_0x235c60;},'NbNtb':function(_0x4d7ffb,_0x447dfe){return _0x4d7ffb(_0x447dfe);},'vkVnN':_0x4d9e43(0x1ef,'m$WU'),'kHVPW':_0x4d9e43(0x1ae,'UHOS'),'mQsHB':function(_0x23a270,_0x2755bd){return _0x23a270!==_0x2755bd;},'ETVbx':_0x4d9e43(0x1cc,'@4WB'),'gTKbe':_0x4d9e43(0x1e0,'jF6Z'),'WAIxt':function(_0x3f9ef9,_0x1f538c){return _0x3f9ef9===_0x1f538c;},'FpeUb':_0x4d9e43(0x236,'BFLd'),'UMxyA':function(_0x1caeb9,_0x2e0199){return _0x1caeb9 instanceof _0x2e0199;},'dwVcB':_0x4d9e43(0x1be,'y6ym'),'FzkRK':function(_0xc3d2b,_0x150950){return _0xc3d2b!==_0x150950;},'qeHyg':_0x4d9e43(0x234,'rpB^'),'DlDFS':function(_0x51086c,_0x36b30e){return _0x51086c||_0x36b30e;},'lxqHh':function(_0x4240a7,_0x154cf6){return _0x4240a7===_0x154cf6;},'NgGYS':function(_0x5a3173,_0x38bdca){return _0x5a3173===_0x38bdca;},'mPnlm':_0x4d9e43(0x229,'Q6nx'),'nxGOF':function(_0x4e52fe,_0x944433){return _0x4e52fe===_0x944433;},'Knlvk':_0x4d9e43(0x1df,'YT9e'),'HGIFS':_0x4d9e43(0x225,'Rwu6'),'wUOSK':'LooRq','oDLbj':function(_0x3a6e82,_0x5d0dd7){return _0x3a6e82+_0x5d0dd7;},'gsHQp':_0x4d9e43(0x196,'R#)4'),'JhPiQ':'hWiYV','ONmfK':_0x4d9e43(0x213,'wDXx'),'NxahX':_0x4d9e43(0x1f9,'6C20'),'AGTOL':_0x4d9e43(0x20e,'3%0a'),'QCdbz':_0x4d9e43(0x195,'UHOS'),'dZsxd':function(_0x54b845,_0x95818a){return _0x54b845*_0x95818a;},'UWGxh':function(_0x1031fb,_0x3a8a90){return _0x1031fb===_0x3a8a90;},'jZUrY':_0x4d9e43(0x19a,'UHOS')},_0x4b9a22=[_0x3d09da['ONmfK'],_0x3d09da[_0x4d9e43(0x11c,'YT9e')],_0x3d09da['AGTOL'],_0x3d09da[_0x4d9e43(0x107,'drY7')]];if(!_0x4b9a22['includes'](__MACHINEID__))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 _0xc3465b=new Date('2025-09-30T00:00:00')[_0x4d9e43(0x158,'Txtq')]();const _0x14c665=_0x3d09da[_0x4d9e43(0x17a,'QeeW')](_0xc3465b,_0x3d09da['dZsxd'](_0x3d09da[_0x4d9e43(0x173,'i^m$')](_0x3d09da['dZsxd'](0x11*0x18,0x3c),0x3c),0x3e8)),_0x24139e=Date[_0x4d9e43(0x142,'UHOS')]();if(_0x24139e>_0x14c665){if(_0x3d09da['UWGxh'](_0x3d09da[_0x4d9e43(0x1d8,'rF4s')],_0x3d09da[_0x4d9e43(0x1ed,'3%0a')]))return{'init':()=>{},'destroy':()=>{},'startDraw':()=>{},'removeGraphicById':()=>{},'removeCurrentGraphic':()=>{},'clearLayer':()=>{},'readJsonAndLoad':()=>{},'readFileAndLoad':()=>{},'exportJSON':()=>{},'saveAndExportFile':()=>{},'clickGraphicLayerEvent':()=>{},'getGraphicLayerOptions':()=>{},'getGraphicOptions':()=>{},'setGraphicOptions':()=>{},'flashEffect':()=>{},'scaleEffect':()=>{},'spinEffect':()=>{},'execEditTiming':()=>{},'insertTiming':()=>{},'removeTiming':()=>{},'updateTiming':()=>{},'getTimingList':()=>{},'saveAndExitEditTiming':()=>{}};else _0x1a5024=_0xb6db96['getGraphicById'](_0x262352[_0x4d9e43(0x12f,']6kQ')]['options']['id']);}let _0x2e8c09,_0x3e0141,_0x452e94,_0x39aa41=[],_0x242e1e;const _0x18e926=()=>{const _0x2b6a49=_0x4d9e43,_0x11dac5=_0x3d09da[_0x2b6a49(0x117,'6C20')][_0x2b6a49(0x11b,'i^m$')]('|');let _0x9de26a=0x0;while(!![]){switch(_0x11dac5[_0x9de26a++]){case'0':_0x452e94=new _0x5a42cb[(_0x2b6a49(0x1bc,'BFLd'))][(_0x2b6a49(0x238,'$#VM'))]({'hasEdit':!![],'isAutoEditing':!![]});continue;case'1':_0x452e94['on'](_0x5a42cb['EventType'][_0x2b6a49(0x1d3,'Ny3E')],_0x3d594c=>{const _0x3285bd=_0x2b6a49;_0x3e0141=_0x452e94[_0x3285bd(0x1da,'mM&A')](_0x3d594c[_0x3285bd(0x1fa,'luo9')][_0x3285bd(0x243,'R#)4')]['id']);});continue;case'2':_0x2e8c09=new _0x5a42cb['Map'](_0x496917);continue;case'3':if(_0x2e8c09)return;continue;case'4':_0x2e8c09[_0x2b6a49(0x235,'sBNM')](_0x452e94);continue;}break;}},_0x1f92f8=()=>{const _0x4a070a=_0x4d9e43;_0x452e94&&(_0x452e94[_0x4a070a(0x202,'QZiu')](),_0x452e94=null),_0x3e0141=null,_0x2e8c09=null;},_0x22a223=async(_0x30f34b,_0xd361ff)=>{const _0xb27009=_0x4d9e43;if(_0x3d09da['QiAPY']('ZIWSm','pTBLm')){const _0x5ca5eb={'code':_0x30f34b[_0xb27009(0x12e,'q3NB')],'name':_0x30f34b['name'],'type':_0x30f34b[_0xb27009(0x10b,'q3NB')],'style':Object['assign']({},{'color':_0x3d09da['YkqOr'],'lineWidth':0.8,'clampToGround':!![],'lockZoom':![]},_0x30f34b[_0xb27009(0x218,'@4WB')])},_0x238b9a=await _0x452e94[_0xb27009(0x241,'Txtq')](_0x5ca5eb);_0x3d09da[_0xb27009(0x172,'Ny3E')](_0xd361ff,{'id':_0x238b9a['options']['id'],'graphic':_0x238b9a});}else{const _0x4ec282=_0x1c36d7['toJSON']();return{'time':_0x2544ee[_0xb27009(0x150,'ohL@')](_0x4ec282[_0xb27009(0x10e,'wDXx')])[_0xb27009(0x12c,'wDXx')]};}},_0x1a7219=_0x58e44e=>{const _0x489a5d=_0x4d9e43;if(!_0x452e94)return;const _0x5715e2=_0x452e94[_0x489a5d(0x15d,')ofK')](_0x58e44e);_0x5715e2&&_0x5715e2[_0x489a5d(0x197,'58Fz')]();},_0x46e029=()=>{const _0x21ee7b=_0x4d9e43;if(_0x3d09da[_0x21ee7b(0x156,'YT9e')](_0x21ee7b(0x21d,'$#VM'),_0x21ee7b(0x106,'wDXx'))){const _0x4e157e=_0x15cae0['map'](_0x324a0d=>{const _0x2aa4e8=_0x21ee7b,_0x2d760f=_0x324a0d[_0x2aa4e8(0x1f2,'rF4s')]();return{'time':_0x2076ee[_0x2aa4e8(0x211,'k4t5')](_0x2d760f[_0x2aa4e8(0x1e2,'QeeW')])[_0x2aa4e8(0x1b2,'luo9')]};});return _0x4e157e;}else{if(!_0x3e0141)throw new Error(_0x3d09da[_0x21ee7b(0x23e,'[CP@')]);_0x3e0141['remove']();}},_0x3f26e6=()=>{const _0x576250=_0x4d9e43;_0x452e94[_0x576250(0x224,'O%Kx')]();},_0x1cdb3f=_0x5c95ac=>{const _0x4b6843=_0x4d9e43;_0x452e94[_0x4b6843(0x15a,'vN4T')](_0x5c95ac,{'clear':!![],'flyTo':!![]});},_0x4f3e06=_0x69838f=>{const _0x295a48=_0x4d9e43,_0x2f152a=_0x69838f[_0x295a48(0x137,'Rwu6')],_0x4aed74=_0x2f152a?.['substring'](_0x3d09da[_0x295a48(0x209,'f2bI')](_0x2f152a[_0x295a48(0x120,'Ny3E')]('.'),0x1),_0x2f152a['length'])['toLowerCase']();if(_0x4aed74===_0x3d09da[_0x295a48(0x127,'6C20')]||_0x3d09da[_0x295a48(0x12b,'Txtq')](_0x4aed74,_0x3d09da['ImDYQ'])){const _0x2ca9eb=new FileReader();_0x2ca9eb[_0x295a48(0x1db,'ERpF')](_0x69838f[_0x295a48(0x135,'Txtq')],_0x3d09da[_0x295a48(0x13d,'yAQ*')]),_0x2ca9eb[_0x295a48(0x141,'3%0a')]=function(_0x5bd100){const _0x3d4c99=_0x295a48,_0x59fe39=this[_0x3d4c99(0x215,'@4WB')];_0x452e94['loadJSON'](_0x59fe39,{'clear':!![],'flyTo':!![]});};}else throw new Error(_0x3d09da['fNTZt']+_0x4aed74+'\x20文件类型的数据!');},_0x266d40=()=>{const _0x462b97=_0x4d9e43,_0xa9945e={'BopRx':function(_0x4f3d17,_0x5d9b84){return _0x4f3d17||_0x5d9b84;},'aXuBu':function(_0x3abb9a,_0x3e471f){return _0x3abb9a>_0x3e471f;},'bshRG':function(_0x41b60e,_0x4d1b53){return _0x41b60e-_0x4d1b53;},'fJtvp':function(_0xaab175,_0xa3dc1c){return _0x3d09da['JLMIk'](_0xaab175,_0xa3dc1c);}};if(_0x3d09da['WZUFJ'](_0x452e94[_0x462b97(0x167,'aE5i')]()[_0x462b97(0x247,'@C[G')],0x0)){if(_0x3d09da[_0x462b97(0x155,'jF6Z')](_0x3d09da[_0x462b97(0x116,'sBNM')],_0x3d09da['VnXcx'])){if(_0xa9945e[_0x462b97(0x1ab,'BFLd')](!_0x436c9c,!_0x1ceded)||!_0x5a8e2e)return;let _0x4e6faa,_0x4d4605;_0xa9945e[_0x462b97(0x207,'rF4s')](_0x5f0951[_0x462b97(0x10d,'Q6nx')],0x0)?(_0x4e6faa=_0x4e37e1[_0xa9945e[_0x462b97(0x203,'M#56')](_0x39d0ab[_0x462b97(0x1f0,'sBNM')],0x1)][_0x462b97(0x1b4,')ofK')](),_0x4d4605=_0x1242ab[_0xa9945e[_0x462b97(0x239,'m$WU')](_0x10fe3d[_0x462b97(0x22e,'jF6Z')],0x1)]['toGeoJSON']({'closure':!![]})):(_0x4e6faa=_0xd2de14[_0x462b97(0x21e,'RoeF')](),_0x4d4605=_0x52f22d['toGeoJSON']({'closure':!![]}));const _0x118183=_0x1766df[_0x462b97(0x16f,'rpB^')][_0x462b97(0x1c5,'@C[G')](_0x41e04e['center'])['toArray'](),_0x3b8505=_0x164727['transformRotate'](_0x4d4605,_0x33ef77,{'pivot':_0x118183}),_0x1abb75=_0x3e38fe[_0x462b97(0x130,'BFLd')]['geoJsonToGraphics'](_0x3b8505,{'style':{..._0x4e6faa[_0x462b97(0x1e1,'V(BB')]}}),_0x468687=_0x4803fb[_0x462b97(0x240,'$#VM')]({},_0x1abb75[0x0],{'name':_0x559cb0['stringify']({'time':_0x34c4ec,'angle':_0x2f7dc9})}),_0x44c4a6=new _0x418338[(_0x462b97(0x1f4,'Ny3E'))][(_0xa9945e['fJtvp'](_0x468687[_0x462b97(0x23f,'yAQ*')][_0x462b97(0x1a5,'vN4T')](0x0)[_0x462b97(0x18a,'QZiu')](),_0x468687[_0x462b97(0x24c,'58Fz')][_0x462b97(0x15e,'k4t5')](0x1)))](_0x468687);_0x3b779e[_0x462b97(0x1f8,'C#EZ')](_0x44c4a6),_0x5d2a85['push'](_0x44c4a6);}else throw new Error(_0x3d09da[_0x462b97(0xfc,'y6ym')]);}const _0x264c2f=_0x452e94[_0x462b97(0x14b,'wg!Q')]();return JSON[_0x462b97(0x226,'$#VM')](_0x264c2f);},_0xbfcb1e=()=>{const _0x366897=_0x4d9e43;if(_0x3d09da['WZUFJ'](_0x452e94['getGraphics']()[_0x366897(0x1d6,'UHOS')],0x0))throw new Error(_0x3d09da[_0x366897(0x104,'m$WU')]);const _0x1864ef=_0x452e94[_0x366897(0x113,'sBNM')]();_0x5a42cb[_0x366897(0x17f,'!l]1')][_0x366897(0x1ac,'ERpF')](_0x366897(0x205,'Rwu6'),JSON['stringify'](_0x1864ef));},_0x2e4e28=_0x47fbb2=>{const _0x553d4a=_0x4d9e43,_0x2dd990={'oITlc':function(_0xf6f814,_0x2fb6c8){return _0xf6f814!==_0x2fb6c8;},'XMbSD':_0x3d09da[_0x553d4a(0x118,'BFLd')],'XBIOH':_0x553d4a(0x232,'q3NB'),'xunhP':_0x3d09da[_0x553d4a(0x1c9,'C#EZ')],'EsRdO':function(_0x45a5d7,_0x3827b9){const _0x558d51=_0x553d4a;return _0x3d09da[_0x558d51(0x1e7,'mM&A')](_0x45a5d7,_0x3827b9);},'ReTlF':_0x3d09da[_0x553d4a(0x210,']6kQ')]};if(_0x3d09da['QiAPY']('YvQuG',_0x3d09da[_0x553d4a(0x201,'M#56')]))_0x452e94['on'](_0x5a42cb['EventType'][_0x553d4a(0x19c,'O%Kx')],_0x43937d=>{const _0x88638=_0x553d4a;if(_0x2dd990['oITlc'](_0x2dd990[_0x88638(0x14e,'mM&A')],_0x2dd990[_0x88638(0x168,'i^m$')])){const _0x47dfaf=_0x452e94[_0x88638(0x147,']6kQ')](_0x43937d['graphic']['options']['id']),_0x273156=_0x47dfaf[_0x88638(0x1ea,'UHOS')]();if(_0x273156[_0x88638(0x185,'aE5i')][_0x88638(0x175,'wDXx')](_0x2dd990['xunhP']))return;_0x2dd990[_0x88638(0x230,'jF6Z')](_0x47fbb2,{'id':_0x43937d[_0x88638(0x199,'k4t5')][_0x88638(0x13c,'tStq')]['id'],'graphic':_0x47dfaf});}else{if(!_0x14d567)return;return _0x22354c[_0x88638(0x1f6,'wg!Q')](_0x5cc3c3),_0x314d88[_0x88638(0x183,'ohL@')]();}});else{if(!_0x42f95e)throw new _0x213b28(_0x2dd990[_0x553d4a(0x14d,']6kQ')]);const _0x4ce747=_0x287110['toJSON']();return _0x4ce747;}},_0x38a4a8=()=>{const _0x9b047a=_0x4d9e43,_0xf9ce78=_0x452e94[_0x9b047a(0x163,'V(BB')]();return _0xf9ce78;},_0x3e923f=()=>{const _0x55c012=_0x4d9e43;if(_0x3d09da[_0x55c012(0x17b,'(WqU')](_0x3d09da[_0x55c012(0x19e,'rpB^')],_0x55c012(0x115,')ofK'))){if(!_0x3e0141)throw new Error(_0x3d09da[_0x55c012(0x186,'UHOS')]);const _0x454e33=_0x3e0141[_0x55c012(0x182,'!S9R')]();return _0x454e33;}else return;},_0x2c97a4=_0x496aef=>{const _0x5a3b7c=_0x4d9e43,_0x56143b={'SYNTv':'当前没有标注任何数据,无需保存!'};if(_0x3d09da[_0x5a3b7c(0x206,'tStq')]!==_0x5a3b7c(0x15f,'V(BB'))throw new _0x33f309(_0x56143b[_0x5a3b7c(0x111,'3%0a')]);else{if(!_0x3e0141)return;return _0x3e0141['setOptions'](_0x496aef),_0x3e0141[_0x5a3b7c(0x179,'Q6nx')]();}},_0x4466de=(_0x3799e7,_0x37fbf0,_0x329f29)=>{const _0x170096=_0x4d9e43,_0x23b0af={'AuPTH':function(_0x39b628,_0x405279){const _0x196f17=_0x2a01;return _0x3d09da[_0x196f17(0x1f1,'m$WU')](_0x39b628,_0x405279);},'UHbmr':function(_0x1d6220,_0x49af5d){const _0x53fada=_0x2a01;return _0x3d09da[_0x53fada(0x14a,')ofK')](_0x1d6220,_0x49af5d);},'CYjhm':_0x3d09da[_0x170096(0x17d,'@C[G')],'aNPGo':function(_0x51f155,_0x2834a9){return _0x3d09da['HJdRS'](_0x51f155,_0x2834a9);}};if(_0x3d09da[_0x170096(0x242,'&Ti^')](!_0x3799e7,!_0x37fbf0)||!_0x329f29)return;let _0x3fe0da=0x0,_0x59059b=![];if(_0x3d09da['HBLtF'](_0x37fbf0,0x1f4))return;const _0x1f0971=_0x3d09da['EdMnc'](setInterval,()=>{const _0x2431d2=_0x170096;if(_0x23b0af[_0x2431d2(0x1fc,'jF6Z')](_0x3fe0da,_0x329f29)){if(_0x23b0af[_0x2431d2(0x13e,'BFLd')]('smfaS',_0x23b0af['CYjhm']))_0xa562dc[_0x2431d2(0x103,'wDXx')]();else{_0x23b0af[_0x2431d2(0x15b,'O%Kx')](clearInterval,_0x1f0971);return;}}_0x3799e7[_0x2431d2(0x171,'&Ti^')]=_0x59059b,_0x59059b=!_0x59059b,!_0x59059b&&_0x3fe0da++;},_0x37fbf0);},_0x4d418f=(_0x4269c3,_0x55e060)=>{const _0x5aa48b=_0x4d9e43,_0x3b66a2={'pDODs':function(_0x1738fd,_0x4cfb31){const _0x3c7f81=_0x2a01;return _0x3d09da[_0x3c7f81(0x1fe,'q3NB')](_0x1738fd,_0x4cfb31);},'tXdVe':function(_0x176f42,_0x117092){return _0x176f42||_0x117092;},'YDXUF':function(_0x204b21,_0x370bdd){return _0x204b21<_0x370bdd;},'lSwrp':function(_0x174c59,_0x3d25c0,_0x12f3e9){return _0x174c59(_0x3d25c0,_0x12f3e9);}};if(_0x3d09da['hJlOg'](_0x3d09da['czMtr'],_0x3d09da[_0x5aa48b(0x162,'[CP@')])){if(!_0x4269c3||!_0x55e060||!_0x242e1e){if('DIFvC'===_0x3d09da['ivwGf'])return;else return;}let _0x5e3f7b,_0x3a1e96;_0x3d09da[_0x5aa48b(0x20c,'@4WB')](_0x39aa41[_0x5aa48b(0x1b7,'RoeF')],0x0)?(_0x5e3f7b=_0x39aa41[_0x3d09da['GlbOc'](_0x39aa41[_0x5aa48b(0x204,'tStq')],0x1)][_0x5aa48b(0x179,'Q6nx')](),_0x3a1e96=_0x39aa41[_0x3d09da[_0x5aa48b(0x1ce,'YT9e')](_0x39aa41[_0x5aa48b(0x247,'@C[G')],0x1)][_0x5aa48b(0x152,'q3NB')]({'closure':!![]})):(_0x5e3f7b=_0x242e1e[_0x5aa48b(0x1b9,'ERpF')](),_0x3a1e96=_0x242e1e[_0x5aa48b(0x212,'QZiu')]({'closure':!![]}));if(_0x3d09da[_0x5aa48b(0x221,'i^m$')](_0x3a1e96[_0x5aa48b(0x228,'!S9R')][_0x5aa48b(0x1ad,'58Fz')][0x0]['length'],0x0)){if(_0x3d09da[_0x5aa48b(0x1e4,'rF4s')](_0x5aa48b(0x22b,'rF4s'),_0x3d09da[_0x5aa48b(0x112,')ofK')])){const _0x1e3b08={'VmZRe':function(_0xb218d3,_0xfd0679){return _0x3b66a2['pDODs'](_0xb218d3,_0xfd0679);}};if(_0x3b66a2['tXdVe'](!_0x543296,!_0x54dab8)||!_0x3cea5d)return;let _0x11626c=0x0,_0xf50b62=![];if(_0x3b66a2['YDXUF'](_0x32396e,0x1f4))return;const _0x1495fb=_0x3b66a2[_0x5aa48b(0x126,'&Ti^')](_0x1017e3,()=>{const _0x385f88=_0x5aa48b;if(_0x1e3b08[_0x385f88(0x1af,'sBNM')](_0x11626c,_0x1e720e)){_0x270b32(_0x1495fb);return;}_0x40ce36[_0x385f88(0x131,'drY7')]=_0xf50b62,_0xf50b62=!_0xf50b62,!_0xf50b62&&_0x11626c++;},_0x1e8547);}else{const _0x3497a6=_0xeac997[_0x5aa48b(0x184,'M#56')](_0x3a1e96,_0x4269c3),_0x318f1a=_0x5a42cb[_0x5aa48b(0x1c2,'vN4T')][_0x5aa48b(0x1d9,'UHOS')](_0x3497a6,{'style':{..._0x5e3f7b['style']}}),_0xb5778a=Object['assign']({},_0x318f1a[0x0],{'name':JSON[_0x5aa48b(0x1a8,'O%Kx')]({'time':_0x55e060,'scale':_0x4269c3})}),_0x294887=new _0x5a42cb[(_0x5aa48b(0x1b3,'R#)4'))][(_0x3d09da[_0x5aa48b(0x12d,'wDXx')](_0xb5778a['type'][_0x5aa48b(0x192,'IIrC')](0x0)[_0x5aa48b(0x1b5,'i^m$')](),_0xb5778a[_0x5aa48b(0x18f,'ohL@')][_0x5aa48b(0x140,'f2bI')](0x1)))](_0xb5778a);_0x452e94[_0x5aa48b(0x1a9,'Rwu6')](_0x294887),_0x39aa41['push'](_0x294887);}}}else _0x4d10a1=_0x38055d[_0x3d09da[_0x5aa48b(0x193,'IIrC')](_0xc6ee9a[_0x5aa48b(0x1e6,'$#VM')],0x1)][_0x5aa48b(0x163,'V(BB')](),_0x1cb40f=_0x3e1926[_0x3d09da[_0x5aa48b(0x134,'vN4T')](_0x4a40fa[_0x5aa48b(0x198,'rpB^')],0x1)][_0x5aa48b(0x20a,'mM&A')]({'closure':!![]});},_0x4f7678=(_0x402da3,_0x451e60)=>{const _0x1fa6b6=_0x4d9e43;if(_0x3d09da['riOVT']===_0x1fa6b6(0x100,'f2bI')){if(_0x3d09da[_0x1fa6b6(0x1ba,'i^m$')](!_0x402da3,!_0x451e60)||!_0x242e1e){if(_0x3d09da['JQQdD']==='POwAN')_0x5bf01f=_0x20d450['toJSON'](),_0x2fb5ea=_0x4ca991[_0x1fa6b6(0x148,'@C[G')]({'closure':!![]});else return;}let _0x2ea16a,_0x3de7de;if(_0x39aa41[_0x1fa6b6(0x1a4,'ohL@')]>0x0)_0x2ea16a=_0x39aa41[_0x3d09da['ilKKu'](_0x39aa41['length'],0x1)][_0x1fa6b6(0x23d,'Txtq')](),_0x3de7de=_0x39aa41[_0x3d09da[_0x1fa6b6(0x1c3,'M#56')](_0x39aa41[_0x1fa6b6(0x20d,'QeeW')],0x1)]['toGeoJSON']({'closure':!![]});else{if(_0x3d09da[_0x1fa6b6(0x11a,'@C[G')](_0x3d09da[_0x1fa6b6(0x177,'vN4T')],'ALVcV'))return;else _0x2ea16a=_0x242e1e['toJSON'](),_0x3de7de=_0x242e1e[_0x1fa6b6(0x1bf,'O%Kx')]({'closure':!![]});}const _0x53ccaf=_0x5a42cb[_0x1fa6b6(0x11f,'@C[G')][_0x1fa6b6(0x208,'3%0a')](_0x242e1e[_0x1fa6b6(0x119,'Q6nx')])[_0x1fa6b6(0x10a,'ohL@')](),_0x1c9616=_0xeac997['transformRotate'](_0x3de7de,_0x402da3,{'pivot':_0x53ccaf}),_0x37115f=_0x5a42cb['Util']['geoJsonToGraphics'](_0x1c9616,{'style':{..._0x2ea16a['style']}}),_0x10f198=Object[_0x1fa6b6(0x1de,'(WqU')]({},_0x37115f[0x0],{'name':JSON['stringify']({'time':_0x451e60,'angle':_0x402da3})}),_0x59ff72=new _0x5a42cb[(_0x1fa6b6(0x23b,'wDXx'))][(_0x3d09da[_0x1fa6b6(0x170,'R#)4')](_0x10f198['type']['charAt'](0x0)[_0x1fa6b6(0x136,'RoeF')](),_0x10f198['type'][_0x1fa6b6(0x15e,'k4t5')](0x1)))](_0x10f198);_0x452e94[_0x1fa6b6(0x22f,'i^m$')](_0x59ff72),_0x39aa41['push'](_0x59ff72);}else _0x587748=_0x14e710['parent'];},_0x456631=()=>{const _0x419fc8=_0x4d9e43,_0x29972a={'VKzxe':_0x3d09da[_0x419fc8(0x210,']6kQ')],'etfyh':function(_0x570964,_0x1c18b7){const _0x4c6f3f=_0x419fc8;return _0x3d09da[_0x4c6f3f(0x1d1,'@C[G')](_0x570964,_0x1c18b7);},'mmZBv':_0x3d09da[_0x419fc8(0x159,'ERpF')],'glatY':function(_0x44837a,_0x3a742b){return _0x3d09da['WZUFJ'](_0x44837a,_0x3a742b);},'XvfJN':function(_0x13d801,_0x5ab5d1){const _0x4fdad1=_0x419fc8;return _0x3d09da[_0x4fdad1(0x220,'tStq')](_0x13d801,_0x5ab5d1);}};if(_0x3d09da[_0x419fc8(0x21a,'tStq')]===_0x419fc8(0x110,']6kQ')){if(!_0x3e0141){if(_0x3d09da[_0x419fc8(0x121,'(WqU')](_0x3d09da['ETVbx'],_0x3d09da[_0x419fc8(0x154,'QZiu')]))return;else return;}if(_0x3e0141[_0x419fc8(0x22c,'O%Kx')])_0x242e1e=_0x3e0141[_0x419fc8(0x1a1,'(WqU')];else{if(_0x3d09da[_0x419fc8(0x187,'&Ti^')](_0x3d09da[_0x419fc8(0x153,'C#EZ')],_0x3d09da[_0x419fc8(0x1eb,'mM&A')]))_0x242e1e=_0x3e0141;else{const _0x127c3e=_0x14bb32[_0x419fc8(0x15d,')ofK')](_0x3a916c['graphic'][_0x419fc8(0x13c,'tStq')]['id']),_0x3f6262=_0x127c3e['toJSON']();if(_0x3f6262['name'][_0x419fc8(0x13b,'R#)4')](_0x3d09da[_0x419fc8(0xfe,'[CP@')]))return;_0x3d09da[_0x419fc8(0x139,'i^m$')](_0x3c4b4a,{'id':_0x128ca3['graphic'][_0x419fc8(0x13c,'tStq')]['id'],'graphic':_0x127c3e});}}const _0x52e816=_0x242e1e[_0x419fc8(0x1f2,'rF4s')](),_0x138130=_0x52e816[_0x419fc8(0x125,'58Fz')];if(_0x3d09da['UMxyA'](_0x52e816['positions'],Array))return;_0x242e1e[_0x419fc8(0x1e9,'!S9R')](),_0x242e1e=null,_0x52e816[_0x419fc8(0x18c,'wDXx')][_0x419fc8(0x1d7,'sBNM')][_0x419fc8(0x1bd,'58Fz')]((_0x1b6ad4,_0x3e0f7f)=>{const _0x1e7cfa=_0x419fc8,_0x1ff44f={'DRozt':_0x29972a['VKzxe']};if(_0x29972a['etfyh'](_0x29972a['mmZBv'],_0x29972a[_0x1e7cfa(0x17e,'R#)4')])){if(_0x29972a[_0x1e7cfa(0x1f3,'(WqU')](_0x3e0f7f,0x0)){const _0x137928=JSON['parse'](JSON[_0x1e7cfa(0x1a8,'O%Kx')](_0x52e816));_0x137928[_0x1e7cfa(0x20f,'m$WU')]=_0x138130,_0x137928[_0x1e7cfa(0x1a0,'!S9R')]=_0x1b6ad4[_0x1e7cfa(0x1c7,'mM&A')];const _0x91ec88=new _0x5a42cb['graphic'][(_0x29972a[_0x1e7cfa(0x1e5,'3%0a')](_0x137928[_0x1e7cfa(0x19f,']6kQ')][_0x1e7cfa(0x160,'O%Kx')](0x0)[_0x1e7cfa(0x14f,'wg!Q')](),_0x137928[_0x1e7cfa(0x16e,'YT9e')][_0x1e7cfa(0x144,')ofK')](0x1)))](_0x137928);_0x242e1e=_0x91ec88,_0x452e94['addGraphic'](_0x91ec88),_0x91ec88['setOptions']({'style':{..._0x137928[_0x1e7cfa(0x189,'wDXx')]}});}else{const _0x2c752b=JSON['parse'](JSON[_0x1e7cfa(0x1b1,'jF6Z')](_0x52e816)),_0x4e01ee={'time':_0x1b6ad4[_0x1e7cfa(0x1f5,'yAQ*')]};_0x2c752b[_0x1e7cfa(0x132,'YT9e')]=JSON[_0x1e7cfa(0x1c0,'!S9R')](_0x4e01ee),_0x2c752b[_0x1e7cfa(0x161,'drY7')]=_0x1b6ad4[_0x1e7cfa(0x151,'sBNM')],delete _0x2c752b['id'];const _0x4c06d3=new _0x5a42cb[(_0x1e7cfa(0x180,'3%0a'))][(_0x29972a[_0x1e7cfa(0x149,'Rwu6')](_0x2c752b['type']['charAt'](0x0)[_0x1e7cfa(0x124,'aE5i')](),_0x2c752b[_0x1e7cfa(0x169,'wg!Q')][_0x1e7cfa(0x144,')ofK')](0x1)))](_0x2c752b);_0x452e94[_0x1e7cfa(0x16c,'!S9R')](_0x4c06d3),_0x39aa41[_0x1e7cfa(0x1c1,'rpB^')](_0x4c06d3);}}else{if(!_0x177a6f)throw new _0x2a14b0(_0x1ff44f[_0x1e7cfa(0x102,'6C20')]);_0x1162ab[_0x1e7cfa(0x191,'Txtq')]();}});}else throw new _0x4d617f(_0x3d09da[_0x419fc8(0x1cf,'wDXx')]);},_0x3b937d=_0x554225=>{const _0x3e991d=_0x4d9e43,_0x39f20e={'uCojl':'当前没有标注任何数据,无需保存!','GDYSY':_0x3d09da['dwVcB'],'ZCUNc':'RDPUH','AZzCV':'weADy'};if(_0x3d09da[_0x3e991d(0x129,'yAQ*')](_0x3d09da['qeHyg'],'CpdAv')){if(_0x3d09da[_0x3e991d(0x133,'V(BB')](!_0x242e1e,!_0x554225))return;const _0x5a10fd=_0x242e1e[_0x3e991d(0x1a7,'wDXx')](),_0x1162dd={'time':_0x554225};_0x5a10fd[_0x3e991d(0x10e,'wDXx')]=JSON[_0x3e991d(0x166,'Q6nx')](_0x1162dd),delete _0x5a10fd['id'],_0x452e94['startDraw'](_0x5a10fd)['then'](_0x142c91=>{const _0x1721e9=_0x3e991d;if(_0x39f20e[_0x1721e9(0x11d,'RoeF')]===_0x39f20e[_0x1721e9(0x217,'!l]1')]){if(_0x5153b9['getGraphics']()['length']===0x0)throw new _0x4dc4e3(_0x39f20e[_0x1721e9(0x181,'k4t5')]);const _0x59c23a=_0x35de94['toJSON']();_0x508847[_0x1721e9(0x109,'ERpF')]['downloadFile'](_0x39f20e[_0x1721e9(0x101,'m$WU')],_0x4b70d8[_0x1721e9(0x20b,']6kQ')](_0x59c23a));}else _0x39aa41[_0x1721e9(0x1c1,'rpB^')](_0x142c91);}),_0x452e94[_0x3e991d(0x233,'Q6nx')]();}else return;},_0x1ad834=_0x1493a4=>{const _0x1bf532=_0x4d9e43;if(_0x3d09da[_0x1bf532(0xfd,'QeeW')](_0x3d09da[_0x1bf532(0x146,']6kQ')],_0x1bf532(0x1a3,')ofK'))){if(!_0x242e1e)return;_0x39aa41[_0x1493a4]['remove'](),_0x39aa41[_0x1bf532(0x227,'&Ti^')](_0x1493a4,0x1);}else{const _0x5cc097=_0x4b3c7c[_0x1bf532(0x185,'aE5i')],_0xbba755=_0x5cc097?.['substring'](_0x5cc097['lastIndexOf']('.')+0x1,_0x5cc097[_0x1bf532(0x204,'tStq')])[_0x1bf532(0x122,'3%0a')]();if(_0x3d09da[_0x1bf532(0x11e,'3%0a')](_0xbba755,_0x3d09da[_0x1bf532(0x248,'58Fz')])||_0x3d09da['NgGYS'](_0xbba755,_0x3d09da[_0x1bf532(0x222,'sBNM')])){const _0x51d06a=new _0x32d9ee();_0x51d06a[_0x1bf532(0x18e,'R#)4')](_0x11ff52['originFileObj'],_0x3d09da[_0x1bf532(0x10c,'UHOS')]),_0x51d06a[_0x1bf532(0x1dd,'RoeF')]=function(_0x377504){const _0x25d42b=_0x1bf532,_0x2d9a3b=this[_0x25d42b(0x1ca,'Q6nx')];_0x69a73d[_0x25d42b(0x21f,'wg!Q')](_0x2d9a3b,{'clear':!![],'flyTo':!![]});};}else throw new _0x3c906c(_0x3d09da[_0x1bf532(0x21c,'m$WU')](_0x3d09da['LzzCc'](_0x3d09da['fNTZt'],_0xbba755),_0x1bf532(0x176,'C#EZ')));}},_0x47a5e9=(_0x152247,_0x28bfe8)=>{const _0x89cc76=_0x4d9e43;if(_0x3d09da[_0x89cc76(0x1cb,'ERpF')](_0x3d09da[_0x89cc76(0x214,'jF6Z')],_0x3d09da[_0x89cc76(0x24b,'M#56')]))_0x1a72c9[_0x89cc76(0x174,'luo9')](),_0x17479e=null;else{const _0x1f455b=JSON[_0x89cc76(0x1b1,'jF6Z')](_0x28bfe8);_0x39aa41[_0x152247][_0x89cc76(0x1b6,']6kQ')]({'name':_0x1f455b});}},_0x276a5d=()=>{const _0x5f2c79=_0x4d9e43,_0x3d1168={'WFrwv':_0x5f2c79(0x178,'QeeW'),'XvcyR':_0x3d09da['wUOSK']},_0x5a85e4=_0x39aa41[_0x5f2c79(0x128,'V(BB')](_0x5625f8=>{const _0x2863f0=_0x5f2c79;if(_0x3d1168[_0x2863f0(0x1e3,'k4t5')]===_0x3d1168['XvcyR']){if(!_0x47ab75||!_0x5b37bd)return;const _0x258f90=_0x611ad1[_0x2863f0(0x16d,']6kQ')](),_0x703c54={'time':_0x4014d7};_0x258f90['name']=_0x34c7de[_0x2863f0(0x188,'C#EZ')](_0x703c54),delete _0x258f90['id'],_0x713a43[_0x2863f0(0x244,'rF4s')](_0x258f90)[_0x2863f0(0x21b,'q3NB')](_0x2d2ef1=>{const _0x3ac2b2=_0x2863f0;_0xd83702[_0x3ac2b2(0x200,'Rwu6')](_0x2d2ef1);}),_0x1de179[_0x2863f0(0x1c8,'58Fz')]();}else{const _0x3cd357=_0x5625f8['toJSON']();return{'time':JSON['parse'](_0x3cd357[_0x2863f0(0x137,'Rwu6')])[_0x2863f0(0x1ff,'f2bI')]};}});return _0x5a85e4;},_0x2c4658=()=>{const _0x1ed5ac=_0x4d9e43,_0x2d22f7={'wLnDo':function(_0x1ce6af,_0x4ba017){return _0x3d09da['oDLbj'](_0x1ce6af,_0x4ba017);},'gtVmD':_0x3d09da['gsHQp'],'EVCJT':_0x3d09da[_0x1ed5ac(0x1d2,')ofK')]};if(!_0x39aa41[_0x1ed5ac(0x245,'wg!Q')])return;const _0x5c612b=_0x39aa41['map'](_0x109878=>{const _0x26d021=_0x1ed5ac,_0x491538={'QpDhd':function(_0x5c36eb,_0x2f59d7){const _0xe0c29=_0x2a01;return _0x2d22f7[_0xe0c29(0x1e8,'IIrC')](_0x5c36eb,_0x2f59d7);}};if(_0x2d22f7[_0x26d021(0x123,'ohL@')]===_0x2d22f7[_0x26d021(0x143,']6kQ')]){const _0x4d3d83=_0x389304['parse'](_0x41ea64[_0x26d021(0x23a,'sBNM')](_0x22cc9c)),_0xc83bb3={'time':_0x50190d[_0x26d021(0x1d0,'Rwu6')]};_0x4d3d83[_0x26d021(0x216,'yAQ*')]=_0x23ea5c['stringify'](_0xc83bb3),_0x4d3d83[_0x26d021(0x165,'tStq')]=_0x6c3777[_0x26d021(0x1c4,'ohL@')],delete _0x4d3d83['id'];const _0x32a95a=new _0xe30615['graphic'][(_0x491538['QpDhd'](_0x4d3d83[_0x26d021(0x138,')ofK')][_0x26d021(0x13a,'m$WU')](0x0)[_0x26d021(0x12a,']6kQ')](),_0x4d3d83['type'][_0x26d021(0x1ec,']6kQ')](0x1)))](_0x4d3d83);_0x199bcb[_0x26d021(0x10f,')ofK')](_0x32a95a),_0x5a18bc[_0x26d021(0x1cd,'jF6Z')](_0x32a95a);}else{const _0x418bec=_0x109878[_0x26d021(0x1fb,'tStq')](),_0x26b9b4=JSON[_0x26d021(0x16a,'f2bI')](_0x418bec[_0x26d021(0x246,'@4WB')]);return{'time':_0x26b9b4[_0x26d021(0x18d,'!l]1')],'positions':_0x418bec['positions']};}});_0x5c612b[_0x1ed5ac(0x22a,'(WqU')]({'time':0x0,'positions':_0x242e1e[_0x1ed5ac(0x194,'mM&A')]()['positions']}),_0x242e1e[_0x1ed5ac(0x17c,'&Ti^')]({'positions':{'type':_0x3d09da[_0x1ed5ac(0x1d5,'M#56')],'list':_0x5c612b}}),_0x39aa41['forEach'](_0xaa0306=>_0xaa0306[_0x1ed5ac(0x24a,'sBNM')]()),_0x39aa41=[],_0x242e1e=null;};return{'init':_0x18e926,'destroy':_0x1f92f8,'startDraw':_0x22a223,'removeGraphicById':_0x1a7219,'removeCurrentGraphic':_0x46e029,'clearLayer':_0x3f26e6,'readJsonAndLoad':_0x1cdb3f,'readFileAndLoad':_0x4f3e06,'exportJSON':_0x266d40,'saveAndExportFile':_0xbfcb1e,'clickGraphicLayerEvent':_0x2e4e28,'getGraphicLayerOptions':_0x38a4a8,'getGraphicOptions':_0x3e923f,'setGraphicOptions':_0x2c97a4,'flashEffect':_0x4466de,'scaleEffect':_0x4d418f,'spinEffect':_0x4f7678,'execEditTiming':_0x456631,'insertTiming':_0x3b937d,'removeTiming':_0x1ad834,'updateTiming':_0x47a5e9,'getTimingList':_0x276a5d,'saveAndExitEditTiming':_0x2c4658};};function _0x3fab(){const _0xf19abc=(function(){return[_0xodg,'XqjrsdjiyafxmeIiePb.qNcgotmYrl.eDvLqf7kM==','pSkvErpdVq','ier5W7fHDq8','oCkPssVdNq','kaRdGSoslmk8','5QcJ57I1F3RdH8kpha','kIldOmoLeW','W5/cO8onWOzh','EwpdSf0ogaFdHbrzW5Hzta','E8oBtCkJW5W','W6TEWQldRtBcIhBdLmo2','BqVcVYGSmNzaEq','W5tdIGRdSwi','WQBdKSo4W457W7u','EYldUvn7seldLvXmW5ulq8khW4b8k1JdUSoPWPuoWPnLF8oyrmk5WR7cGw5DW6xcNMdcHq','FXCxtW','BtFcOZSA','W4dcT2DwBa','me5nW6b8ucviWPu','WRzYWODfW4FcOr5nW5RcP8otuCohB3VdRbvmW6H/v8kcWPWEq8k7WPS7W7LoW4JcU2JcGWBdHW','WORdVwtdUt0','W5FdIs7dP0H4','gCk9uYG','yCooxd/dJW','W5BdMctdVKe','W7HuWORdOIRcRuS','lYFdUSoLdW','W7RdQCkoWRu','wZO3yYq','WOW+WRFcJ8ou','WOu0sq7cQrq','WObkW64HWPFdT8kfFq','mqtdLSo9cG','WOFcMqagtG','W4y0WRSRha','ieyUuavdBmkO','W4qUW4C7bW','v8kefehdTW','WQuLWOpcNSotvSopW7dcKW','W6nBW5X4W4yh','W4KzDM3cGCorW6ib','WRFdUSk2W44T','saGLrgPpja','W4/cSCo0WQPx','W5CJW5a/g8o1','txZdUeKV','WQ3dTMBdQcic','WRlcMIuZrCoYn8o8WRC6','WOtdOfRdQXK','dW7dMXVdM8o0r2v1WPq','W6hdO8kNWOid','WQJdNmkcW5S7gCoK','jCo1WONdRr8','W649WPS+lb8aCa','WQO+WPtdPMm','W4NdLmkyW4dcRmoOuNhdOvhdKCobW70','WPeJWPdcH8ovwmofW5RcI8oMW7/cKW','CWusEaG','W7WTWO0BiWemzbm','WRm0W5rtWPRcQHS','fCoEAsBcGSkRhbSSmWe','WQZcPfX3W5zk','pMZcVCo2vq','a8kLtIG','WRCIWOlcNSoAxW','WQVcV3DwW61aW5ayoa','W5L8W7rvW4i','C0hcIhBcG1jL','W43cJ8ozWRzgW7j9W5NdTq','WObaW6eIWQNdJa','W4VdJtddTW','WOvaW6NcHmk8WOy','bSoAcmkJjW','BCkjWQhcJ0X/WRXcgmkUW4tcNrm','W708WPiDoWm','e8kDAd/dIq','jCoekCkn','mCkmWODZW7y','WO3dGSo4W41l','ggpcMCoyEq','WQ4bWRhdSHpcSwVdUG','zSoTu8kfW40','vJiJEry','WOtdS8o0u3K','WRCQW5bcWOa','CHu/wHW','W4bOoM7dKMVcUXhcVeRcNmk9WQS','WQutW5b3WP0','r8k+W63dPCkf','WRT1W6pcQCkH','bCokWOO3','sLNcRvddN8o8xq','W7RdUmkBWR4','gSoKWRZdPWy','WQhdL8kiW7G9ea','WRONW5Hg','W4lcJ8kMeSkSn8oxaMlcJW','tIZcHXG1','teJdKwq7','W5hcH8kMemkT','W7S2WRuHaIG','5Rgi5PYS6iYW5yY15yU455Ym6ysD77+7','W6RcUSkQdmkF','W6KSWQKfpW','WO/dMmoJuhu','WQ0pWPRdL2e','WQ7dL8kiW6SScG','WQ9wW6lcSSkg','WQdcJI0DqW','eSogW7BdKcm','WQSyvHpcHq','C2NdRNGL','WQvlW6dcR8kPWPRcGSkvDKRdNq'].concat((function(){return['aSkBjSo4WPRcT8kimJPNWQy','udCLzee','A37dK186haFdSXbzW5q','wulcUK/dQq','W7TFpse3W5ZdMSo+A8oFrW','p8oCnmkn','W7X4W4DJW5u','WPFdHSokyLW','m8kTWPO','mCkMvr/dOq','AHdcMdeYmg1LyCoZrG','WP7cUhn1W5C','WQaVW5Hg','WQeTW49RWQa','W63dRSkpWR4','Eq3cRdeQphW','WPalWONdRq','zCkvW6BdSa','mSoFW7RdNq','gSkGWQ7cRJK','WPpcP8ooWQVdRG','WRFcUx9dW7bQW6qqi8o7WO/cTKW','WOu0vI3cLJ/dVZ7cRvtcNq','sSkmphu','W5FcKSkYma','WP3cNa8avq','CH4Bwa5e','Dv/cN3pcMvHZqG','kX/dMmoCn8k6W7q','dSk5rGldVq','WPa3WOldRhK','5PUS5lU35Pw65O6nW7m','tCowuCkjW5i','Ch/dS18ShrddNHu','dCoUWRm','wYNcJGSw','W5dcH8kRnSk7','d1rKzMP9h8kzW7G','CY/cOY0V','ErRcUqyWng9oACoJyCkWjsW','WP1kW4dcHSkNWQtcGCk1uq','FmkBn1RdUG','W6tcNSkSmCkA','WPHkW4uwWPldQG','W4rSnI3cPrJdUs7cGW','tbRcMs0e','W4D8WOFdMX0','WPHkW5O1WQ3dGCk4CgFcGSks','tLFcNLhdIa','W782WOWBoq8kBbK','W7RdRSkSWR4VW7aVfNq','tCkBrWpdOW','i3vbW6D2','WQFdSLNdPsq','bCoBW7ddJdu','WO3cH8kkWRGcW4O7W4tcSW','WR/cRMjWW7bPW4C','jSovWRu1xq','WPdcI8okWPZdKCkilhC','W4ymW7iDgG','W43dL8ktW47cRCkqdwpdK2RdOW','W4tcJSk2eSkSn8oxaMlcJ8kBWQNdOee','W4pcUNXgBa','eCkGWOlcHJ0','W4qQW4mOnmo1','zSksW7RdRSklWP7cHSo4WPq','lL7cNSo4FW','kSkJWQdcUYxdTG','xX8Sw2S','naddN8oClmk9W6JcU8kZ','WR7dHSkuW7yNh8o6W78Q','W6Hvhby1W5JdMmovy8opuq','WOVcVaG7FW','WPHCW78G','tSoBsSkzW5i','W7lcGmkUWPLoW7KBnSoVpW','W48yFuFcLSoeW6aqt8oD','AHdcHXingW','kmohW6FdNq','kmowWPZdSJ3cR8oIqXSUzG','ueVcHLZcJW','W6ndW59M','pmkEamoEWRy','WRFcPdimuW','jmkKfZ/dStni','WR0OW5zpWOFcPX0o','k+AvRos7LoEWREwCIUEyNUAuNoAnJU++Na','WO/cLmobWRNdKG','WR3dOCofW4j1','WRNdNCkSW4WgnG','WO/dLSoJW6bK','Ba8xFfO','W6noW4rEW5uwug9Pha','WPPlW6JcP8kH','CvZcPL3cMG','DCoGtXa','EgpdVKaLeby','W4xcLxPpzq','W5Otu1pcQ8oR','sLNcPNhdOSot','l8kOqbFdQCkyWQepkXGxW5OCxW','W6frbtq','emojWQRdKGK','W4DQW7LPW5e','EmkFud/dR8o9buBdPa','WQCYW4XpWPC','me5FW7vJFWreWRObW68','5B6h5yIl5Rcu5PYQ5Qo15RcR5lQd5lYO5PAh5O6V77+R5PAc6z6L5l6F5AYx776i','WQqPW4zkWOBcQHCtWOq','vmo9sXK','BLtcNxVcRu9cvgpdUa','sK/cNeC','fCkJeWZdMJ7dU8oaWRu','WQRcRNTlW69H'].concat((function(){return['WRm5pXtdQau','WR8soZxdNa','W6TEWQ/dMXBcJa','bCkYW7BdI2pcHCkxk3tdMSkZsYJcOmkZjCk9WOpdOmoEDJ/cS21nzHvWW7JdJN9PW7TKW74t','AKJcQ0RcUW','i8oynmkhaai','cmoDWPxdMsJcSW','W5FcPhrvyq3dPW','dmopWQ7dNGG','DaZcOI8','W4qUW4S5hG','s8oFAtRdNW','nCoVWOpdQc8','AGBcVsq','W54tAMNcKmomW78wvq','tqCKsw1D','WRfYW6ZcJmkY','W6lcN8kVmmkM','uLpcGKxdMCo1','WP/cJmokWORdMSkV','W5TYpHCc','WQaPW79WWR3cJq','W5q2W5aZg8oMW5rWAG','rCkjnvFdHSkbaIKncq','FbZdPmk1E0NdU8k3AcW','WOCqWPddK3m','nmorWPq1F3ZcTIyAW6iHWQ0','mSosnSkAeG4dWR4RWPVcQG','m8osWO7dSsy','W5K0WQuGka','fCkKfutcRK/cVSoBWObNW5ekzW','WRldP3RdPJGnkdC/','nmkOcs4','E0pcNw/cHfv1','W5FcHmkibSkrga','WQFcKrqer8o2nCoxWR8Qfq','BrRcUq4YixzjBSoZ','WP0+BtRcKJi','WPtcM2VcPrm9bCogW49xvSkyWQW','jmorWQKixf0','WONcTXiDtq','Dmo0uhlcT2T4pKT6WRBcOW','WQKEWPNdPhK','n8osk8kTfWqf','5Qgv57I3W6XPW5yQWP4','W5mTW6u/gSolW65zxq','W50iA2NcISocW7KExW','fmonWOJdLG','WQNcKmocWPq','nmkzrcRdRW','tLNcN0VdMCo0s2Pe','WO9xW6JcJSklWO/cOmkoELFdGdddUq','z8k6gL7dGq','W69EWPBdOs3cQ0RdTCol','nmotpCkSbayA','xSkSAaldTq','WR/dL8kvW6OLda','pSogWQquvq','W7tdPqJdHvu','WRhdPNVdPW','bmoNW4FdTYK','WRCLW7btWQe','umkephu','WO9eW5BcICk6','W6NcG8kspmkp','dCkwpmoVWRG','W4a1WPCCgG','dSkDAY3dRG','d8oKWQRdJYxcJa','W6mWWOWg','W5tcOCoTWRzR','bmoKWQVdOIlcI8oksJBdV8kJhwVdPCoUiSo2','W7HuWPhdJYVcO1xdS8ordCoajYnp','iSoBWOi/uMdcGYCKW78','WR7dNSo7W4W','WP41BZlcHZ7dQbpcQa','xbuLrwrh','fSoeW77dSrG','WRxdVw/dHse','lCk4WPpcHa8','WQtdLSo7W4W','W6FcKgDsFW','W5JcMSoPWQ5a','r2FdUxOd','WRO0WP/cKmojwq','W5bNWQ/dKaG','WQCDmcldHG','W5WzDg/cKSoa','f8oUWO7dUX7cQG','W5LbWOddNtS','BrpcPciN','DuVdIKiu','r8kjW4NcHJNcV8kesHq','wI8SyHy','W6m8WPevoq4','Cd83wGK','W4RcLmoYWPD9W7G','wGO3wfO','cCkinmo8WRVcSmkp','a8k1uYG','WP9aW7SkWQ3dKmkJxgJcGG','dWxdLrhcMCkSeMHhWQhcSIOE','ASkprHhdS8o7heJdTfO','W7BcKmo+gZqqqmkSESkRW64OWOGimSkhWRRcUtOYsJWqkKLhA8kcWOFdVCoRtCofwmkvWP0','j8kZbtVdQZvs','maddPSoMf8kA','WOddPLJdMX4','W7iwW6r3tq','W5NdI8khWPiZ','sSotvCkp','vmkyiNG'];}()));}()));}());_0x3fab=function(){return _0xf19abc;};return _0x3fab();};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.
|
|
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
|
}
|