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.6.15 to 3.6.16

6

dist/mars3d-heatmap.js
/**
* Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap
*
* 版本信息:v3.6.15
* 编译日期:2023-12-05 19:27:11
* 版本信息:v3.6.16
* 编译日期:2023-12-12 14:27:06
* 版权所有:Copyright by 火星科技 http://mars3d.cn

@@ -14,3 +14,3 @@ * 使用单位:免费公开版 ,2023-03-17

})(this, (function (exports, mars3d, h337) {
'use strict';const _0x132db7=_0x590d;function _0x4867(){const _0xc81134=['_positions','h337','rgb(255,255,255)','bumpMap','ImageLayer','_graphic','abs','DomUtil','layer','parse','getRectangle','getImageData','7VrIQqW','xmin','addGraphic','2220476LxGdcD','type','clear','4632246oFKplh','flyToByAnimationEnd','style','ymax','setPositions','_heat','2204845FUEMWM','blue','4473080dwqBzj','3iqBToF','_mBoundsMax','defineProperty','xmax','VERTEX_FORMAT','Rectangle','options','minCanvasSize','Util','__esModule','graphic','LayerUtil','forEach','_rectangle','请引入\x20heatmap.js\x20库\x20','12nAZYdg','_last_heatData','_layer','points','_graphic2','min','_updatePositionsHook','diffHeight','mercator2lonlat','_map','formatRectangle','ymin','get','Color','arcBlurScale','REPLACE','image','canvas','8540EYASqe','coordinates','_container','maxCanvasSize','max','_last_mBounds','47113qalWZq','round','heatStyle','gradientArc','positions','864972lyboWF',';\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','lat','Material','value','getValueAt','StencilOperation','lonlat2mercator','177782czMBhW','clientWidth','EllipsoidSurfaceAppearance','body','create','_renderer','StencilFunction','PointTrans'];_0x4867=function(){return _0xc81134;};return _0x4867();}(function(_0x4eec13,_0x1548f3){const _0x3fa906={_0x31c6e6:0x213,_0x3e7b0f:0x21c,_0x32bf1e:0x21e,_0x5abb53:0x240},_0x347bd7=_0x590d,_0x54a0c1=_0x4eec13();while(!![]){try{const _0x25749b=-parseInt(_0x347bd7(0x21f))/0x1*(parseInt(_0x347bd7(0x1fc))/0x2)+-parseInt(_0x347bd7(0x1f4))/0x3+-parseInt(_0x347bd7(_0x3fa906._0x31c6e6))/0x4+parseInt(_0x347bd7(_0x3fa906._0x3e7b0f))/0x5*(-parseInt(_0x347bd7(0x22e))/0x6)+parseInt(_0x347bd7(0x210))/0x7*(-parseInt(_0x347bd7(_0x3fa906._0x32bf1e))/0x8)+-parseInt(_0x347bd7(0x216))/0x9+-parseInt(_0x347bd7(_0x3fa906._0x5abb53))/0xa*(-parseInt(_0x347bd7(0x1ef))/0xb);if(_0x25749b===_0x1548f3)break;else _0x54a0c1['push'](_0x54a0c1['shift']());}catch(_0x300ede){_0x54a0c1['push'](_0x54a0c1['shift']());}}}(_0x4867,0x907b7));function _interopNamespace(_0x21d168){const _0x294b6b={_0x26aade:0x221},_0x1c1285=_0x590d;if(_0x21d168&&_0x21d168[_0x1c1285(0x228)])return _0x21d168;var _0x1698ec=Object['create'](null);return _0x21d168&&Object['keys'](_0x21d168)['forEach'](function(_0x36eab4){const _0x52c5e8=_0x1c1285;if(_0x36eab4!=='default'){var _0x151734=Object['getOwnPropertyDescriptor'](_0x21d168,_0x36eab4);Object[_0x52c5e8(_0x294b6b._0x26aade)](_0x1698ec,_0x36eab4,_0x151734[_0x52c5e8(0x23a)]?_0x151734:{'enumerable':!![],'get':function(){return _0x21d168[_0x36eab4];}});}}),_0x1698ec['default']=_0x21d168,_0x1698ec;}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['create'])throw new Error(_0x132db7(0x22d));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:_0x132db7(0x21d),0.6:'green',0.8:'yellow',0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance'][_0x132db7(0x223)]};class HeatLayer extends BaseLayer{constructor(_0x4c98cf={}){const _0xc8a290={_0x34250d:0x1fd,_0x343f99:0x1ff,_0x1dd721:0x225,_0x583c9e:0x1f1},_0x174fd7=_0x132db7;super(_0x4c98cf),this[_0x174fd7(0x225)]['maxCanvasSize']=this[_0x174fd7(0x225)]['maxCanvasSize']??document['body'][_0x174fd7(_0xc8a290._0x34250d)],this['options'][_0x174fd7(0x1ec)]=Math['min'](this['options']['maxCanvasSize'],0x1388),this['options']['minCanvasSize']=this['options'][_0x174fd7(0x226)]??document[_0x174fd7(_0xc8a290._0x343f99)]['clientHeight'],this[_0x174fd7(0x225)]['minCanvasSize']=Math[_0x174fd7(0x1ed)](this['options']['minCanvasSize'],0x2bc),this[_0x174fd7(_0xc8a290._0x1dd721)]['heatStyle']={...DEF_HEATSTYLE,...this[_0x174fd7(_0xc8a290._0x1dd721)][_0x174fd7(_0xc8a290._0x583c9e)]},this['options']['style']={...DEF_STYLE,...this['options']['style']};}get['layer'](){return this['_layer'];}get[_0x132db7(0x1f1)](){return this['options']['heatStyle'];}set['heatStyle'](_0x369595){const _0x4ea5b3={_0x2b38bc:0x1f1},_0x16d772=_0x132db7;this[_0x16d772(0x225)][_0x16d772(_0x4ea5b3._0x2b38bc)]=mars3d__namespace['Util']['merge'](this[_0x16d772(0x225)][_0x16d772(0x1f1)],_0x369595),this['_heat']&&(this['_heat']['configure'](this['options']['heatStyle']),this['_updatePositionsHook'](!![]));}get[_0x132db7(0x218)](){return this['options']['style'];}set[_0x132db7(0x218)](_0x5b0840){const _0x24c1ee={_0x392362:0x227,_0x561580:0x218},_0x10104c=_0x132db7;this[_0x10104c(0x225)][_0x10104c(0x218)]=mars3d__namespace[_0x10104c(_0x24c1ee._0x392362)]['merge'](this['options'][_0x10104c(_0x24c1ee._0x561580)],_0x5b0840);}get[_0x132db7(0x1f3)](){return this['_positions'];}set['positions'](_0x73b842){this['setPositions'](_0x73b842);}get[_0x132db7(0x241)](){const _0x2aa191={_0x1f539b:0x231},_0x591d1a=_0x132db7,_0x4215af=[];return this[_0x591d1a(_0x2aa191._0x1f539b)]['forEach'](_0x523505=>{_0x4215af['push'](_0x523505['toArray']());}),_0x4215af;}get['rectangle'](){const _0x53f2b7={_0x42abb0:0x22c},_0x3e9614=_0x132db7;return this[_0x3e9614(_0x53f2b7._0x42abb0)];}['_setOptionsHook'](_0x43ebfb,_0x9c6282){_0x43ebfb['positions']&&(this['positions']=_0x43ebfb['positions']);}['_mountedHook'](){const _0x528703={_0x40a95a:0x214,_0x3af13d:0x23e,_0x53d4c5:0x20c},_0x12b580=_0x132db7;this['style'][_0x12b580(_0x528703._0x40a95a)]===_0x12b580(_0x528703._0x3af13d)?this[_0x12b580(0x230)]=new mars3d__namespace[(_0x12b580(_0x528703._0x53d4c5))][(_0x12b580(0x208))]({'crs':'EPSG:3857','private':!![]}):this['_layer']=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0x5f0b14={_0x289efd:0x1eb,_0x4b43c2:0x237,_0x43835c:0x217},_0x137b46=_0x132db7;this['_map']['addLayer'](this['_layer']),this[_0x137b46(_0x5f0b14._0x289efd)]=mars3d__namespace['DomUtil'][_0x137b46(0x200)]('div','mars3d-heatmap\x20mars3d-hideDiv',this[_0x137b46(_0x5f0b14._0x4b43c2)]['container']),this['options']['positions']&&(this['positions']=this[_0x137b46(0x225)][_0x137b46(0x1f3)]),this[_0x137b46(0x225)]['flyTo']&&this[_0x137b46(_0x5f0b14._0x43835c)]();}['_removedHook'](){const _0x209079={_0x42b048:0x20b,_0x39457c:0x215},_0x407e7a=_0x132db7;this['_container']&&(mars3d__namespace[_0x407e7a(_0x209079._0x42b048)]['remove'](this['_container']),delete this['_container']),this[_0x407e7a(_0x209079._0x39457c)](),this['_map']['removeLayer'](this['_layer']);}['addPosition'](_0x175805,_0x56acfe){const _0x440ce3=_0x132db7;this['_positions']=this[_0x440ce3(0x204)]||[],this['_positions']['push'](_0x175805),this[_0x440ce3(0x234)](_0x56acfe);}[_0x132db7(0x21a)](_0x29b5b6,_0x12f731){const _0x415569=_0x132db7;this[_0x415569(0x204)]=_0x29b5b6,this['_updatePositionsHook'](_0x12f731);}['clear'](){const _0x14b0ba={_0x4ce772:0x209,_0x5a444a:0x232},_0xff9f85=_0x132db7;this['_graphic']&&(this['_layer']['removeGraphic'](this[_0xff9f85(_0x14b0ba._0x4ce772)],!![]),delete this['_graphic']),this['_graphic2']&&(this['_layer']['removeGraphic'](this[_0xff9f85(_0x14b0ba._0x5a444a)],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x1ba07d){const _0x1155fe={_0x4e7738:0x209,_0x5962b3:0x23e,_0x4eb97e:0x232,_0x34ace5:0x23e},_0x27ed29=_0x132db7;if(!this['show']||!this['_map']||!this['positions']||this['positions']['length']===0x0)return this;const _0x1759fc=this['_getHeatCanvas']();if(this['style']['type']===_0x27ed29(0x23e))this[_0x27ed29(0x230)]['setOptions']({'url':_0x1759fc['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style']['arc']?this['_graphic']&&_0x1ba07d?(this[_0x27ed29(_0x1155fe._0x4e7738)]['uniforms'][_0x27ed29(_0x1155fe._0x5962b3)]=_0x1759fc,this['_graphic']['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x1759fc,this[_0x27ed29(_0x1155fe._0x4eb97e)]['uniforms'][_0x27ed29(0x207)]=this['_graphic']['uniforms']['bumpMap'])):this['_createArcGraphic'](_0x1759fc):this['_graphic']&&_0x1ba07d?this['_graphic']['uniforms'][_0x27ed29(_0x1155fe._0x34ace5)]=_0x1759fc:this['_createGraphic'](_0x1759fc);return this;}['_createGraphic'](_0x4f44c3){const _0x2c528f={_0x46f72b:0x212},_0x3c0977=_0x132db7;this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0x3c0977(0x225)],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x3c0977(0x1fe))]({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x4f44c3},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this['_layer'][_0x3c0977(_0x2c528f._0x46f72b)](this['_graphic']);}['_createArcGraphic'](_0x320169){const _0x210fb4={_0x1bb69b:0x215,_0xcc20f1:0x202,_0x50a60d:0x1fa,_0x3e171b:0x23d,_0x13115f:0x235,_0x4afef8:0x22c,_0x44f0fc:0x22c,_0x119cdd:0x229,_0x530f6d:0x209,_0x138779:0x22c},_0x220a54=_0x132db7;this[_0x220a54(_0x210fb4._0x1bb69b)]();const _0x256bf6=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium[_0x220a54(_0x210fb4._0xcc20f1)]['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation'][_0x220a54(0x23d)]},'backFunction':Cesium[_0x220a54(_0x210fb4._0xcc20f1)]['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0x220a54(_0x210fb4._0x50a60d)]['KEEP'],'zPass':Cesium['StencilOperation'][_0x220a54(_0x210fb4._0x3e171b)]},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x3b5e33=Math['floor'](this['style']['diffHeight']??this[_0x220a54(0x220)]*0.02)+0.1;this['style']['diffHeight']&&delete this['style'][_0x220a54(_0x210fb4._0x13115f)];const _0x3174c0=(this[_0x220a54(0x218)]['splitNum'],0x64);let _0x187f94=Math['max'](this[_0x220a54(_0x210fb4._0x4afef8)]['height'],this[_0x220a54(_0x210fb4._0x44f0fc)]['width']);this['style']['granularity']=_0x187f94/=_0x3174c0;const _0xa4cd18=new Cesium[(_0x220a54(0x1f7))]({'fabric':{'uniforms':{'image':_0x320169,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium[(_0x220a54(0x23b))](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x405c27=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace[(_0x220a54(_0x210fb4._0x119cdd))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x256bf6,'material':_0xa4cd18,'vertexShaderSource':getVertexShaderSource(_0x3b5e33*_0x405c27)})}),this[_0x220a54(0x230)]['addGraphic'](this[_0x220a54(_0x210fb4._0x530f6d)]),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x220a54(_0x210fb4._0x138779)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x256bf6,'material':_0xa4cd18,'vertexShaderSource':getVertexShaderSource(-_0x3b5e33)})}),this['_layer']['addGraphic'](this['_graphic2']));}[_0x132db7(0x20e)](_0x5da58d){const _0x25e35f={_0x55685a:0x238},_0x4a83f2=_0x132db7;return _0x5da58d!==null&&_0x5da58d!==void 0x0&&_0x5da58d['isFormat']&&this['_rectangle']?mars3d__namespace['PolyUtil'][_0x4a83f2(_0x25e35f._0x55685a)](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x5618c4={_0x2dbc42:0x22b,_0x2d2a5f:0x20a,_0x117d4d:0x222,_0x93a8be:0x233,_0x2961ba:0x225,_0xebf77e:0x226,_0x37d520:0x1ec,_0x3af404:0x1f1,_0x3d999d:0x225,_0x17d9b1:0x22f,_0x1f32dc:0x211,_0x1e7cbf:0x222,_0x658ac9:0x1ee,_0x19b8d1:0x1eb,_0x58e6c0:0x21b,_0x2d1beb:0x201,_0x24bc3f:0x23f},_0x2c8e57={_0x43adf0:0x211},_0x1ae45c=_0x132db7,_0x2d045a=this['_positions'],_0x5e7ad9=[];let _0x145de6,_0x59bc2c,_0x43d88f,_0x42bd05;_0x2d045a[_0x1ae45c(_0x5618c4._0x2dbc42)](_0xbafd35=>{const _0x8389b2=_0x1ae45c,_0x49d4e1=mars3d__namespace['LngLatPoint']['parse'](_0xbafd35);if(!_0x49d4e1)return;_0x49d4e1['value']=_0xbafd35['value']||0x1,!this['options']['rectangle']&&(_0x145de6===undefined?(_0x145de6=_0x49d4e1['lng'],_0x59bc2c=_0x49d4e1['lng'],_0x43d88f=_0x49d4e1['lat'],_0x42bd05=_0x49d4e1['lat']):(_0x145de6=Math['min'](_0x145de6,_0x49d4e1['lng']),_0x59bc2c=Math['max'](_0x59bc2c,_0x49d4e1['lng']),_0x43d88f=Math['min'](_0x43d88f,_0x49d4e1['lat']),_0x42bd05=Math[_0x8389b2(0x1ed)](_0x42bd05,_0x49d4e1['lat']))),_0x5e7ad9['push'](_0x49d4e1);});_0x145de6===_0x59bc2c&&(_0x145de6-=0.000001,_0x59bc2c+=0.000001);_0x43d88f===_0x42bd05&&(_0x43d88f-=0.000001,_0x42bd05+=0.000001);let _0xab9b0=this['options']['rectangle']||{'xmin':_0x145de6,'xmax':_0x59bc2c,'ymin':_0x43d88f,'ymax':_0x42bd05};const _0x25290a=getMercatorBounds(_0xab9b0),_0x2086b8=Math[_0x1ae45c(_0x5618c4._0x2d2a5f)](_0x25290a[_0x1ae45c(_0x5618c4._0x117d4d)]-_0x25290a['xmin']),_0x5d5b4c=Math[_0x1ae45c(0x20a)](_0x25290a['ymax']-_0x25290a[_0x1ae45c(0x239)]),_0x342869=Math[_0x1ae45c(0x1ed)](_0x2086b8,_0x5d5b4c),_0xcfe5a4=Math[_0x1ae45c(_0x5618c4._0x93a8be)](_0x2086b8,_0x5d5b4c);this['_mBoundsMax']=_0x342869;let _0x42107f=0x1;if(_0x342869>this[_0x1ae45c(_0x5618c4._0x2961ba)]['maxCanvasSize'])_0x42107f=_0x342869/this[_0x1ae45c(_0x5618c4._0x2961ba)]['maxCanvasSize'],_0xcfe5a4/_0x42107f<this['options'][_0x1ae45c(0x226)]&&(_0x42107f=_0xcfe5a4/this['options'][_0x1ae45c(0x226)]);else _0xcfe5a4<this['options']['minCanvasSize']&&(_0x42107f=_0xcfe5a4/this[_0x1ae45c(0x225)][_0x1ae45c(_0x5618c4._0xebf77e)],_0x342869/_0x42107f>this['options']['maxCanvasSize']&&(_0x42107f=_0x342869/this['options'][_0x1ae45c(_0x5618c4._0x37d520)]));const _0x3d3372=this[_0x1ae45c(_0x5618c4._0x3af404)]['radius']*1.5,_0x17e265=_0x2086b8/_0x42107f+_0x3d3372*0x2,_0x47efd9=_0x5d5b4c/_0x42107f+_0x3d3372*0x2,_0x17ece8=_0x3d3372*_0x42107f;_0x25290a[_0x1ae45c(0x211)]-=_0x17ece8,_0x25290a['ymin']-=_0x17ece8,_0x25290a['xmax']+=_0x17ece8,_0x25290a[_0x1ae45c(0x219)]+=_0x17ece8,this['_scale']=_0x42107f,_0xab9b0=geLatLngBounds(_0x25290a),this[_0x1ae45c(0x22c)]=Cesium[_0x1ae45c(0x224)]['fromDegrees'](_0xab9b0['xmin'],_0xab9b0['ymin'],_0xab9b0['xmax'],_0xab9b0['ymax']);let _0x2e77e6=_0x5e7ad9[0x0]['value']??0x1,_0x7bb5cf=_0x5e7ad9[0x0]['value']??0x0;const _0x2a1a43=[];_0x5e7ad9['forEach'](_0x3bd611=>{const _0x51fcdb=_0x1ae45c,_0x4624ef=mars3d__namespace[_0x51fcdb(0x203)]['lonlat2mercator']([_0x3bd611['lng'],_0x3bd611['lat']]),_0x35e6e5=_0x3bd611[_0x51fcdb(0x1f8)]||0x1,_0x2ec480=Math['round']((_0x4624ef[0x0]-_0x25290a[_0x51fcdb(_0x2c8e57._0x43adf0)])/_0x42107f),_0x3e1dfb=Math['round']((_0x25290a['ymax']-_0x4624ef[0x1])/_0x42107f);_0x2e77e6=Math['max'](_0x2e77e6,_0x35e6e5),_0x7bb5cf=Math[_0x51fcdb(0x233)](_0x7bb5cf,_0x35e6e5),_0x2a1a43['push']({'x':_0x2ec480,'y':_0x3e1dfb,'value':_0x35e6e5});});const _0x35e50d={'min':this['options']['min']??_0x7bb5cf,'max':this[_0x1ae45c(_0x5618c4._0x3d999d)]['max']??_0x2e77e6,'data':_0x2a1a43};this[_0x1ae45c(_0x5618c4._0x17d9b1)]=_0x35e50d;if(!this['_last_mBounds']||_0x25290a[_0x1ae45c(_0x5618c4._0x1f32dc)]!==this['_last_mBounds']['xmin']||_0x25290a['ymin']!==this['_last_mBounds']['ymin']||_0x25290a[_0x1ae45c(0x222)]!==this['_last_mBounds'][_0x1ae45c(_0x5618c4._0x1e7cbf)]||_0x25290a['ymax']!==this['_last_mBounds']['ymax']){this[_0x1ae45c(_0x5618c4._0x658ac9)]=_0x25290a,this['_container']['style']['cssText']='width:'+_0x17e265+'px;height:'+_0x47efd9+'px;';const _0x42c7f4={...this['heatStyle'],'container':this[_0x1ae45c(_0x5618c4._0x19b8d1)]};!this[_0x1ae45c(_0x5618c4._0x58e6c0)]?this['_heat']=h337__namespace['create'](_0x42c7f4):this['_heat']['configure'](_0x42c7f4);}this['_heat']['setData'](_0x35e50d);const _0x451eb7=mars3d__namespace['DomUtil']['copyCanvas'](this[_0x1ae45c(0x21b)][_0x1ae45c(_0x5618c4._0x2d1beb)][_0x1ae45c(_0x5618c4._0x24bc3f)]);return _0x451eb7;}['_getArcHeatCanvas'](){const _0x257bfe={_0x59696c:0x23c,_0x216275:0x20b,_0x4051d4:0x201},_0x5e45c0=_0x132db7;this['_heat']['configure']({'radius':this['heatStyle']['radius']*this['style']['arcRadiusScale'],'blur':this['heatStyle']['blur']*this['style'][_0x5e45c0(_0x257bfe._0x59696c)],'gradient':this['heatStyle'][_0x5e45c0(0x1f2)]||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:_0x5e45c0(0x206)}});const _0x386983=mars3d__namespace[_0x5e45c0(_0x257bfe._0x216275)]['copyCanvas'](this['_heat'][_0x5e45c0(_0x257bfe._0x4051d4)]['canvas']);return this['_heat']['configure'](this['options'][_0x5e45c0(0x1f1)]),_0x386983;}['getPointData'](_0x1951a3){const _0x25d3ad={_0x5b5abf:0x1f9,_0x499776:0x20f},_0x4ab3a8=_0x132db7,_0x5caab0=mars3d__namespace['LngLatPoint'][_0x4ab3a8(0x20d)](_0x1951a3);if(!_0x5caab0)return{};const _0x6dd69a=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5caab0['lng'],_0x5caab0[_0x4ab3a8(0x1f6)]]),_0x49c19a=this['_last_mBounds'],_0x21768b=Math['round']((_0x6dd69a[0x0]-_0x49c19a['xmin'])/this['_scale']),_0x5c6f1a=Math[_0x4ab3a8(0x1f0)]((_0x49c19a['ymax']-_0x6dd69a[0x1])/this['_scale']),_0x5cff75=this['_heat'][_0x4ab3a8(_0x25d3ad._0x5b5abf)]({'x':_0x21768b,'y':_0x5c6f1a}),_0x4cd101=this['_heat']['_renderer']['ctx'][_0x4ab3a8(_0x25d3ad._0x499776)](_0x21768b-0x1,_0x5c6f1a-0x1,0x1,0x1)['data'];return{'x':_0x21768b,'y':_0x5c6f1a,'value':_0x5cff75,'color':'rgba('+_0x4cd101[0x0]+','+_0x4cd101[0x1]+','+_0x4cd101[0x2]+','+_0x4cd101[0x3]+')'};}}mars3d__namespace[_0x132db7(0x22a)]['register']('heat',HeatLayer),mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace[_0x132db7(0x205)]=h337__namespace;function getMercatorBounds(_0x70a75){const _0x2f3edd=_0x132db7,_0x26197e=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x70a75['xmin'],_0x70a75[_0x2f3edd(0x239)]]),_0x4f7bbf=mars3d__namespace[_0x2f3edd(0x203)][_0x2f3edd(0x1fb)]([_0x70a75['xmax'],_0x70a75['ymax']]);return{'xmin':_0x26197e[0x0],'ymin':_0x26197e[0x1],'xmax':_0x4f7bbf[0x0],'ymax':_0x4f7bbf[0x1]};}function _0x590d(_0x1b4bc3,_0xe31af8){const _0x4867bf=_0x4867();return _0x590d=function(_0x590d06,_0x28d0a2){_0x590d06=_0x590d06-0x1eb;let _0x114b3e=_0x4867bf[_0x590d06];return _0x114b3e;},_0x590d(_0x1b4bc3,_0xe31af8);}function geLatLngBounds(_0x4e36c0){const _0x44a1ec={_0x5cc893:0x211,_0x181b30:0x239,_0xf1a30b:0x219},_0x184517=_0x132db7,_0x27bf79=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x4e36c0[_0x184517(_0x44a1ec._0x5cc893)],_0x4e36c0[_0x184517(_0x44a1ec._0x181b30)]]),_0x34f922=mars3d__namespace['PointTrans'][_0x184517(0x236)]([_0x4e36c0['xmax'],_0x4e36c0[_0x184517(_0x44a1ec._0xf1a30b)]]);return{'xmin':_0x27bf79[0x0],'ymin':_0x27bf79[0x1],'xmax':_0x34f922[0x0],'ymax':_0x34f922[0x1]};}function getVertexShaderSource(_0xf2cf6a){const _0x2375c8={_0x20acdb:0x1f5},_0x1569b8=_0x132db7;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'+_0xf2cf6a+_0x1569b8(_0x2375c8._0x20acdb);}exports['HeatLayer']=HeatLayer,Object['defineProperty'](exports,'__esModule',{'value':!![]});
'use strict';const _0x408f7a=_0x19f0;(function(_0x504fcd,_0x59cdb3){const _0x2d90c4={_0x2ef496:0x1ec,_0x5449d0:0x1f9,_0x2858be:0x211,_0x29f2f5:0x1ef,_0x362e3e:0x220,_0x141d8f:0x1f4,_0x5408ab:0x20d},_0x4bee18=_0x19f0,_0x338f4b=_0x504fcd();while(!![]){try{const _0x176b93=parseInt(_0x4bee18(_0x2d90c4._0x2ef496))/0x1+parseInt(_0x4bee18(_0x2d90c4._0x5449d0))/0x2*(parseInt(_0x4bee18(_0x2d90c4._0x2858be))/0x3)+-parseInt(_0x4bee18(0x1eb))/0x4+-parseInt(_0x4bee18(_0x2d90c4._0x29f2f5))/0x5+-parseInt(_0x4bee18(_0x2d90c4._0x362e3e))/0x6*(-parseInt(_0x4bee18(_0x2d90c4._0x141d8f))/0x7)+-parseInt(_0x4bee18(0x225))/0x8*(-parseInt(_0x4bee18(0x1de))/0x9)+parseInt(_0x4bee18(_0x2d90c4._0x5408ab))/0xa*(-parseInt(_0x4bee18(0x20b))/0xb);if(_0x176b93===_0x59cdb3)break;else _0x338f4b['push'](_0x338f4b['shift']());}catch(_0x435761){_0x338f4b['push'](_0x338f4b['shift']());}}}(_0x2e67,0x48dd2));function _interopNamespace(_0x38e6d0){const _0x25cba9={_0xf155df:0x21f,_0x210995:0x235},_0x4ff2f3=_0x19f0;if(_0x38e6d0&&_0x38e6d0['__esModule'])return _0x38e6d0;var _0x191b21=Object[_0x4ff2f3(0x1fa)](null);return _0x38e6d0&&Object['keys'](_0x38e6d0)['forEach'](function(_0x58f22a){const _0x504cb6=_0x4ff2f3;if(_0x58f22a!==_0x504cb6(_0x25cba9._0xf155df)){var _0x38ca57=Object['getOwnPropertyDescriptor'](_0x38e6d0,_0x58f22a);Object['defineProperty'](_0x191b21,_0x58f22a,_0x38ca57[_0x504cb6(_0x25cba9._0x210995)]?_0x38ca57:{'enumerable':!![],'get':function(){return _0x38e6d0[_0x58f22a];}});}}),_0x191b21['default']=_0x38e6d0,_0x191b21;}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 _0x19f0(_0x46ee1e,_0x54eda5){const _0x2e678c=_0x2e67();return _0x19f0=function(_0x19f00e,_0xd21d16){_0x19f00e=_0x19f00e-0x1dd;let _0x4a9b58=_0x2e678c[_0x19f00e];return _0x4a9b58;},_0x19f0(_0x46ee1e,_0x54eda5);}if(!h337__namespace['create'])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x408f7a(0x230)]['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:_0x408f7a(0x1ed),0.6:'green',0.8:'yellow',0.9:_0x408f7a(0x1fb)}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance'][_0x408f7a(0x1e7)]};function _0x2e67(){const _0x39c709=['_rectangle','heatStyle','rgb(216,216,216)','px;','minCanvasSize','merge','ALPHA_BLEND','_last_heatData','canvas','splitNum','addGraphic','_getArcHeatCanvas','DomUtil','11edERMs','_last_mBounds','4478150CDLJTL','setData','flyToByAnimationEnd','addPosition','3bOGoKQ','LngLatPoint','KEEP','_graphic','forEach','lonlat2mercator','maxCanvasSize','arcRadiusScale','min','_createGraphic','xmin','xmax','removeGraphic','configure','default','129834iZmBIg','Util','_mBoundsMax','options','PointTrans','8jbFMfU','_graphic2','_layer','_map','_container','abs','floor','_scale','diffHeight','uniforms','remove','layer','lat','RenderState','max','graphic','get','image','clientWidth','5201559WXVLiQ','addLayer','_updatePositionsHook','clientHeight','_heat','div','image/png','getPointData','rgba(','VERTEX_FORMAT','lng','StencilOperation','_createArcGraphic','2024412Flsktr','130813OnwObm','blue','style','278870xNTKMY','round','defineProperty','RectanglePrimitive','clear','161vsLTCd','ymax','getValueAt','bumpMap','container','203362TNWUnT','create','red','positions','mercator2lonlat'];_0x2e67=function(){return _0x39c709;};return _0x2e67();}class HeatLayer extends BaseLayer{constructor(_0x46af8d={}){const _0x334eb6={_0x4ff37c:0x1dd,_0x15e56f:0x219,_0x507542:0x217,_0x29a0d5:0x1e1,_0x22c4e3:0x233,_0x1dd38a:0x1ee},_0x4c111d=_0x408f7a;super(_0x46af8d),this['options']['maxCanvasSize']=this['options']['maxCanvasSize']??document['body'][_0x4c111d(_0x334eb6._0x4ff37c)],this[_0x4c111d(0x223)][_0x4c111d(0x217)]=Math[_0x4c111d(_0x334eb6._0x15e56f)](this['options'][_0x4c111d(_0x334eb6._0x507542)],0x1388),this['options']['minCanvasSize']=this['options'][_0x4c111d(0x202)]??document['body'][_0x4c111d(_0x334eb6._0x29a0d5)],this['options']['minCanvasSize']=Math[_0x4c111d(_0x334eb6._0x22c4e3)](this['options']['minCanvasSize'],0x2bc),this[_0x4c111d(0x223)]['heatStyle']={...DEF_HEATSTYLE,...this['options']['heatStyle']},this[_0x4c111d(0x223)]['style']={...DEF_STYLE,...this[_0x4c111d(0x223)][_0x4c111d(_0x334eb6._0x1dd38a)]};}get['layer'](){return this['_layer'];}get['heatStyle'](){const _0x3e7cf7={_0x5a077c:0x1ff},_0x48f847=_0x408f7a;return this['options'][_0x48f847(_0x3e7cf7._0x5a077c)];}set['heatStyle'](_0x545ada){const _0x1471d1={_0xa54854:0x221,_0x2a8e1b:0x21e,_0x277628:0x1ff},_0x5cfd32=_0x408f7a;this['options']['heatStyle']=mars3d__namespace[_0x5cfd32(_0x1471d1._0xa54854)][_0x5cfd32(0x203)](this['options']['heatStyle'],_0x545ada),this['_heat']&&(this[_0x5cfd32(0x1e2)][_0x5cfd32(_0x1471d1._0x2a8e1b)](this[_0x5cfd32(0x223)][_0x5cfd32(_0x1471d1._0x277628)]),this[_0x5cfd32(0x1e0)](!![]));}get['style'](){const _0x2072a1=_0x408f7a;return this[_0x2072a1(0x223)]['style'];}set['style'](_0x2ad042){const _0x28d3da={_0x21103d:0x223},_0x67ec45=_0x408f7a;this[_0x67ec45(_0x28d3da._0x21103d)]['style']=mars3d__namespace[_0x67ec45(0x221)]['merge'](this['options']['style'],_0x2ad042);}get[_0x408f7a(0x1fc)](){return this['_positions'];}set['positions'](_0x5b62ab){this['setPositions'](_0x5b62ab);}get['coordinates'](){const _0x2633b5=_0x408f7a,_0x1d6efb=[];return this['points'][_0x2633b5(0x215)](_0x44b148=>{_0x1d6efb['push'](_0x44b148['toArray']());}),_0x1d6efb;}get['rectangle'](){const _0x3ef783=_0x408f7a;return this[_0x3ef783(0x1fe)];}['_setOptionsHook'](_0x56971b,_0x5e5856){_0x56971b['positions']&&(this['positions']=_0x56971b['positions']);}['_mountedHook'](){this['style']['type']==='image'?this['_layer']=new mars3d__namespace['layer']['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this['_layer']=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0x2d0dda={_0x3270c2:0x1df,_0x3e5c5b:0x1e3,_0x57c343:0x223,_0x3f2586:0x20f},_0x4b40e7=_0x408f7a;this[_0x4b40e7(0x228)][_0x4b40e7(_0x2d0dda._0x3270c2)](this['_layer']),this['_container']=mars3d__namespace['DomUtil']['create'](_0x4b40e7(_0x2d0dda._0x3e5c5b),'mars3d-heatmap\x20mars3d-hideDiv',this['_map'][_0x4b40e7(0x1f8)]),this[_0x4b40e7(0x223)][_0x4b40e7(0x1fc)]&&(this['positions']=this[_0x4b40e7(_0x2d0dda._0x57c343)]['positions']),this['options']['flyTo']&&this[_0x4b40e7(_0x2d0dda._0x3f2586)]();}['_removedHook'](){const _0x4373a0=_0x408f7a;this['_container']&&(mars3d__namespace[_0x4373a0(0x20a)][_0x4373a0(0x22f)](this['_container']),delete this[_0x4373a0(0x229)]),this['clear'](),this['_map']['removeLayer'](this['_layer']);}[_0x408f7a(0x210)](_0x1481a8,_0x187a82){const _0x277639=_0x408f7a;this['_positions']=this['_positions']||[],this['_positions']['push'](_0x1481a8),this[_0x277639(0x1e0)](_0x187a82);}['setPositions'](_0x3eff15,_0x2e872e){this['_positions']=_0x3eff15,this['_updatePositionsHook'](_0x2e872e);}['clear'](){const _0x25d90b={_0xa9c80b:0x21d,_0x2c9653:0x214},_0x4967cd=_0x408f7a;this['_graphic']&&(this['_layer'][_0x4967cd(_0x25d90b._0xa9c80b)](this['_graphic'],!![]),delete this[_0x4967cd(_0x25d90b._0x2c9653)]),this['_graphic2']&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x3ff713){const _0x5ba669={_0x253164:0x1fc,_0x30ac23:0x1ee,_0xe5dd2c:0x236,_0x59fa2b:0x1e4,_0x2fe18:0x1fe,_0x35f4ed:0x214,_0x3c2157:0x1f7,_0x451129:0x209,_0x45712e:0x22e,_0x5325ed:0x236,_0x4ec674:0x226,_0x11ce13:0x1f7,_0x14fbe4:0x1ea,_0x18a3d9:0x21a},_0x1a75db=_0x408f7a;if(!this['show']||!this[_0x1a75db(0x228)]||!this['positions']||this[_0x1a75db(_0x5ba669._0x253164)]['length']===0x0)return this;const _0x2b76b7=this['_getHeatCanvas']();if(this[_0x1a75db(_0x5ba669._0x30ac23)]['type']===_0x1a75db(_0x5ba669._0xe5dd2c))this['_layer']['setOptions']({'url':_0x2b76b7['toDataURL'](_0x1a75db(_0x5ba669._0x59fa2b)),'rectangle':this[_0x1a75db(_0x5ba669._0x2fe18)],'opacity':this['style']['opacity']});else this[_0x1a75db(_0x5ba669._0x30ac23)]['arc']?this['_graphic']&&_0x3ff713?(this[_0x1a75db(_0x5ba669._0x35f4ed)][_0x1a75db(0x22e)]['image']=_0x2b76b7,this['_graphic']['uniforms'][_0x1a75db(_0x5ba669._0x3c2157)]=this[_0x1a75db(_0x5ba669._0x451129)](),this['_graphic2']&&(this['_graphic2'][_0x1a75db(_0x5ba669._0x45712e)][_0x1a75db(_0x5ba669._0x5325ed)]=_0x2b76b7,this[_0x1a75db(_0x5ba669._0x4ec674)]['uniforms'][_0x1a75db(0x1f7)]=this['_graphic']['uniforms'][_0x1a75db(_0x5ba669._0x11ce13)])):this[_0x1a75db(_0x5ba669._0x14fbe4)](_0x2b76b7):this['_graphic']&&_0x3ff713?this['_graphic'][_0x1a75db(_0x5ba669._0x45712e)]['image']=_0x2b76b7:this[_0x1a75db(_0x5ba669._0x18a3d9)](_0x2b76b7);return this;}['_createGraphic'](_0x7ae8f9){const _0x48378f={_0x587372:0x1f3,_0x211ffb:0x1f2,_0x26e015:0x227,_0x5d7fd4:0x208},_0x50e7b4=_0x408f7a;this[_0x50e7b4(_0x48378f._0x587372)](),this[_0x50e7b4(0x214)]=new mars3d__namespace['graphic'][(_0x50e7b4(_0x48378f._0x211ffb))]({...this[_0x50e7b4(0x223)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x7ae8f9},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x50e7b4(_0x48378f._0x26e015)][_0x50e7b4(_0x48378f._0x5d7fd4)](this['_graphic']);}['_createArcGraphic'](_0x1e8bb6){const _0x32064d={_0x576963:0x1e9,_0x5ecbda:0x1e9,_0x3fbbd2:0x213,_0x237916:0x207,_0xcc12d6:0x1fe,_0x5281b2:0x1ee,_0x47f32e:0x1f2,_0x2a956b:0x223,_0x5b423d:0x234,_0x2ad71a:0x208},_0xc98fe9=_0x408f7a;this['clear']();const _0x56b0c0=Cesium[_0xc98fe9(0x232)]['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0xc98fe9(_0x32064d._0x576963)][_0xc98fe9(0x213)],'zPass':Cesium[_0xc98fe9(_0x32064d._0x5ecbda)]['REPLACE']},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0xc98fe9(_0x32064d._0x5ecbda)][_0xc98fe9(_0x32064d._0x3fbbd2)],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState'][_0xc98fe9(0x204)]}),_0x5d20a2=Math[_0xc98fe9(0x22b)](this['style']['diffHeight']??this[_0xc98fe9(0x222)]*0.02)+0.1;this['style'][_0xc98fe9(0x22d)]&&delete this['style']['diffHeight'];const _0x2ff8eb=(this['style'][_0xc98fe9(_0x32064d._0x237916)],0x64);let _0x556393=Math['max'](this['_rectangle']['height'],this[_0xc98fe9(_0x32064d._0xcc12d6)]['width']);this['style']['granularity']=_0x556393/=_0x2ff8eb;const _0x424ece=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x1e8bb6,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x20ec79=this[_0xc98fe9(_0x32064d._0x5281b2)]['arcDirection']||0x1;this['_graphic']=new mars3d__namespace['graphic'][(_0xc98fe9(_0x32064d._0x47f32e))]({...this[_0xc98fe9(_0x32064d._0x2a956b)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x56b0c0,'material':_0x424ece,'vertexShaderSource':getVertexShaderSource(_0x5d20a2*_0x20ec79)})}),this['_layer']['addGraphic'](this['_graphic']),this['style']['arcDirection']===0x0&&(this[_0xc98fe9(0x226)]=new mars3d__namespace[(_0xc98fe9(_0x32064d._0x5b423d))][(_0xc98fe9(0x1f2))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x56b0c0,'material':_0x424ece,'vertexShaderSource':getVertexShaderSource(-_0x5d20a2)})}),this['_layer'][_0xc98fe9(_0x32064d._0x2ad71a)](this['_graphic2']));}['getRectangle'](_0x3bbcdf){const _0xd7f740=_0x408f7a;return _0x3bbcdf!==null&&_0x3bbcdf!==void 0x0&&_0x3bbcdf['isFormat']&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this[_0xd7f740(0x1fe)]):this['_rectangle'];}['_getHeatCanvas'](){const _0x3aea41={_0x36b652:0x21c,_0x4a5671:0x22a,_0x2ce18c:0x202,_0x4c4062:0x1f5,_0xb1dd8f:0x223,_0x1d9d99:0x20c,_0x30d312:0x20e,_0x52cc63:0x20a,_0x4b2c5d:0x206},_0x245961={_0x3735a7:0x231,_0x55b8dc:0x1e8},_0x498d54=_0x408f7a,_0x1204f8=this['_positions'],_0x39bb24=[];let _0x3ba493,_0x1cea7e,_0x1baa86,_0x391452;_0x1204f8['forEach'](_0x48ef78=>{const _0x277512=_0x19f0,_0x132853=mars3d__namespace['LngLatPoint']['parse'](_0x48ef78);if(!_0x132853)return;_0x132853['value']=_0x48ef78['value']||0x1,!this['options']['rectangle']&&(_0x3ba493===undefined?(_0x3ba493=_0x132853[_0x277512(0x1e8)],_0x1cea7e=_0x132853['lng'],_0x1baa86=_0x132853['lat'],_0x391452=_0x132853[_0x277512(_0x245961._0x3735a7)]):(_0x3ba493=Math['min'](_0x3ba493,_0x132853['lng']),_0x1cea7e=Math['max'](_0x1cea7e,_0x132853[_0x277512(_0x245961._0x55b8dc)]),_0x1baa86=Math['min'](_0x1baa86,_0x132853['lat']),_0x391452=Math['max'](_0x391452,_0x132853['lat']))),_0x39bb24['push'](_0x132853);});_0x3ba493===_0x1cea7e&&(_0x3ba493-=0.000001,_0x1cea7e+=0.000001);_0x1baa86===_0x391452&&(_0x1baa86-=0.000001,_0x391452+=0.000001);let _0x26877e=this['options']['rectangle']||{'xmin':_0x3ba493,'xmax':_0x1cea7e,'ymin':_0x1baa86,'ymax':_0x391452};const _0x321ae4=getMercatorBounds(_0x26877e),_0x414d49=Math['abs'](_0x321ae4[_0x498d54(_0x3aea41._0x36b652)]-_0x321ae4['xmin']),_0x3cc7d9=Math[_0x498d54(_0x3aea41._0x4a5671)](_0x321ae4['ymax']-_0x321ae4['ymin']),_0x133c0a=Math['max'](_0x414d49,_0x3cc7d9),_0xb3b5db=Math['min'](_0x414d49,_0x3cc7d9);this['_mBoundsMax']=_0x133c0a;let _0x45687c=0x1;if(_0x133c0a>this['options']['maxCanvasSize'])_0x45687c=_0x133c0a/this['options'][_0x498d54(0x217)],_0xb3b5db/_0x45687c<this['options'][_0x498d54(_0x3aea41._0x2ce18c)]&&(_0x45687c=_0xb3b5db/this[_0x498d54(0x223)][_0x498d54(_0x3aea41._0x2ce18c)]);else _0xb3b5db<this['options']['minCanvasSize']&&(_0x45687c=_0xb3b5db/this['options'][_0x498d54(0x202)],_0x133c0a/_0x45687c>this[_0x498d54(0x223)]['maxCanvasSize']&&(_0x45687c=_0x133c0a/this['options']['maxCanvasSize']));const _0x4f0475=this['heatStyle']['radius']*1.5,_0x12c817=_0x414d49/_0x45687c+_0x4f0475*0x2,_0x93aa8d=_0x3cc7d9/_0x45687c+_0x4f0475*0x2,_0x58f4fc=_0x4f0475*_0x45687c;_0x321ae4['xmin']-=_0x58f4fc,_0x321ae4['ymin']-=_0x58f4fc,_0x321ae4['xmax']+=_0x58f4fc,_0x321ae4['ymax']+=_0x58f4fc,this['_scale']=_0x45687c,_0x26877e=geLatLngBounds(_0x321ae4),this['_rectangle']=Cesium['Rectangle']['fromDegrees'](_0x26877e['xmin'],_0x26877e['ymin'],_0x26877e[_0x498d54(_0x3aea41._0x36b652)],_0x26877e[_0x498d54(_0x3aea41._0x4c4062)]);let _0x8c78bc=_0x39bb24[0x0]['value']??0x1,_0x521ad6=_0x39bb24[0x0]['value']??0x0;const _0x339fe5=[];_0x39bb24['forEach'](_0x56f916=>{const _0x6a9bcf=_0x498d54,_0x484f85=mars3d__namespace['PointTrans'][_0x6a9bcf(0x216)]([_0x56f916[_0x6a9bcf(0x1e8)],_0x56f916['lat']]),_0x1800dc=_0x56f916['value']||0x1,_0x4de0e6=Math['round']((_0x484f85[0x0]-_0x321ae4['xmin'])/_0x45687c),_0x4f0171=Math['round']((_0x321ae4['ymax']-_0x484f85[0x1])/_0x45687c);_0x8c78bc=Math['max'](_0x8c78bc,_0x1800dc),_0x521ad6=Math['min'](_0x521ad6,_0x1800dc),_0x339fe5['push']({'x':_0x4de0e6,'y':_0x4f0171,'value':_0x1800dc});});const _0x200810={'min':this['options']['min']??_0x521ad6,'max':this[_0x498d54(_0x3aea41._0xb1dd8f)]['max']??_0x8c78bc,'data':_0x339fe5};this[_0x498d54(0x205)]=_0x200810;if(!this['_last_mBounds']||_0x321ae4[_0x498d54(0x21b)]!==this['_last_mBounds']['xmin']||_0x321ae4['ymin']!==this[_0x498d54(_0x3aea41._0x1d9d99)]['ymin']||_0x321ae4['xmax']!==this['_last_mBounds']['xmax']||_0x321ae4[_0x498d54(_0x3aea41._0x4c4062)]!==this[_0x498d54(0x20c)][_0x498d54(0x1f5)]){this['_last_mBounds']=_0x321ae4,this['_container']['style']['cssText']='width:'+_0x12c817+'px;height:'+_0x93aa8d+_0x498d54(0x201);const _0x1e626b={...this['heatStyle'],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace['create'](_0x1e626b):this['_heat']['configure'](_0x1e626b);}this['_heat'][_0x498d54(_0x3aea41._0x30d312)](_0x200810);const _0x5aa956=mars3d__namespace[_0x498d54(_0x3aea41._0x52cc63)]['copyCanvas'](this['_heat']['_renderer'][_0x498d54(_0x3aea41._0x4b2c5d)]);return _0x5aa956;}['_getArcHeatCanvas'](){const _0x104f96={_0x1cd483:0x1ff,_0x13da98:0x200},_0x35f39c=_0x408f7a;this['_heat']['configure']({'radius':this[_0x35f39c(0x1ff)]['radius']*this['style'][_0x35f39c(0x218)],'blur':this[_0x35f39c(_0x104f96._0x1cd483)]['blur']*this['style']['arcBlurScale'],'gradient':this[_0x35f39c(_0x104f96._0x1cd483)]['gradientArc']||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:_0x35f39c(_0x104f96._0x13da98),0x1:'rgb(255,255,255)'}});const _0x4b4611=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return this['_heat']['configure'](this['options']['heatStyle']),_0x4b4611;}[_0x408f7a(0x1e5)](_0xeac10a){const _0x823c58={_0xb36348:0x212,_0x479948:0x216,_0x5ab204:0x21b,_0x39d394:0x22c,_0x44140a:0x1f6,_0x403ace:0x1e6},_0x3e031a=_0x408f7a,_0x53008b=mars3d__namespace[_0x3e031a(_0x823c58._0xb36348)]['parse'](_0xeac10a);if(!_0x53008b)return{};const _0x234d4a=mars3d__namespace[_0x3e031a(0x224)][_0x3e031a(_0x823c58._0x479948)]([_0x53008b['lng'],_0x53008b['lat']]),_0x2e51ed=this['_last_mBounds'],_0x1172c0=Math[_0x3e031a(0x1f0)]((_0x234d4a[0x0]-_0x2e51ed[_0x3e031a(_0x823c58._0x5ab204)])/this[_0x3e031a(0x22c)]),_0x2234ee=Math['round']((_0x2e51ed['ymax']-_0x234d4a[0x1])/this[_0x3e031a(_0x823c58._0x39d394)]),_0x25cdf0=this['_heat'][_0x3e031a(_0x823c58._0x44140a)]({'x':_0x1172c0,'y':_0x2234ee}),_0x451a81=this[_0x3e031a(0x1e2)]['_renderer']['ctx']['getImageData'](_0x1172c0-0x1,_0x2234ee-0x1,0x1,0x1)['data'];return{'x':_0x1172c0,'y':_0x2234ee,'value':_0x25cdf0,'color':_0x3e031a(_0x823c58._0x403ace)+_0x451a81[0x0]+','+_0x451a81[0x1]+','+_0x451a81[0x2]+','+_0x451a81[0x3]+')'};}}mars3d__namespace['LayerUtil']['register']('heat',HeatLayer),mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x131962){const _0x4a53c6={_0x1ad629:0x224,_0x2b35b7:0x1f5},_0x5011a7=_0x408f7a,_0x36ceac=mars3d__namespace[_0x5011a7(_0x4a53c6._0x1ad629)]['lonlat2mercator']([_0x131962['xmin'],_0x131962['ymin']]),_0x5fb019=mars3d__namespace['PointTrans'][_0x5011a7(0x216)]([_0x131962['xmax'],_0x131962[_0x5011a7(_0x4a53c6._0x2b35b7)]]);return{'xmin':_0x36ceac[0x0],'ymin':_0x36ceac[0x1],'xmax':_0x5fb019[0x0],'ymax':_0x5fb019[0x1]};}function geLatLngBounds(_0x2e54a7){const _0x16d362={_0x392ede:0x1fd,_0x289cb9:0x21b},_0x14de05=_0x408f7a,_0x3a63ca=mars3d__namespace['PointTrans'][_0x14de05(_0x16d362._0x392ede)]([_0x2e54a7[_0x14de05(_0x16d362._0x289cb9)],_0x2e54a7['ymin']]),_0x27641d=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x2e54a7['xmax'],_0x2e54a7['ymax']]);return{'xmin':_0x3a63ca[0x0],'ymin':_0x3a63ca[0x1],'xmax':_0x27641d[0x0],'ymax':_0x27641d[0x1]};}function getVertexShaderSource(_0x38546b){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'+_0x38546b+';\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['HeatLayer']=HeatLayer,Object[_0x408f7a(0x1f1)](exports,'__esModule',{'value':!![]});
}));
{
"name": "mars3d-heatmap",
"version": "3.6.15",
"version": "3.6.16",
"description": "Mars3D平台插件,结合heatmap可视化功能插件",

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

"devDependencies": {
"mars3d": "~3.6.15"
"mars3d": "~3.6.16"
},

@@ -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