Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mars3d-heatmap

Package Overview
Dependencies
Maintainers
1
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mars3d-heatmap - npm Package Compare versions

Comparing version 3.7.0 to 3.7.1

8

dist/mars3d-heatmap.js
/**
* Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap
*
* 版本信息:v3.7.0
* 编译日期:2024-01-15 15:59:39
* 版本信息:v3.7.1
* 编译日期:2024-01-23 21:36:57
* 版权所有:Copyright by 火星科技 http://mars3d.cn
* 使用单位:免费公开版 ,2023-03-17
* 使用单位:免费公开版 ,2024-01-15
*/

@@ -14,3 +14,3 @@ (function (global, factory) {

})(this, (function (exports, mars3d, h337) {
'use strict';const _0x5f1a97=_0x16a9;(function(_0x4189b7,_0x19e7d7){const _0x47ef99={_0x3091aa:0x18a,_0x325de8:0x14d,_0x46b5d8:0x189},_0x4163a8=_0x16a9,_0x2ccce0=_0x4189b7();while(!![]){try{const _0x1f98ed=parseInt(_0x4163a8(0x13d))/0x1+-parseInt(_0x4163a8(0x144))/0x2*(-parseInt(_0x4163a8(0x161))/0x3)+parseInt(_0x4163a8(_0x47ef99._0x3091aa))/0x4+parseInt(_0x4163a8(_0x47ef99._0x325de8))/0x5+parseInt(_0x4163a8(0x17e))/0x6*(parseInt(_0x4163a8(_0x47ef99._0x46b5d8))/0x7)+-parseInt(_0x4163a8(0x186))/0x8*(parseInt(_0x4163a8(0x145))/0x9)+-parseInt(_0x4163a8(0x16b))/0xa;if(_0x1f98ed===_0x19e7d7)break;else _0x2ccce0['push'](_0x2ccce0['shift']());}catch(_0x2b03c4){_0x2ccce0['push'](_0x2ccce0['shift']());}}}(_0x1c6d,0xdbe0f));function _interopNamespace(_0x42c06e){const _0x2250b1={_0x1a39a6:0x181},_0x10ca63=_0x16a9;if(_0x42c06e&&_0x42c06e['__esModule'])return _0x42c06e;var _0x3a4d19=Object[_0x10ca63(0x13c)](null);return _0x42c06e&&Object[_0x10ca63(_0x2250b1._0x1a39a6)](_0x42c06e)['forEach'](function(_0x387c8b){if(_0x387c8b!=='default'){var _0x533752=Object['getOwnPropertyDescriptor'](_0x42c06e,_0x387c8b);Object['defineProperty'](_0x3a4d19,_0x387c8b,_0x533752['get']?_0x533752:{'enumerable':!![],'get':function(){return _0x42c06e[_0x387c8b];}});}}),_0x3a4d19['default']=_0x42c06e,_0x3a4d19;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial='uniform\x20sampler2D\x20image;\x0a\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput)\x20{\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20vec4\x20colorImage\x20=\x20texture(image,\x20st);\x0a\x20\x20if(colorImage.rgb\x20==\x20vec3(1.0)\x20||\x20colorImage.rgb\x20==\x20vec3(0.0))\x20{\x0a\x20\x20\x20\x20discard;\x0a\x20\x20}\x0a\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0a\x20\x20material.alpha\x20=\x20colorImage.a;\x0a\x20\x20return\x20material;\x0a}\x0a';if(!h337__namespace[_0x5f1a97(0x13c)])throw new Error(_0x5f1a97(0x148));const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer']['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:'blue',0.6:'green',0.8:'yellow',0.9:_0x5f1a97(0x142)}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance'][_0x5f1a97(0x13e)]};function _0x16a9(_0xc1d1,_0x6763c0){const _0x1c6d25=_0x1c6d();return _0x16a9=function(_0x16a9c8,_0x1c1cc9){_0x16a9c8=_0x16a9c8-0x136;let _0x161cca=_0x1c6d25[_0x16a9c8];return _0x161cca;},_0x16a9(_0xc1d1,_0x6763c0);}class HeatLayer extends BaseLayer{constructor(_0x40e825={}){const _0x3934c3={_0x1c6db2:0x166,_0x20a013:0x158,_0x6880db:0x14e},_0x27094c=_0x5f1a97;super(_0x40e825),this['options']['maxCanvasSize']=this['options']['maxCanvasSize']??document[_0x27094c(_0x3934c3._0x1c6db2)]['clientWidth'],this[_0x27094c(0x14e)][_0x27094c(_0x3934c3._0x20a013)]=Math['min'](this['options'][_0x27094c(_0x3934c3._0x20a013)],0x1388),this['options']['minCanvasSize']=this['options']['minCanvasSize']??document['body']['clientHeight'],this[_0x27094c(0x14e)]['minCanvasSize']=Math['max'](this['options']['minCanvasSize'],0x2bc),this['options']['heatStyle']={...DEF_HEATSTYLE,...this[_0x27094c(_0x3934c3._0x6880db)][_0x27094c(0x16a)]},this['options']['style']={...DEF_STYLE,...this[_0x27094c(_0x3934c3._0x6880db)]['style']};}get['layer'](){return this['_layer'];}get['heatStyle'](){const _0x5b6909=_0x5f1a97;return this[_0x5b6909(0x14e)][_0x5b6909(0x16a)];}set['heatStyle'](_0x36e5ce){const _0x471c87={_0x43177c:0x14e},_0x823d11=_0x5f1a97;this['options']['heatStyle']=mars3d__namespace['Util']['merge'](this[_0x823d11(_0x471c87._0x43177c)][_0x823d11(0x16a)],_0x36e5ce),this['_heat']&&(this['_heat']['configure'](this[_0x823d11(0x14e)][_0x823d11(0x16a)]),this['_updatePositionsHook'](!![]));}get['style'](){const _0x337cdd={_0x3866cd:0x15b},_0x4017fc=_0x5f1a97;return this['options'][_0x4017fc(_0x337cdd._0x3866cd)];}set['style'](_0x5198f3){const _0x2edcbd={_0x59b069:0x15e},_0x1895bf=_0x5f1a97;this['options']['style']=mars3d__namespace[_0x1895bf(0x176)][_0x1895bf(_0x2edcbd._0x59b069)](this['options']['style'],_0x5198f3);}get[_0x5f1a97(0x15c)](){const _0x4f69d7=_0x5f1a97;return this[_0x4f69d7(0x136)];}set[_0x5f1a97(0x15c)](_0x267ca9){this['setPositions'](_0x267ca9);}get['coordinates'](){const _0x406646=[];return this['points']['forEach'](_0x311b37=>{_0x406646['push'](_0x311b37['toArray']());}),_0x406646;}get['rectangle'](){return this['_rectangle'];}['_setOptionsHook'](_0x15e4e8,_0x4f6508){const _0x46a1b0=_0x5f1a97;_0x15e4e8['positions']&&(this[_0x46a1b0(0x15c)]=_0x15e4e8['positions']);}['_mountedHook'](){const _0x990fa8={_0x39d8b4:0x178,_0x3d214d:0x17c},_0x12b473=_0x5f1a97;this['style']['type']===_0x12b473(_0x990fa8._0x39d8b4)?this['_layer']=new mars3d__namespace[(_0x12b473(0x175))]['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this[_0x12b473(_0x990fa8._0x3d214d)]=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0x583724={_0x5944ef:0x180,_0xa65868:0x163,_0x19ee70:0x13c,_0x44cf70:0x17f,_0x3e035a:0x14e,_0x24cde8:0x13f,_0x20bbeb:0x15d},_0x37098f=_0x5f1a97;this[_0x37098f(0x172)][_0x37098f(_0x583724._0x5944ef)](this['_layer']),this[_0x37098f(_0x583724._0xa65868)]=mars3d__namespace['DomUtil'][_0x37098f(_0x583724._0x19ee70)]('div',_0x37098f(_0x583724._0x44cf70),this['_map']['container']),this[_0x37098f(_0x583724._0x3e035a)]['positions']&&(this['positions']=this['options']['positions']),this['options'][_0x37098f(_0x583724._0x24cde8)]&&this[_0x37098f(_0x583724._0x20bbeb)]();}[_0x5f1a97(0x177)](){const _0x1e9692={_0x188a44:0x172,_0x2e4839:0x17c},_0x15e9b5=_0x5f1a97;this['_container']&&(mars3d__namespace[_0x15e9b5(0x14b)][_0x15e9b5(0x173)](this['_container']),delete this[_0x15e9b5(0x163)]),this[_0x15e9b5(0x16d)](),this[_0x15e9b5(_0x1e9692._0x188a44)]['removeLayer'](this[_0x15e9b5(_0x1e9692._0x2e4839)]);}['addPosition'](_0x4a36b9,_0x3d201e){const _0x413868={_0x103ef6:0x136},_0x5ec782=_0x5f1a97;this['_positions']=this['_positions']||[],this[_0x5ec782(_0x413868._0x103ef6)]['push'](_0x4a36b9),this['_updatePositionsHook'](_0x3d201e);}[_0x5f1a97(0x17a)](_0x844cca,_0x46511b){this['_positions']=_0x844cca,this['_updatePositionsHook'](_0x46511b);}[_0x5f1a97(0x16d)](){const _0x3791b7={_0x2a4fb7:0x170,_0x1fc370:0x140},_0x1f08f8=_0x5f1a97;this[_0x1f08f8(_0x3791b7._0x2a4fb7)]&&(this['_layer']['removeGraphic'](this['_graphic'],!![]),delete this['_graphic']),this['_graphic2']&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this[_0x1f08f8(_0x3791b7._0x1fc370)]);}['_updatePositionsHook'](_0x52813e){const _0x1056b7={_0x24e8ae:0x14a,_0x2cfd3d:0x170,_0x1a3b9c:0x174,_0x1c6b54:0x140,_0x21ed19:0x168},_0x5708e6=_0x5f1a97;if(!this['show']||!this['_map']||!this['positions']||this['positions'][_0x5708e6(_0x1056b7._0x24e8ae)]===0x0)return this;const _0x1c9350=this['_getHeatCanvas']();if(this['style']['type']==='image')this['_layer']['setOptions']({'url':_0x1c9350['toDataURL']('image/png',0x1),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style']['arc']?this['_graphic']&&_0x52813e?(this['_graphic']['uniforms']['image']=_0x1c9350,this[_0x5708e6(_0x1056b7._0x2cfd3d)][_0x5708e6(_0x1056b7._0x1a3b9c)]['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this[_0x5708e6(_0x1056b7._0x1c6b54)][_0x5708e6(0x174)]['image']=_0x1c9350,this['_graphic2']['uniforms']['bumpMap']=this[_0x5708e6(_0x1056b7._0x2cfd3d)]['uniforms']['bumpMap'])):this[_0x5708e6(_0x1056b7._0x21ed19)](_0x1c9350):this[_0x5708e6(0x170)]&&_0x52813e?this[_0x5708e6(0x170)]['uniforms'][_0x5708e6(0x178)]=_0x1c9350:this['_createGraphic'](_0x1c9350);return this;}['_createGraphic'](_0x2021ca){this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x2021ca},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this['_layer']['addGraphic'](this['_graphic']);}[_0x5f1a97(0x168)](_0x2df6ac){const _0x1869e0={_0x21ac15:0x151,_0x2e57e5:0x151,_0x1fd33b:0x143,_0x2c6efe:0x15a,_0x28e1fb:0x165,_0x1cfb27:0x15b,_0x402a94:0x16e,_0x2f7725:0x147,_0x1ad76a:0x155,_0xa0e1df:0x13b},_0x46367b=_0x5f1a97;this['clear']();const _0x1575e2=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium[_0x46367b(_0x1869e0._0x21ac15)]['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium[_0x46367b(_0x1869e0._0x2e57e5)]['REPLACE']},'backFunction':Cesium[_0x46367b(_0x1869e0._0x1fd33b)]['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation'][_0x46367b(_0x1869e0._0x2c6efe)],'zFail':Cesium['StencilOperation'][_0x46367b(0x15a)],'zPass':Cesium[_0x46367b(_0x1869e0._0x21ac15)]['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState'][_0x46367b(0x159)]}),_0x3f1b92=Math[_0x46367b(_0x1869e0._0x28e1fb)](this[_0x46367b(_0x1869e0._0x1cfb27)]['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style']['diffHeight']&&delete this['style']['diffHeight'];const _0xcc39c2=(this['style']['splitNum'],0x64);let _0xe00d92=Math['max'](this['_rectangle'][_0x46367b(_0x1869e0._0x402a94)],this[_0x46367b(_0x1869e0._0x2f7725)][_0x46367b(_0x1869e0._0x1ad76a)]);this['style']['granularity']=_0xe00d92/=_0xcc39c2;const _0x408a7f=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x2df6ac,'repeat':new Cesium[(_0x46367b(0x17d))](0x1,0x1),'color':new Cesium[(_0x46367b(0x13a))](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x521a44=this[_0x46367b(0x15b)]['arcDirection']||0x1;this[_0x46367b(0x170)]=new mars3d__namespace['graphic'][(_0x46367b(0x13b))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x1575e2,'material':_0x408a7f,'vertexShaderSource':getVertexShaderSource(_0x3f1b92*_0x521a44)})}),this['_layer']['addGraphic'](this['_graphic']),this[_0x46367b(_0x1869e0._0x1cfb27)]['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace['graphic'][(_0x46367b(_0x1869e0._0xa0e1df))]({...this[_0x46367b(0x14e)],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x46367b(0x14c))]({'flat':!![],'aboveGround':!![],'renderState':_0x1575e2,'material':_0x408a7f,'vertexShaderSource':getVertexShaderSource(-_0x3f1b92)})}),this['_layer']['addGraphic'](this['_graphic2']));}['getRectangle'](_0x273304){const _0x277101=_0x5f1a97;return _0x273304!==null&&_0x273304!==void 0x0&&_0x273304['isFormat']&&this['_rectangle']?mars3d__namespace[_0x277101(0x162)]['formatRectangle'](this[_0x277101(0x147)]):this['_rectangle'];}['_getHeatCanvas'](){const _0x560cd7={_0x127888:0x136,_0x47a478:0x153,_0x55be59:0x183,_0x5bd378:0x14e,_0x2fa716:0x153,_0x551467:0x137,_0x3cf65b:0x16f,_0x38bed0:0x18b,_0x3619f5:0x15b,_0x1de8b2:0x154},_0x5200e2={_0x253734:0x187,_0x26f677:0x152,_0x12930f:0x137},_0x7e12d6={_0x115586:0x171,_0x22824c:0x137},_0x31b331=_0x5f1a97,_0x107a72=this[_0x31b331(_0x560cd7._0x127888)],_0x2b6611=[];let _0x3a2484,_0x5e5964,_0x25bd35,_0x30aefc;_0x107a72[_0x31b331(_0x560cd7._0x47a478)](_0x1ee334=>{const _0x2ec48a=_0x31b331,_0x15d5fb=mars3d__namespace['LngLatPoint']['parse'](_0x1ee334);if(!_0x15d5fb)return;_0x15d5fb[_0x2ec48a(_0x7e12d6._0x115586)]=_0x1ee334['value']||0x1,!this[_0x2ec48a(0x14e)]['rectangle']&&(_0x3a2484===undefined?(_0x3a2484=_0x15d5fb['lng'],_0x5e5964=_0x15d5fb['lng'],_0x25bd35=_0x15d5fb['lat'],_0x30aefc=_0x15d5fb['lat']):(_0x3a2484=Math['min'](_0x3a2484,_0x15d5fb[_0x2ec48a(0x184)]),_0x5e5964=Math[_0x2ec48a(_0x7e12d6._0x22824c)](_0x5e5964,_0x15d5fb['lng']),_0x25bd35=Math['min'](_0x25bd35,_0x15d5fb['lat']),_0x30aefc=Math['max'](_0x30aefc,_0x15d5fb['lat']))),_0x2b6611[_0x2ec48a(0x138)](_0x15d5fb);});_0x3a2484===_0x5e5964&&(_0x3a2484-=0.000001,_0x5e5964+=0.000001);_0x25bd35===_0x30aefc&&(_0x25bd35-=0.000001,_0x30aefc+=0.000001);let _0x5e0c3c=this['options'][_0x31b331(0x14f)]||{'xmin':_0x3a2484,'xmax':_0x5e5964,'ymin':_0x25bd35,'ymax':_0x30aefc};const _0x1e6157=getMercatorBounds(_0x5e0c3c),_0x40d367=Math[_0x31b331(0x179)](_0x1e6157['xmax']-_0x1e6157['xmin']),_0x2041d5=Math[_0x31b331(0x179)](_0x1e6157['ymax']-_0x1e6157['ymin']),_0x272848=Math['max'](_0x40d367,_0x2041d5),_0x527e4f=Math[_0x31b331(0x141)](_0x40d367,_0x2041d5);this[_0x31b331(_0x560cd7._0x55be59)]=_0x272848;let _0x298c73=0x1;if(_0x272848>this['options'][_0x31b331(0x158)])_0x298c73=_0x272848/this['options']['maxCanvasSize'],_0x527e4f/_0x298c73<this['options']['minCanvasSize']&&(_0x298c73=_0x527e4f/this[_0x31b331(_0x560cd7._0x5bd378)]['minCanvasSize']);else _0x527e4f<this[_0x31b331(0x14e)][_0x31b331(0x185)]&&(_0x298c73=_0x527e4f/this[_0x31b331(_0x560cd7._0x5bd378)]['minCanvasSize'],_0x272848/_0x298c73>this[_0x31b331(_0x560cd7._0x5bd378)][_0x31b331(0x158)]&&(_0x298c73=_0x272848/this[_0x31b331(_0x560cd7._0x5bd378)]['maxCanvasSize']));const _0x2b82c7=this['heatStyle']['radius']*1.5,_0x4cde6d=_0x40d367/_0x298c73+_0x2b82c7*0x2,_0x4fd0dc=_0x2041d5/_0x298c73+_0x2b82c7*0x2,_0x45956e=_0x2b82c7*_0x298c73;_0x1e6157['xmin']-=_0x45956e,_0x1e6157['ymin']-=_0x45956e,_0x1e6157['xmax']+=_0x45956e,_0x1e6157[_0x31b331(0x164)]+=_0x45956e,this['_scale']=_0x298c73,_0x5e0c3c=geLatLngBounds(_0x1e6157),this['_rectangle']=Cesium['Rectangle']['fromDegrees'](_0x5e0c3c['xmin'],_0x5e0c3c['ymin'],_0x5e0c3c[_0x31b331(0x18c)],_0x5e0c3c['ymax']);let _0x3e9b03=_0x2b6611[0x0][_0x31b331(0x171)]??0x1,_0x5b2c9c=_0x2b6611[0x0]['value']??0x0;const _0x37cc4c=[];_0x2b6611[_0x31b331(_0x560cd7._0x2fa716)](_0x35b901=>{const _0x860898=_0x31b331,_0x255d5e=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x35b901['lng'],_0x35b901[_0x860898(_0x5200e2._0x253734)]]),_0x55f7d2=_0x35b901['value']||0x1,_0x50d864=Math['round']((_0x255d5e[0x0]-_0x1e6157['xmin'])/_0x298c73),_0x2a1cde=Math[_0x860898(_0x5200e2._0x26f677)]((_0x1e6157[_0x860898(0x164)]-_0x255d5e[0x1])/_0x298c73);_0x3e9b03=Math[_0x860898(_0x5200e2._0x12930f)](_0x3e9b03,_0x55f7d2),_0x5b2c9c=Math['min'](_0x5b2c9c,_0x55f7d2),_0x37cc4c['push']({'x':_0x50d864,'y':_0x2a1cde,'value':_0x55f7d2});});const _0x16d72f={'min':this['options']['min']??_0x5b2c9c,'max':this[_0x31b331(0x14e)][_0x31b331(_0x560cd7._0x551467)]??_0x3e9b03,'data':_0x37cc4c};this[_0x31b331(_0x560cd7._0x3cf65b)]=_0x16d72f;if(!this['_last_mBounds']||_0x1e6157['xmin']!==this[_0x31b331(0x149)]['xmin']||_0x1e6157[_0x31b331(_0x560cd7._0x38bed0)]!==this[_0x31b331(0x149)]['ymin']||_0x1e6157['xmax']!==this[_0x31b331(0x149)][_0x31b331(0x18c)]||_0x1e6157['ymax']!==this['_last_mBounds']['ymax']){this['_last_mBounds']=_0x1e6157,this['_container'][_0x31b331(_0x560cd7._0x3619f5)]['cssText']='width:'+_0x4cde6d+'px;height:'+_0x4fd0dc+'px;';const _0x2a8bda={...this['heatStyle'],'container':this['_container']};!this['_heat']?this[_0x31b331(0x154)]=h337__namespace['create'](_0x2a8bda):this[_0x31b331(_0x560cd7._0x1de8b2)]['configure'](_0x2a8bda);}this['_heat']['setData'](_0x16d72f);const _0x560bc8=mars3d__namespace[_0x31b331(0x14b)]['copyCanvas'](this['_heat']['_renderer']['canvas']);return _0x560bc8;}['_getArcHeatCanvas'](){const _0xa36622={_0x528471:0x157,_0x24e4ff:0x14b,_0x8ae8b3:0x156},_0x5bece=_0x5f1a97;this['_heat']['configure']({'radius':this['heatStyle']['radius']*this['style']['arcRadiusScale'],'blur':this['heatStyle']['blur']*this['style']['arcBlurScale'],'gradient':this[_0x5bece(0x16a)]['gradientArc']||{0.25:_0x5bece(_0xa36622._0x528471),0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:_0x5bece(0x160)}});const _0x41c113=mars3d__namespace[_0x5bece(_0xa36622._0x24e4ff)][_0x5bece(_0xa36622._0x8ae8b3)](this['_heat'][_0x5bece(0x17b)][_0x5bece(0x150)]);return this['_heat']['configure'](this['options']['heatStyle']),_0x41c113;}['getPointData'](_0x3574f0){const _0x37ee5e={_0x419a9f:0x184,_0x56adb1:0x182},_0x37c0d5=_0x5f1a97,_0x42d649=mars3d__namespace['LngLatPoint']['parse'](_0x3574f0);if(!_0x42d649)return{};const _0x55f05f=mars3d__namespace[_0x37c0d5(0x167)]['lonlat2mercator']([_0x42d649[_0x37c0d5(_0x37ee5e._0x419a9f)],_0x42d649['lat']]),_0x594f0e=this[_0x37c0d5(0x149)],_0x1803ea=Math['round']((_0x55f05f[0x0]-_0x594f0e['xmin'])/this['_scale']),_0x2e5df1=Math['round']((_0x594f0e['ymax']-_0x55f05f[0x1])/this['_scale']),_0x5bc950=this['_heat'][_0x37c0d5(0x139)]({'x':_0x1803ea,'y':_0x2e5df1}),_0x4d1e4b=this['_heat']['_renderer'][_0x37c0d5(_0x37ee5e._0x56adb1)]['getImageData'](_0x1803ea-0x1,_0x2e5df1-0x1,0x1,0x1)[_0x37c0d5(0x188)];return{'x':_0x1803ea,'y':_0x2e5df1,'value':_0x5bc950,'color':'rgba('+_0x4d1e4b[0x0]+','+_0x4d1e4b[0x1]+','+_0x4d1e4b[0x2]+','+_0x4d1e4b[0x3]+')'};}}mars3d__namespace['LayerUtil']['register']('heat',HeatLayer),mars3d__namespace[_0x5f1a97(0x175)]['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x3c1bb7){const _0x2f47fa={_0x238260:0x146,_0x41a229:0x18c},_0x5b178e=_0x5f1a97,_0x93b9db=mars3d__namespace[_0x5b178e(0x167)][_0x5b178e(_0x2f47fa._0x238260)]([_0x3c1bb7['xmin'],_0x3c1bb7[_0x5b178e(0x18b)]]),_0x23d58a=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x3c1bb7[_0x5b178e(_0x2f47fa._0x41a229)],_0x3c1bb7['ymax']]);return{'xmin':_0x93b9db[0x0],'ymin':_0x93b9db[0x1],'xmax':_0x23d58a[0x0],'ymax':_0x23d58a[0x1]};}function _0x1c6d(){const _0x25a6c7=['forEach','_heat','width','copyCanvas','rgb(0,0,0)','maxCanvasSize','ALPHA_BLEND','KEEP','style','positions','flyToByAnimationEnd','merge','HeatLayer','rgb(255,255,255)','195btsqiq','PolyUtil','_container','ymax','floor','body','PointTrans','_createArcGraphic','in\x20vec3\x20position3DHigh;\x0a\x20\x20in\x20vec3\x20position3DLow;\x0a\x20\x20in\x20vec2\x20st;\x0a\x20\x20in\x20float\x20batchId;\x0a\x20\x20uniform\x20sampler2D\x20bumpMap_3;\x0a\x20\x20out\x20vec3\x20v_positionMC;\x0a\x20\x20out\x20vec3\x20v_positionEC;\x0a\x20\x20out\x20vec2\x20v_st;\x0a\x0a\x20\x20void\x20main()\x0a\x20\x20{\x0a\x20\x20\x20\x20vec4\x20p\x20=\x20czm_computePosition();\x0a\x20\x20\x20\x20v_positionMC\x20=\x20position3DHigh\x20+\x20position3DLow;\x0a\x20\x20\x20\x20v_positionEC\x20=\x20(czm_modelViewRelativeToEye\x20*\x20p).xyz;\x0a\x20\x20\x20\x20v_st\x20=\x20st;\x0a\x20\x20\x20\x20vec4\x20color\x20=\x20texture(bumpMap_3,\x20v_st);\x0a\x20\x20\x20\x20float\x20centerBump\x20=\x20distance(vec3(0.0),color.rgb);\x0a\x20\x20\x20\x20vec3\x20upDir\x20=\x20normalize(v_positionMC.xyz);\x0a\x20\x20\x20\x20vec3\x20disPos\x20=\x20upDir\x20*\x20centerBump\x20*\x20','heatStyle','24863750aCZAOZ','__esModule','clear','height','_last_heatData','_graphic','value','_map','remove','uniforms','layer','Util','_removedHook','image','abs','setPositions','_renderer','_layer','Cartesian2','41502vJSrIq','mars3d-heatmap\x20mars3d-hideDiv','addLayer','keys','ctx','_mBoundsMax','lng','minCanvasSize','8kGmOFr','lat','data','427NncbMD','1058068UzAhQe','ymin','xmax','_positions','max','push','getValueAt','Color','RectanglePrimitive','create','1770424oxPNMv','VERTEX_FORMAT','flyTo','_graphic2','min','red','StencilFunction','51864Mjrvlu','12416346Obbtiw','lonlat2mercator','_rectangle','请引入\x20heatmap.js\x20库\x20','_last_mBounds','length','DomUtil','EllipsoidSurfaceAppearance','3120670VUhkTy','options','rectangle','canvas','StencilOperation','round'];_0x1c6d=function(){return _0x25a6c7;};return _0x1c6d();}function geLatLngBounds(_0x444f45){const _0x113eb7={_0x32ce6a:0x167,_0x284b74:0x167,_0x4d669b:0x164},_0x1e92b1=_0x5f1a97,_0x2f0945=mars3d__namespace[_0x1e92b1(_0x113eb7._0x32ce6a)]['mercator2lonlat']([_0x444f45['xmin'],_0x444f45['ymin']]),_0x1bffd2=mars3d__namespace[_0x1e92b1(_0x113eb7._0x284b74)]['mercator2lonlat']([_0x444f45['xmax'],_0x444f45[_0x1e92b1(_0x113eb7._0x4d669b)]]);return{'xmin':_0x2f0945[0x0],'ymin':_0x2f0945[0x1],'xmax':_0x1bffd2[0x0],'ymax':_0x1bffd2[0x1]};}function getVertexShaderSource(_0x586fb6){const _0x23f5ce=_0x5f1a97;return _0x23f5ce(0x169)+_0x586fb6+';\x0a\x20\x20\x20\x20p\x20+=vec4(disPos,0.0);\x0a\x20\x20\x20\x20gl_Position\x20=\x20czm_modelViewProjectionRelativeToEye\x20*\x20p;\x0a\x20\x20}\x0a';}exports[_0x5f1a97(0x15f)]=HeatLayer,Object['defineProperty'](exports,_0x5f1a97(0x16c),{'value':!![]});
'use strict';const _0x5124ca=_0x1cb4;(function(_0x2a98e5,_0x2da1d6){const _0x23d12c={_0x1b23a9:0xdd,_0x27d37e:0xdf,_0x32cf38:0xe8,_0x1f605f:0xed,_0x4d01ee:0xd6,_0x31dd20:0xd1},_0x19120c=_0x1cb4,_0x2253fb=_0x2a98e5();while(!![]){try{const _0x5ddc4b=parseInt(_0x19120c(0xb6))/0x1*(-parseInt(_0x19120c(0xe5))/0x2)+parseInt(_0x19120c(_0x23d12c._0x1b23a9))/0x3+parseInt(_0x19120c(_0x23d12c._0x27d37e))/0x4*(parseInt(_0x19120c(0xc8))/0x5)+parseInt(_0x19120c(_0x23d12c._0x32cf38))/0x6*(parseInt(_0x19120c(0xce))/0x7)+parseInt(_0x19120c(_0x23d12c._0x1f605f))/0x8*(parseInt(_0x19120c(_0x23d12c._0x4d01ee))/0x9)+-parseInt(_0x19120c(_0x23d12c._0x31dd20))/0xa+-parseInt(_0x19120c(0xcc))/0xb;if(_0x5ddc4b===_0x2da1d6)break;else _0x2253fb['push'](_0x2253fb['shift']());}catch(_0x3fae5c){_0x2253fb['push'](_0x2253fb['shift']());}}}(_0x5709,0x90dfd));function _interopNamespace(_0x1c87c0){const _0x31f6a2={_0x396965:0xb4},_0xf8b457={_0x2282fc:0xc2},_0x1ebb2d=_0x1cb4;if(_0x1c87c0&&_0x1c87c0[_0x1ebb2d(_0x31f6a2._0x396965)])return _0x1c87c0;var _0x572fda=Object['create'](null);return _0x1c87c0&&Object['keys'](_0x1c87c0)['forEach'](function(_0x104a5b){const _0x91bd59=_0x1ebb2d;if(_0x104a5b!=='default'){var _0x22f77e=Object['getOwnPropertyDescriptor'](_0x1c87c0,_0x104a5b);Object[_0x91bd59(_0xf8b457._0x2282fc)](_0x572fda,_0x104a5b,_0x22f77e['get']?_0x22f77e:{'enumerable':!![],'get':function(){return _0x1c87c0[_0x104a5b];}});}}),_0x572fda['default']=_0x1c87c0,_0x572fda;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial='uniform\x20sampler2D\x20image;\x0a\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput)\x20{\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20vec4\x20colorImage\x20=\x20texture(image,\x20st);\x0a\x20\x20if(colorImage.rgb\x20==\x20vec3(1.0)\x20||\x20colorImage.rgb\x20==\x20vec3(0.0))\x20{\x0a\x20\x20\x20\x20discard;\x0a\x20\x20}\x0a\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0a\x20\x20material.alpha\x20=\x20colorImage.a;\x0a\x20\x20return\x20material;\x0a}\x0a';function _0x1cb4(_0xda2bf6,_0x376f10){const _0x5709be=_0x5709();return _0x1cb4=function(_0x1cb4c7,_0x4db0e6){_0x1cb4c7=_0x1cb4c7-0xb4;let _0x5c6142=_0x5709be[_0x1cb4c7];return _0x5c6142;},_0x1cb4(_0xda2bf6,_0x376f10);}function _0x5709(){const _0x18c519=['remove','arcBlurScale','_updatePositionsHook','Util','xmax','_positions','push','clientWidth','rgb(0,0,0)','clear','_map','options','_graphic','addPosition','forEach','value','minCanvasSize','_rectangle','radius','__esModule','width','168899ipgZPG','uniforms','canvas','create','addGraphic','LayerUtil','Rectangle','xmin','diffHeight','EllipsoidSurfaceAppearance','DomUtil','ymin','defineProperty','ALWAYS','_graphic2','heatStyle','_mBoundsMax','_setOptionsHook','3374650ZVyZRW','parse','max','HeatLayer','14459170iZOwUR','_heat','497hMWWan','请引入\x20heatmap.js\x20库\x20','graphic','7920620jtezAh','_layer','show','width:','arcRadiusScale','9MItJbX','merge','StencilOperation','rectangle','lonlat2mercator','_container','ALPHA_BLEND','3089760HUxkQK','min','4HlgvEy','positions','style','lat','PointTrans','KEEP','2VQvRsn','yellow','container','88758reDgld','floor','layer','bumpMap','_addedHook','909464EuNCrQ','lng','_last_mBounds','image','points','ymax','_getHeatCanvas','Cesium','arc','clientHeight','round'];_0x5709=function(){return _0x18c519;};return _0x5709();}if(!h337__namespace['create'])throw new Error(_0x5124ca(0xcf));const Cesium=mars3d__namespace[_0x5124ca(0xf4)],BaseLayer=mars3d__namespace[_0x5124ca(0xea)]['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:'blue',0.6:'green',0.8:_0x5124ca(0xe6),0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance']['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x22fa80={}){const _0x8b1d66={_0x48f074:0x103,_0xc00712:0xff,_0x1aedf4:0xde,_0x537ed7:0x108,_0x1814e4:0x103},_0x487281=_0x5124ca;super(_0x22fa80),this[_0x487281(_0x8b1d66._0x48f074)]['maxCanvasSize']=this['options']['maxCanvasSize']??document['body'][_0x487281(_0x8b1d66._0xc00712)],this[_0x487281(0x103)]['maxCanvasSize']=Math[_0x487281(_0x8b1d66._0x1aedf4)](this[_0x487281(0x103)]['maxCanvasSize'],0x1388),this['options'][_0x487281(_0x8b1d66._0x537ed7)]=this['options'][_0x487281(_0x8b1d66._0x537ed7)]??document['body'][_0x487281(0xf6)],this['options']['minCanvasSize']=Math['max'](this['options']['minCanvasSize'],0x2bc),this['options']['heatStyle']={...DEF_HEATSTYLE,...this['options'][_0x487281(0xc5)]},this[_0x487281(_0x8b1d66._0x1814e4)]['style']={...DEF_STYLE,...this[_0x487281(_0x8b1d66._0x1814e4)]['style']};}get[_0x5124ca(0xea)](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set['heatStyle'](_0x456aa0){const _0x4317ce={_0x22bb19:0xfb,_0x20709c:0x103,_0x42b4d8:0xcd},_0x212ec4=_0x5124ca;this['options']['heatStyle']=mars3d__namespace[_0x212ec4(_0x4317ce._0x22bb19)]['merge'](this[_0x212ec4(_0x4317ce._0x20709c)]['heatStyle'],_0x456aa0),this['_heat']&&(this[_0x212ec4(_0x4317ce._0x42b4d8)]['configure'](this['options']['heatStyle']),this['_updatePositionsHook'](!![]));}get[_0x5124ca(0xe1)](){const _0x13b4fd={_0x493873:0x103,_0x27bb10:0xe1},_0xf28b98=_0x5124ca;return this[_0xf28b98(_0x13b4fd._0x493873)][_0xf28b98(_0x13b4fd._0x27bb10)];}set[_0x5124ca(0xe1)](_0x21e27f){const _0x4f5aeb={_0x4ce370:0xd7,_0x285f9c:0x103},_0x44255d=_0x5124ca;this['options']['style']=mars3d__namespace['Util'][_0x44255d(_0x4f5aeb._0x4ce370)](this[_0x44255d(_0x4f5aeb._0x285f9c)]['style'],_0x21e27f);}get['positions'](){return this['_positions'];}set[_0x5124ca(0xe0)](_0x46fb83){this['setPositions'](_0x46fb83);}get['coordinates'](){const _0xd0b837={_0x3499f9:0xf1},_0x273d4b={_0xaaef6f:0xfe},_0x2c9bff=_0x5124ca,_0x4b5a26=[];return this[_0x2c9bff(_0xd0b837._0x3499f9)][_0x2c9bff(0x106)](_0x2438c9=>{const _0x8f94d1=_0x2c9bff;_0x4b5a26[_0x8f94d1(_0x273d4b._0xaaef6f)](_0x2438c9['toArray']());}),_0x4b5a26;}get[_0x5124ca(0xd9)](){return this['_rectangle'];}[_0x5124ca(0xc7)](_0x405e18,_0x20a448){const _0x20cea4=_0x5124ca;_0x405e18[_0x20cea4(0xe0)]&&(this['positions']=_0x405e18['positions']);}['_mountedHook'](){const _0x584655={_0xa18d8b:0xf0,_0x276395:0xea},_0xc549ae=_0x5124ca;this[_0xc549ae(0xe1)]['type']===_0xc549ae(_0x584655._0xa18d8b)?this[_0xc549ae(0xd2)]=new mars3d__namespace[(_0xc549ae(_0x584655._0x276395))]['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this['_layer']=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}[_0x5124ca(0xec)](){const _0x3d3879={_0x2402e2:0xdb,_0xa51d5:0xe7,_0x2ad39c:0xe0},_0x3af095=_0x5124ca;this[_0x3af095(0x102)]['addLayer'](this['_layer']),this[_0x3af095(_0x3d3879._0x2402e2)]=mars3d__namespace[_0x3af095(0xc0)][_0x3af095(0xb9)]('div','mars3d-heatmap\x20mars3d-hideDiv',this['_map'][_0x3af095(_0x3d3879._0xa51d5)]),this['options']['positions']&&(this['positions']=this['options'][_0x3af095(_0x3d3879._0x2ad39c)]),this['options']['flyTo']&&this['flyToByAnimationEnd']();}['_removedHook'](){const _0x266f5b={_0x2b5fda:0xdb,_0x5b8086:0xf8,_0x4b69bd:0xd2},_0x126b29=_0x5124ca;this[_0x126b29(_0x266f5b._0x2b5fda)]&&(mars3d__namespace['DomUtil'][_0x126b29(_0x266f5b._0x5b8086)](this['_container']),delete this['_container']),this['clear'](),this[_0x126b29(0x102)]['removeLayer'](this[_0x126b29(_0x266f5b._0x4b69bd)]);}[_0x5124ca(0x105)](_0x1367d4,_0x4d1968){const _0x27290e={_0x42dc67:0xfd,_0x58523f:0xfd},_0x44a812=_0x5124ca;this[_0x44a812(_0x27290e._0x42dc67)]=this['_positions']||[],this[_0x44a812(_0x27290e._0x58523f)][_0x44a812(0xfe)](_0x1367d4),this['_updatePositionsHook'](_0x4d1968);}['setPositions'](_0xdc9b49,_0x129801){const _0x504c86=_0x5124ca;this['_positions']=_0xdc9b49,this[_0x504c86(0xfa)](_0x129801);}['clear'](){const _0x1b37b8={_0x18612c:0x104},_0x1a12a2=_0x5124ca;this[_0x1a12a2(0x104)]&&(this['_layer']['removeGraphic'](this[_0x1a12a2(0x104)],!![]),delete this[_0x1a12a2(_0x1b37b8._0x18612c)]),this['_graphic2']&&(this['_layer']['removeGraphic'](this[_0x1a12a2(0xc4)],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x2b1ce4){const _0x2f94cf={_0x5db3a4:0xe1,_0x350729:0xf5,_0x16093e:0xb7,_0x335d1d:0xeb,_0x3f15f8:0xb7},_0x27126f=_0x5124ca;if(!this[_0x27126f(0xd3)]||!this['_map']||!this['positions']||this['positions']['length']===0x0)return this;const _0x14e272=this['_getHeatCanvas']();if(this[_0x27126f(_0x2f94cf._0x5db3a4)]['type']==='image')this[_0x27126f(0xd2)]['setOptions']({'url':_0x14e272['toDataURL']('image/png',0x1),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style'][_0x27126f(_0x2f94cf._0x350729)]?this['_graphic']&&_0x2b1ce4?(this['_graphic'][_0x27126f(0xb7)]['image']=_0x14e272,this['_graphic']['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x14e272,this['_graphic2'][_0x27126f(_0x2f94cf._0x16093e)][_0x27126f(_0x2f94cf._0x335d1d)]=this[_0x27126f(0x104)][_0x27126f(_0x2f94cf._0x3f15f8)]['bumpMap'])):this['_createArcGraphic'](_0x14e272):this[_0x27126f(0x104)]&&_0x2b1ce4?this['_graphic']['uniforms']['image']=_0x14e272:this['_createGraphic'](_0x14e272);return this;}['_createGraphic'](_0x479876){const _0x3da342={_0x4b7ed6:0x109},_0x1193f4=_0x5124ca;this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x1193f4(_0x3da342._0x4b7ed6)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x479876},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this['_layer']['addGraphic'](this['_graphic']);}['_createArcGraphic'](_0xbc45d1){const _0x2d6a8a={_0xa12616:0xd8,_0x1f1b8e:0xe4,_0x5835fa:0xc3,_0x593427:0xdc,_0x4cd158:0xe9,_0x4a2e55:0xbe,_0x3fa369:0xbe,_0x1f91ea:0x109,_0x55934a:0x104,_0x2733e6:0x109,_0x4fe510:0xbf},_0x30e0f8=_0x5124ca;this[_0x30e0f8(0x101)]();const _0x52acbd=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0x30e0f8(_0x2d6a8a._0xa12616)][_0x30e0f8(_0x2d6a8a._0x1f1b8e)],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium['StencilFunction'][_0x30e0f8(_0x2d6a8a._0x5835fa)],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0x30e0f8(0xd8)]['KEEP'],'zPass':Cesium[_0x30e0f8(0xd8)]['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState'][_0x30e0f8(_0x2d6a8a._0x593427)]}),_0x357edf=Math[_0x30e0f8(_0x2d6a8a._0x4cd158)](this['style'][_0x30e0f8(_0x2d6a8a._0x4a2e55)]??this[_0x30e0f8(0xc6)]*0.02)+0.1;this['style']['diffHeight']&&delete this['style'][_0x30e0f8(_0x2d6a8a._0x3fa369)];const _0x3f6fc3=(this['style']['splitNum'],0x64);let _0x2dfa33=Math['max'](this[_0x30e0f8(_0x2d6a8a._0x1f91ea)]['height'],this['_rectangle'][_0x30e0f8(0xb5)]);this['style']['granularity']=_0x2dfa33/=_0x3f6fc3;const _0x327c48=new Cesium['Material']({'fabric':{'uniforms':{'image':_0xbc45d1,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x1f0415=this[_0x30e0f8(0xe1)]['arcDirection']||0x1;this[_0x30e0f8(_0x2d6a8a._0x55934a)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0x30e0f8(0x103)],'rectangle':this[_0x30e0f8(_0x2d6a8a._0x2733e6)],'appearance':new Cesium[(_0x30e0f8(_0x2d6a8a._0x4fe510))]({'flat':!![],'aboveGround':!![],'renderState':_0x52acbd,'material':_0x327c48,'vertexShaderSource':getVertexShaderSource(_0x357edf*_0x1f0415)})}),this['_layer'][_0x30e0f8(0xba)](this['_graphic']),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace[(_0x30e0f8(0xd0))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x52acbd,'material':_0x327c48,'vertexShaderSource':getVertexShaderSource(-_0x357edf)})}),this['_layer'][_0x30e0f8(0xba)](this[_0x30e0f8(0xc4)]));}['getRectangle'](_0x16bccc){return _0x16bccc!==null&&_0x16bccc!==void 0x0&&_0x16bccc['isFormat']&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this['_rectangle']):this['_rectangle'];}[_0x5124ca(0xf3)](){const _0x45c2d3={_0x814c3f:0x108,_0x4ae9f3:0x103,_0x488b2e:0xf2,_0x1f3690:0xbc,_0x4665dd:0x107,_0x574120:0xca,_0x37e15d:0xef,_0x385532:0xc1,_0x1da196:0xef,_0x602b4d:0xcd,_0x2745bd:0xcd},_0x3c6d66={_0x2dd7a9:0xda,_0x318d1a:0xe2,_0x1d85b3:0xbd,_0x203f8a:0xf7,_0x86d685:0xfe},_0x2388df={_0x582faa:0xee,_0x4638e6:0xe2,_0x119bd7:0xde},_0x1ae3ba=_0x5124ca,_0xc38390=this['_positions'],_0x4a0dc3=[];let _0xc3c2db,_0x3c14de,_0x3d35d2,_0x5de790;_0xc38390[_0x1ae3ba(0x106)](_0x4b7091=>{const _0x16f1de=_0x1ae3ba,_0x185187=mars3d__namespace['LngLatPoint'][_0x16f1de(0xc9)](_0x4b7091);if(!_0x185187)return;_0x185187['value']=_0x4b7091[_0x16f1de(0x107)]||0x1,!this['options']['rectangle']&&(_0xc3c2db===undefined?(_0xc3c2db=_0x185187['lng'],_0x3c14de=_0x185187[_0x16f1de(_0x2388df._0x582faa)],_0x3d35d2=_0x185187[_0x16f1de(_0x2388df._0x4638e6)],_0x5de790=_0x185187[_0x16f1de(0xe2)]):(_0xc3c2db=Math['min'](_0xc3c2db,_0x185187['lng']),_0x3c14de=Math['max'](_0x3c14de,_0x185187[_0x16f1de(0xee)]),_0x3d35d2=Math[_0x16f1de(_0x2388df._0x119bd7)](_0x3d35d2,_0x185187['lat']),_0x5de790=Math[_0x16f1de(0xca)](_0x5de790,_0x185187[_0x16f1de(0xe2)]))),_0x4a0dc3['push'](_0x185187);});_0xc3c2db===_0x3c14de&&(_0xc3c2db-=0.000001,_0x3c14de+=0.000001);_0x3d35d2===_0x5de790&&(_0x3d35d2-=0.000001,_0x5de790+=0.000001);let _0x584008=this[_0x1ae3ba(0x103)]['rectangle']||{'xmin':_0xc3c2db,'xmax':_0x3c14de,'ymin':_0x3d35d2,'ymax':_0x5de790};const _0x2ff8a6=getMercatorBounds(_0x584008),_0x4ed780=Math['abs'](_0x2ff8a6['xmax']-_0x2ff8a6['xmin']),_0x4010cc=Math['abs'](_0x2ff8a6['ymax']-_0x2ff8a6['ymin']),_0x168cbb=Math['max'](_0x4ed780,_0x4010cc),_0x17063f=Math['min'](_0x4ed780,_0x4010cc);this['_mBoundsMax']=_0x168cbb;let _0xe6c400=0x1;if(_0x168cbb>this['options']['maxCanvasSize'])_0xe6c400=_0x168cbb/this['options']['maxCanvasSize'],_0x17063f/_0xe6c400<this['options'][_0x1ae3ba(_0x45c2d3._0x814c3f)]&&(_0xe6c400=_0x17063f/this[_0x1ae3ba(_0x45c2d3._0x4ae9f3)]['minCanvasSize']);else _0x17063f<this['options']['minCanvasSize']&&(_0xe6c400=_0x17063f/this['options']['minCanvasSize'],_0x168cbb/_0xe6c400>this[_0x1ae3ba(0x103)]['maxCanvasSize']&&(_0xe6c400=_0x168cbb/this['options']['maxCanvasSize']));const _0x32e8ff=this['heatStyle']['radius']*1.5,_0x1d69c9=_0x4ed780/_0xe6c400+_0x32e8ff*0x2,_0x29ecea=_0x4010cc/_0xe6c400+_0x32e8ff*0x2,_0x5955ae=_0x32e8ff*_0xe6c400;_0x2ff8a6['xmin']-=_0x5955ae,_0x2ff8a6['ymin']-=_0x5955ae,_0x2ff8a6['xmax']+=_0x5955ae,_0x2ff8a6[_0x1ae3ba(_0x45c2d3._0x488b2e)]+=_0x5955ae,this['_scale']=_0xe6c400,_0x584008=geLatLngBounds(_0x2ff8a6),this['_rectangle']=Cesium[_0x1ae3ba(_0x45c2d3._0x1f3690)]['fromDegrees'](_0x584008['xmin'],_0x584008['ymin'],_0x584008[_0x1ae3ba(0xfc)],_0x584008[_0x1ae3ba(0xf2)]);let _0xbb5f94=_0x4a0dc3[0x0][_0x1ae3ba(_0x45c2d3._0x4665dd)]??0x1,_0x20f841=_0x4a0dc3[0x0]['value']??0x0;const _0x2e9554=[];_0x4a0dc3['forEach'](_0x171f8e=>{const _0x2237d7=_0x1ae3ba,_0x41b6a8=mars3d__namespace['PointTrans'][_0x2237d7(_0x3c6d66._0x2dd7a9)]([_0x171f8e['lng'],_0x171f8e[_0x2237d7(_0x3c6d66._0x318d1a)]]),_0x3149c3=_0x171f8e['value']||0x1,_0x3078c4=Math['round']((_0x41b6a8[0x0]-_0x2ff8a6[_0x2237d7(_0x3c6d66._0x1d85b3)])/_0xe6c400),_0x4af3f8=Math[_0x2237d7(_0x3c6d66._0x203f8a)]((_0x2ff8a6[_0x2237d7(0xf2)]-_0x41b6a8[0x1])/_0xe6c400);_0xbb5f94=Math['max'](_0xbb5f94,_0x3149c3),_0x20f841=Math['min'](_0x20f841,_0x3149c3),_0x2e9554[_0x2237d7(_0x3c6d66._0x86d685)]({'x':_0x3078c4,'y':_0x4af3f8,'value':_0x3149c3});});const _0x26a119={'min':this['options']['min']??_0x20f841,'max':this[_0x1ae3ba(_0x45c2d3._0x4ae9f3)][_0x1ae3ba(_0x45c2d3._0x574120)]??_0xbb5f94,'data':_0x2e9554};this['_last_heatData']=_0x26a119;if(!this['_last_mBounds']||_0x2ff8a6['xmin']!==this[_0x1ae3ba(_0x45c2d3._0x37e15d)]['xmin']||_0x2ff8a6[_0x1ae3ba(_0x45c2d3._0x385532)]!==this['_last_mBounds']['ymin']||_0x2ff8a6[_0x1ae3ba(0xfc)]!==this[_0x1ae3ba(_0x45c2d3._0x1da196)]['xmax']||_0x2ff8a6['ymax']!==this['_last_mBounds']['ymax']){this['_last_mBounds']=_0x2ff8a6,this['_container']['style']['cssText']=_0x1ae3ba(0xd4)+_0x1d69c9+'px;height:'+_0x29ecea+'px;';const _0x426928={...this['heatStyle'],'container':this['_container']};!this[_0x1ae3ba(_0x45c2d3._0x602b4d)]?this[_0x1ae3ba(_0x45c2d3._0x2745bd)]=h337__namespace['create'](_0x426928):this['_heat']['configure'](_0x426928);}this['_heat']['setData'](_0x26a119);const _0x2fd762=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return _0x2fd762;}['_getArcHeatCanvas'](){const _0x14b06f={_0x355066:0x10a,_0x3e2335:0xf9,_0x11161a:0xcd},_0x1228c8=_0x5124ca;this[_0x1228c8(0xcd)]['configure']({'radius':this['heatStyle'][_0x1228c8(_0x14b06f._0x355066)]*this[_0x1228c8(0xe1)][_0x1228c8(0xd5)],'blur':this[_0x1228c8(0xc5)]['blur']*this['style'][_0x1228c8(_0x14b06f._0x3e2335)],'gradient':this['heatStyle']['gradientArc']||{0.25:_0x1228c8(0x100),0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x367bed=mars3d__namespace['DomUtil']['copyCanvas'](this[_0x1228c8(_0x14b06f._0x11161a)]['_renderer'][_0x1228c8(0xb8)]);return this['_heat']['configure'](this[_0x1228c8(0x103)]['heatStyle']),_0x367bed;}['getPointData'](_0x5947b7){const _0x21a28e={_0x5068bc:0xda,_0x21a539:0xcd},_0x42de15=_0x5124ca,_0x3cd354=mars3d__namespace['LngLatPoint']['parse'](_0x5947b7);if(!_0x3cd354)return{};const _0x2e528e=mars3d__namespace['PointTrans'][_0x42de15(_0x21a28e._0x5068bc)]([_0x3cd354[_0x42de15(0xee)],_0x3cd354['lat']]),_0x265239=this['_last_mBounds'],_0x3a322f=Math['round']((_0x2e528e[0x0]-_0x265239['xmin'])/this['_scale']),_0x448cc9=Math['round']((_0x265239[_0x42de15(0xf2)]-_0x2e528e[0x1])/this['_scale']),_0x337926=this['_heat']['getValueAt']({'x':_0x3a322f,'y':_0x448cc9}),_0x5b03da=this[_0x42de15(_0x21a28e._0x21a539)]['_renderer']['ctx']['getImageData'](_0x3a322f-0x1,_0x448cc9-0x1,0x1,0x1)['data'];return{'x':_0x3a322f,'y':_0x448cc9,'value':_0x337926,'color':'rgba('+_0x5b03da[0x0]+','+_0x5b03da[0x1]+','+_0x5b03da[0x2]+','+_0x5b03da[0x3]+')'};}}mars3d__namespace[_0x5124ca(0xbb)]['register']('heat',HeatLayer),mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x507e75){const _0x35f6f4={_0x34cc92:0xe3,_0x749f60:0xda,_0x32d55a:0xf2},_0x37028c=_0x5124ca,_0x43e04a=mars3d__namespace[_0x37028c(_0x35f6f4._0x34cc92)][_0x37028c(_0x35f6f4._0x749f60)]([_0x507e75[_0x37028c(0xbd)],_0x507e75['ymin']]),_0x44d3a7=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x507e75['xmax'],_0x507e75[_0x37028c(_0x35f6f4._0x32d55a)]]);return{'xmin':_0x43e04a[0x0],'ymin':_0x43e04a[0x1],'xmax':_0x44d3a7[0x0],'ymax':_0x44d3a7[0x1]};}function geLatLngBounds(_0x6237b2){const _0x4b0865={_0x2a9071:0xbd},_0x51d18b=_0x5124ca,_0x4d1976=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x6237b2[_0x51d18b(_0x4b0865._0x2a9071)],_0x6237b2['ymin']]),_0x312c47=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x6237b2['xmax'],_0x6237b2[_0x51d18b(0xf2)]]);return{'xmin':_0x4d1976[0x0],'ymin':_0x4d1976[0x1],'xmax':_0x312c47[0x0],'ymax':_0x312c47[0x1]};}function getVertexShaderSource(_0x3d0ecc){return'in\x20vec3\x20position3DHigh;\x0a\x20\x20in\x20vec3\x20position3DLow;\x0a\x20\x20in\x20vec2\x20st;\x0a\x20\x20in\x20float\x20batchId;\x0a\x20\x20uniform\x20sampler2D\x20bumpMap_3;\x0a\x20\x20out\x20vec3\x20v_positionMC;\x0a\x20\x20out\x20vec3\x20v_positionEC;\x0a\x20\x20out\x20vec2\x20v_st;\x0a\x0a\x20\x20void\x20main()\x0a\x20\x20{\x0a\x20\x20\x20\x20vec4\x20p\x20=\x20czm_computePosition();\x0a\x20\x20\x20\x20v_positionMC\x20=\x20position3DHigh\x20+\x20position3DLow;\x0a\x20\x20\x20\x20v_positionEC\x20=\x20(czm_modelViewRelativeToEye\x20*\x20p).xyz;\x0a\x20\x20\x20\x20v_st\x20=\x20st;\x0a\x20\x20\x20\x20vec4\x20color\x20=\x20texture(bumpMap_3,\x20v_st);\x0a\x20\x20\x20\x20float\x20centerBump\x20=\x20distance(vec3(0.0),color.rgb);\x0a\x20\x20\x20\x20vec3\x20upDir\x20=\x20normalize(v_positionMC.xyz);\x0a\x20\x20\x20\x20vec3\x20disPos\x20=\x20upDir\x20*\x20centerBump\x20*\x20'+_0x3d0ecc+';\x0a\x20\x20\x20\x20p\x20+=vec4(disPos,0.0);\x0a\x20\x20\x20\x20gl_Position\x20=\x20czm_modelViewProjectionRelativeToEye\x20*\x20p;\x0a\x20\x20}\x0a';}exports[_0x5124ca(0xcb)]=HeatLayer,Object['defineProperty'](exports,'__esModule',{'value':!![]});
}));
{
"name": "mars3d-heatmap",
"version": "3.7.0",
"version": "3.7.1",
"description": "Mars3D平台插件,结合heatmap可视化功能插件",

@@ -13,3 +13,3 @@ "main": "dist/mars3d-heatmap.js",

"devDependencies": {
"mars3d": "~3.7.0"
"mars3d": "~3.7.1"
},

@@ -16,0 +16,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc