/** * Mars3D平台插件,结合echarts可视化功能插件 mars3d-echarts * * 版本信息:v3.10.1 * 编译日期:2025-08-04 14:15 * 版权所有:Copyright by 火星科技 http://mars3d.cn * 使用单位:山东慧创信息科技有限公司 ,2025-08-04 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, (window.mars3d || require('mars3d')), (window.echarts || require('echarts'))) : typeof define === 'function' && define.amd ? define(['exports', 'mars3d', 'echarts'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-echarts"] = {}, global.mars3d, global.echarts)); })(this, (function (exports, mars3d, echarts) { 'use strict';const _0x32e9da=_0x1e8b;function _0x1877(){const _0x2ee7db=['0px','1AkpjJp','setEchartsOption','924436ifJFyq','absolute','请引入\x20echarts\x20库\x20','isArray','zIndex','Cartographic','matrix','mars3dMap','4908RfrJrD','series','Rectangle','coordinateSystem','container','dimensions','moveHandler','8WPFniG','clientWidth','469133IiMasG','48EBGUeh','top','51285ooECje','scene','getOwnPropertyDescriptor','options','10rTFxJv','api','scheduler','default','_showHook','style','canvas','lng','getBMap','registerCoordinateSystem','420376gwoUCn','_echartsInstance','DomUtil','off','value','3351293CSQUtF','visible','pointerEvents','mars3dMapRoam','__esModule','fixedHeight','getHeight','get','_mars3d_scene','ellipsoid','forEach','getAttrVal','div','ecInstance','extendComponentView','_api','lat','_setOptionsHook','coords','mars3d-echarts','EchartsLayer','camera','486645IHQbLM','max','63jhrGAN','355749nYFUgd','echarts','_echartsContainer','_map','height'];_0x1877=function(){return _0x2ee7db;};return _0x1877();}(function(_0x4ad05a,_0x4c2cd8){const _0x5f0ea7={_0x2f8eba:0x1f4,_0x53fcc7:0x1f6,_0x154b12:0x208,_0x29ab0a:0x207,_0x3d29bf:0x1d0,_0x1ee60f:0x1ed,_0x575f0b:0x1d5,_0x418f23:0x20a},_0xb2dad6=_0x1e8b,_0x27b266=_0x4ad05a();while(!![]){try{const _0x5c5a90=-parseInt(_0xb2dad6(_0x5f0ea7._0x2f8eba))/0x1*(parseInt(_0xb2dad6(_0x5f0ea7._0x53fcc7))/0x2)+-parseInt(_0xb2dad6(0x1ee))/0x3+parseInt(_0xb2dad6(0x205))/0x4*(-parseInt(_0xb2dad6(0x1eb))/0x5)+-parseInt(_0xb2dad6(_0x5f0ea7._0x154b12))/0x6*(parseInt(_0xb2dad6(_0x5f0ea7._0x29ab0a))/0x7)+-parseInt(_0xb2dad6(_0x5f0ea7._0x3d29bf))/0x8*(-parseInt(_0xb2dad6(_0x5f0ea7._0x1ee60f))/0x9)+-parseInt(_0xb2dad6(0x1c6))/0xa*(parseInt(_0xb2dad6(_0x5f0ea7._0x575f0b))/0xb)+-parseInt(_0xb2dad6(0x1fe))/0xc*(-parseInt(_0xb2dad6(_0x5f0ea7._0x418f23))/0xd);if(_0x5c5a90===_0x4c2cd8)break;else _0x27b266['push'](_0x27b266['shift']());}catch(_0x52dc8f){_0x27b266['push'](_0x27b266['shift']());}}}(_0x1877,0x59204));function _interopNamespace(_0x4ace39){const _0x55790f={_0x4dd672:0x1c4};if(_0x4ace39&&_0x4ace39['__esModule'])return _0x4ace39;var _0x2cae21=Object['create'](null);return _0x4ace39&&Object['keys'](_0x4ace39)['forEach'](function(_0x4674f3){const _0x45e0db=_0x1e8b;if(_0x4674f3!=='default'){var _0x8e6fe9=Object[_0x45e0db(_0x55790f._0x4dd672)](_0x4ace39,_0x4674f3);Object['defineProperty'](_0x2cae21,_0x4674f3,_0x8e6fe9[_0x45e0db(0x1dc)]?_0x8e6fe9:{'enumerable':!![],'get':function(){return _0x4ace39[_0x4674f3];}});}}),_0x2cae21['default']=_0x4ace39,_0x2cae21;}var mars3d__namespace=_interopNamespace(mars3d),echarts__namespace=_interopNamespace(echarts);function _0x1e8b(_0x5253eb,_0x14eb46){const _0x1877d8=_0x1877();return _0x1e8b=function(_0x1e8b7d,_0x25688f){_0x1e8b7d=_0x1e8b7d-0x1c4;let _0x32b087=_0x1877d8[_0x1e8b7d];return _0x32b087;},_0x1e8b(_0x5253eb,_0x14eb46);}const Cesium$1=mars3d__namespace['Cesium'];class CompositeCoordinateSystem{constructor(_0x159e4d,_0x35a620){const _0xb6c209={_0x41e151:0x203},_0x5bb7af=_0x1e8b;this['_mars3d_scene']=_0x159e4d,this[_0x5bb7af(_0xb6c209._0x41e151)]=[_0x5bb7af(0x1cd),'lat'],this['_mapOffset']=[0x0,0x0],this['_api']=_0x35a620;}['setMapOffset'](_0x3f4e5c){this['_mapOffset']=_0x3f4e5c;}[_0x32e9da(0x1ce)](){return this['_mars3d_scene'];}['dataToPoint'](_0x1cb503){const _0x3a8a31={_0x19312d:0x1fb},_0xddba07=_0x32e9da,_0x81be28=this['_mars3d_scene'],_0x407fc0=[NaN,NaN];let _0x37c8b1=_0x81be28['echartsFixedHeight'];_0x81be28['echartsAutoHeight']&&(_0x37c8b1=_0x81be28[_0xddba07(0x1db)](Cesium$1[_0xddba07(_0x3a8a31._0x19312d)]['fromDegrees'](_0x1cb503[0x0],_0x1cb503[0x1])));const _0x164871=Cesium$1['Cartesian3']['fromDegrees'](_0x1cb503[0x0],_0x1cb503[0x1],_0x37c8b1);if(!_0x164871)return _0x407fc0;const _0x12f76e=mars3d__namespace['PointTrans']['toWindowCoordinates'](_0x81be28,_0x164871);if(!_0x12f76e)return _0x407fc0;if(_0x81be28['echartsDepthTest']&&_0x81be28['mode']===Cesium$1['SceneMode']['SCENE3D']){const _0x4b1fd2=new Cesium$1['EllipsoidalOccluder'](_0x81be28['globe'][_0xddba07(0x1de)],_0x81be28[_0xddba07(0x1ea)]['positionWC']),_0x5a27bf=_0x4b1fd2['isPointVisible'](_0x164871);if(!_0x5a27bf)return _0x407fc0;}return[_0x12f76e['x']-this['_mapOffset'][0x0],_0x12f76e['y']-this['_mapOffset'][0x1]];}['getViewRect'](){const _0x2c9c60=_0x32e9da,_0x9c0a0e=this[_0x2c9c60(0x1e4)];return new echarts__namespace['graphic']['BoundingRect'](0x0,0x0,_0x9c0a0e['getWidth'](),_0x9c0a0e['getHeight']());}['getRoamTransform'](){const _0x48ccbe={_0xc9a6c1:0x1fc},_0x94c443=_0x32e9da;return echarts__namespace[_0x94c443(_0x48ccbe._0xc9a6c1)]['create']();}}CompositeCoordinateSystem['dimensions']=['lng',_0x32e9da(0x1e5)],CompositeCoordinateSystem['create']=function(_0x60d06b,_0x4d5a0b){const _0x273455={_0x173017:0x1dd},_0x4f86e4={_0x389fbb:0x1dc},_0xfc8feb=_0x32e9da;let _0x3ea037;const _0x3930b9=_0x60d06b[_0xfc8feb(0x1c8)]['ecInstance'][_0xfc8feb(_0x273455._0x173017)];_0x60d06b['eachComponent']('mars3dMap',function(_0x53656a){const _0x39ee36=_0xfc8feb,_0x367c9e=_0x4d5a0b['getZr']()['painter'];if(!_0x367c9e)return;!_0x3ea037&&(_0x3ea037=new CompositeCoordinateSystem(_0x3930b9,_0x4d5a0b)),_0x53656a[_0x39ee36(0x201)]=_0x3ea037,_0x3ea037['setMapOffset'](_0x53656a['__mapOffset']||[0x0,0x0]);}),_0x60d06b['eachSeries'](function(_0x47b078){const _0x4d1f23=_0xfc8feb;_0x47b078[_0x4d1f23(_0x4f86e4._0x389fbb)]('coordinateSystem')==='mars3dMap'&&(!_0x3ea037&&(_0x3ea037=new CompositeCoordinateSystem(_0x3930b9,_0x4d5a0b)),_0x47b078['coordinateSystem']=_0x3ea037);});};if(echarts__namespace!==null&&echarts__namespace!==void 0x0&&echarts__namespace['init'])echarts__namespace[_0x32e9da(0x1cf)](_0x32e9da(0x1fd),CompositeCoordinateSystem),echarts__namespace['registerAction']({'type':_0x32e9da(0x1d8),'event':_0x32e9da(0x1d8),'update':'updateLayout'},function(_0x278ae9,_0x13790f){}),echarts__namespace['extendComponentModel']({'type':'mars3dMap','getBMap':function(){return this['_mars3d_scene'];},'defaultOption':{'roam':![]}}),echarts__namespace[_0x32e9da(0x1e3)]({'type':'mars3dMap','init':function(_0x3670b3,_0x338133){const _0x3aec5f={_0x5256ff:0x1c7,_0x58ae49:0x20b,_0x55cdae:0x1e2},_0x5aa6d0=_0x32e9da;this[_0x5aa6d0(_0x3aec5f._0x5256ff)]=_0x338133,this[_0x5aa6d0(_0x3aec5f._0x58ae49)]=_0x3670b3['scheduler'][_0x5aa6d0(_0x3aec5f._0x55cdae)]['_mars3d_scene'],this['scene']['postRender']['addEventListener'](this[_0x5aa6d0(0x204)],this);},'moveHandler':function(_0x56bd58,_0x68482d){this['api']['dispatchAction']({'type':'mars3dMapRoam'});},'render':function(_0x48356d,_0x2d8303,_0x3deabc){},'dispose':function(_0x461d88){const _0x56dce1={_0x2d72fb:0x20b},_0x22208a=_0x32e9da;this[_0x22208a(_0x56dce1._0x2d72fb)]['postRender']['removeEventListener'](this['moveHandler'],this);}});else throw new Error(_0x32e9da(0x1f8));const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer']['BaseLayer'];class EchartsLayer extends BaseLayer{constructor(_0x391f58={}){super(_0x391f58),this['_pointerEvents']=this['options']['pointerEvents'];}get['layer'](){return this['_echartsInstance'];}get['pointerEvents'](){return this['_pointerEvents'];}set[_0x32e9da(0x1d7)](_0x2785b7){const _0x25ab6e={_0x43e623:0x1d7},_0x3a22f5=_0x32e9da;this['_pointerEvents']=_0x2785b7,this['_echartsContainer']&&(_0x2785b7?this['_echartsContainer']['style']['pointerEvents']='all':this['_echartsContainer']['style'][_0x3a22f5(_0x25ab6e._0x43e623)]='none');}[_0x32e9da(0x1e6)](_0x540683,_0x1dede4){this['setEchartsOption'](_0x540683);}[_0x32e9da(0x1ca)](_0x2ff484){const _0x57b501={_0x2f29b7:0x1d6},_0x2a80f7=_0x32e9da;_0x2ff484?this[_0x2a80f7(0x1f0)]['style']['visibility']=_0x2a80f7(_0x57b501._0x2f29b7):this['_echartsContainer'][_0x2a80f7(0x1cb)]['visibility']='hidden';}['_mountedHook'](){const _0x83a9b5={_0x3d0a20:0x1f1,_0x3c9492:0x1c5},_0x34d9c3=_0x32e9da;this['_map']['scene']['echartsDepthTest']=this[_0x34d9c3(0x1c5)]['depthTest']??!![],this['_map']['scene']['echartsAutoHeight']=this['options']['clampToGround']??![],this[_0x34d9c3(_0x83a9b5._0x3d0a20)]['scene']['echartsFixedHeight']=this[_0x34d9c3(_0x83a9b5._0x3c9492)][_0x34d9c3(0x1da)]??0x0;}['_addedHook'](){const _0x38f5be=_0x32e9da;this['_echartsContainer']=this['_createChartOverlay'](),this[_0x38f5be(0x1d1)]=echarts__namespace['init'](this[_0x38f5be(0x1f0)]),this['_echartsInstance']['_mars3d_scene']=this['_map'][_0x38f5be(0x20b)],this['setEchartsOption'](this['options']);}['_removedHook'](){const _0x5e2be9=_0x32e9da;this[_0x5e2be9(0x1d1)]&&(this['_echartsInstance']['clear'](),this['_echartsInstance']['dispose'](),delete this['_echartsInstance']),this['_echartsContainer']&&(this['_map']['container']['removeChild'](this['_echartsContainer']),delete this['_echartsContainer']);}['_createChartOverlay'](){const _0x56c0a7={_0x781166:0x1d2,_0x55daca:0x1e1,_0x40c4d1:0x202,_0x2b3391:0x1f7,_0x2b022a:0x1cc,_0xdcd9:0x206,_0x33447f:0x1f2,_0x22c7cb:0x1cb,_0x25bff8:0x1c5},_0x65e9ba=_0x32e9da,_0x5df0c9=mars3d__namespace[_0x65e9ba(_0x56c0a7._0x781166)]['create'](_0x65e9ba(_0x56c0a7._0x55daca),_0x65e9ba(0x1e8),this['_map'][_0x65e9ba(_0x56c0a7._0x40c4d1)]);return _0x5df0c9['id']=this['id'],_0x5df0c9[_0x65e9ba(0x1cb)]['position']=_0x65e9ba(_0x56c0a7._0x2b3391),_0x5df0c9['style'][_0x65e9ba(0x209)]='0px',_0x5df0c9['style']['left']=_0x65e9ba(0x1f3),_0x5df0c9[_0x65e9ba(0x1cb)]['width']=this['_map']['scene'][_0x65e9ba(_0x56c0a7._0x2b022a)][_0x65e9ba(_0x56c0a7._0xdcd9)]+'px',_0x5df0c9['style'][_0x65e9ba(_0x56c0a7._0x33447f)]=this['_map']['scene']['canvas']['clientHeight']+'px',_0x5df0c9[_0x65e9ba(_0x56c0a7._0x22c7cb)]['pointerEvents']=this['_pointerEvents']?'all':'none',_0x5df0c9['style'][_0x65e9ba(0x1fa)]=this[_0x65e9ba(_0x56c0a7._0x25bff8)]['zIndex']??0x9,_0x5df0c9;}['resize'](){const _0x2b4a88={_0x59f043:0x20b},_0x1a2675=_0x32e9da;if(!this['_echartsInstance'])return;this[_0x1a2675(0x1f0)][_0x1a2675(0x1cb)]['width']=this['_map'][_0x1a2675(_0x2b4a88._0x59f043)]['canvas'][_0x1a2675(0x206)]+'px',this['_echartsContainer']['style']['height']=this['_map']['scene']['canvas']['clientHeight']+'px',this['_echartsInstance']['resize']();}[_0x32e9da(0x1f5)](_0x450d1c,_0x57ccde,_0x2efabe){const _0x139d58={_0x120d9c:0x1e0},_0x37f3dc=_0x32e9da;this['_echartsInstance']&&(_0x450d1c={'mars3dMap':{},...mars3d__namespace['Util'][_0x37f3dc(_0x139d58._0x120d9c)](_0x450d1c,{'onlySimpleType':!![]})},delete _0x450d1c['eventParent'],this['_echartsInstance']['setOption'](_0x450d1c,_0x57ccde,_0x2efabe));}['getRectangle'](_0x456e7e){const _0x532eee={_0x3b2d9f:0x200},_0x4f5cd9={_0x8739d3:0x1f9},_0x8ff247=_0x32e9da;let _0x50aa5b,_0x8e5fab,_0x35cae8,_0x135d6b;function _0x6f74bd(_0x281685){const _0x28a03b=_0x1e8b;if(!Array[_0x28a03b(_0x4f5cd9._0x8739d3)](_0x281685))return;const _0x58d9a5=_0x281685[0x0]||0x0,_0x464e0c=_0x281685[0x1]||0x0;_0x58d9a5!==0x0&&_0x464e0c!==0x0&&(_0x50aa5b===undefined?(_0x50aa5b=_0x58d9a5,_0x8e5fab=_0x58d9a5,_0x35cae8=_0x464e0c,_0x135d6b=_0x464e0c):(_0x50aa5b=Math['min'](_0x50aa5b,_0x58d9a5),_0x8e5fab=Math['max'](_0x8e5fab,_0x58d9a5),_0x35cae8=Math['min'](_0x35cae8,_0x464e0c),_0x135d6b=Math[_0x28a03b(0x1ec)](_0x135d6b,_0x464e0c)));}const _0x9c907a=this['options'][_0x8ff247(0x1ff)];_0x9c907a&&_0x9c907a['forEach'](_0x500a22=>{const _0x2ae8dd=_0x8ff247;_0x500a22['data']&&_0x500a22['data'][_0x2ae8dd(0x1df)](_0xa1ee06=>{const _0x50d2cf=_0x2ae8dd;if(_0xa1ee06[_0x50d2cf(0x1d4)])_0x6f74bd(_0xa1ee06['value']);else _0xa1ee06[_0x50d2cf(0x1e7)]&&_0xa1ee06[_0x50d2cf(0x1e7)][_0x50d2cf(0x1df)](_0x359293=>{_0x6f74bd(_0x359293);});});});if(_0x50aa5b===0x0&&_0x35cae8===0x0&&_0x8e5fab===0x0&&_0x135d6b===0x0)return null;return _0x456e7e!==null&&_0x456e7e!==void 0x0&&_0x456e7e['isFormat']?{'xmin':_0x50aa5b,'xmax':_0x8e5fab,'ymin':_0x35cae8,'ymax':_0x135d6b}:Cesium[_0x8ff247(_0x532eee._0x3b2d9f)]['fromDegrees'](_0x50aa5b,_0x35cae8,_0x8e5fab,_0x135d6b);}['on'](_0x419fe3,_0x126811,_0x18e590){return this['_echartsInstance']['on'](_0x419fe3,_0x126811,_0x18e590||this),this;}['onByQuery'](_0x12591c,_0x172d67,_0x535816,_0xf6cf97){return this['_echartsInstance']['on'](_0x12591c,_0x172d67,_0x535816,_0xf6cf97||this),this;}[_0x32e9da(0x1d3)](_0x828165,_0x69becd,_0x33c3fb){const _0x593ce8={_0x4c95f4:0x1d3},_0x40470d=_0x32e9da;return this['_echartsInstance'][_0x40470d(_0x593ce8._0x4c95f4)](_0x828165,_0x69becd,_0x33c3fb||this),this;}}mars3d__namespace['LayerUtil']['register']('echarts',EchartsLayer),mars3d__namespace['layer'][_0x32e9da(0x1e9)]=EchartsLayer,mars3d__namespace[_0x32e9da(0x1ef)]=echarts__namespace,mars3d__namespace['Log']['logInfo']('mars3d-echarts插件\x20注册成功'),exports['EchartsLayer']=EchartsLayer,Object['keys'](echarts)[_0x32e9da(0x1df)](function(_0xf801af){const _0x3b1fc4=_0x32e9da;if(_0xf801af!==_0x3b1fc4(0x1c9)&&!exports['hasOwnProperty'](_0xf801af))Object['defineProperty'](exports,_0xf801af,{'enumerable':!![],'get':function(){return echarts[_0xf801af];}});}),Object['defineProperty'](exports,_0x32e9da(0x1d9),{'value':!![]}); }));