mars3d-heatmap 3.5.12 → 3.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap
3
3
  *
4
- * 版本信息:v3.5.12
5
- * 编译日期:2023-06-19 18:25:59
4
+ * 版本信息:v3.5.13
5
+ * 编译日期:2023-06-26 22:15:58
6
6
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
7
7
  * 使用单位:免费公开版 ,2023-03-17
8
8
  */
@@ -11,5 +11,5 @@
11
11
  typeof define === 'function' && define.amd ? define(['exports', 'mars3d', '@mars3d/heatmap.js'], factory) :
12
12
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-heatmap"] = {}, global.mars3d, global.h337));
13
13
  })(this, (function (exports, mars3d, h337) {
14
- 'use strict';const _0x52b6c5=_0x102e;(function(_0x234ecd,_0x1ed489){const _0x1108fa={_0x1f9b92:0x10e,_0x20d067:0x104,_0x380ee6:0xd3,_0x742ba2:0x100,_0x43f670:0x10b},_0x2d7089=_0x102e,_0x5062c4=_0x234ecd();while(!![]){try{const _0x42fa90=parseInt(_0x2d7089(0xd0))/0x1+-parseInt(_0x2d7089(_0x1108fa._0x1f9b92))/0x2*(parseInt(_0x2d7089(_0x1108fa._0x20d067))/0x3)+parseInt(_0x2d7089(0xea))/0x4*(parseInt(_0x2d7089(_0x1108fa._0x380ee6))/0x5)+parseInt(_0x2d7089(0x110))/0x6+parseInt(_0x2d7089(_0x1108fa._0x742ba2))/0x7+parseInt(_0x2d7089(0x11a))/0x8+-parseInt(_0x2d7089(_0x1108fa._0x43f670))/0x9;if(_0x42fa90===_0x1ed489)break;else _0x5062c4['push'](_0x5062c4['shift']());}catch(_0x2cf3c5){_0x5062c4['push'](_0x5062c4['shift']());}}}(_0x800b,0xcff4b));function _interopNamespace(_0x571a50){const _0x1aee9b={_0x2ed7a7:0x103},_0x24407={_0x141189:0xe3},_0x5bbcfe=_0x102e;if(_0x571a50&&_0x571a50[_0x5bbcfe(_0x1aee9b._0x2ed7a7)])return _0x571a50;var _0x12ab75=Object[_0x5bbcfe(0xd5)](null);return _0x571a50&&Object['keys'](_0x571a50)[_0x5bbcfe(0x109)](function(_0x3456f8){const _0xdf6b6e=_0x5bbcfe;if(_0x3456f8!==_0xdf6b6e(_0x24407._0x141189)){var _0x42f2a5=Object[_0xdf6b6e(0xd6)](_0x571a50,_0x3456f8);Object[_0xdf6b6e(0x10d)](_0x12ab75,_0x3456f8,_0x42f2a5[_0xdf6b6e(0xf9)]?_0x42f2a5:{'enumerable':!![],'get':function(){return _0x571a50[_0x3456f8];}});}}),_0x12ab75['default']=_0x571a50,_0x12ab75;}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[_0x52b6c5(0xd5)])throw new Error('请引入\x20heatmap.js\x20库\x20');function _0x800b(){const _0x2d2f3d=['isFormat','default','remove','lonlat2mercator','xmax','radius','_container','Cartesian2','4908588HnyrEf','options','lng','parse','h337','granularity','green','setPositions','VERTEX_FORMAT','arcBlurScale','container','mercator2lonlat','_updatePositionsHook','_scale','removeLayer','get','_map','removeGraphic','image/png','heatStyle','abs','canvas','5791296rtxjVw','KEEP','_graphic','__esModule','609xTdbPy','mars3d-heatmap\x20mars3d-hideDiv','diffHeight','uniforms','EllipsoidSurfaceAppearance','forEach','push','39703113DxhUcK','setData','defineProperty','1186xbUHAz',';\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','2074662tjbfZG','_graphic2','RectanglePrimitive','_getArcHeatCanvas','PointTrans','layer','positions','getPointData','HeatLayer','graphic','11520232YRjaCP','StencilOperation','rgb(140,140,140)','fromDegrees','_createGraphic','floor','px;','clear','min','style','minCanvasSize','1543342vlFfzj','ymax','copyCanvas','5LZnVew','maxCanvasSize','create','getOwnPropertyDescriptor','formatRectangle','Util','_last_mBounds','_heat','DomUtil','_rectangle','ymin','_addedHook','rgba(','xmin','_layer'];_0x800b=function(){return _0x2d2f3d;};return _0x800b();}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:_0x52b6c5(0xf0),0.8:'yellow',0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance'][_0x52b6c5(0xf2)]};class HeatLayer extends BaseLayer{constructor(_0x147ed8={}){const _0x116cd0={_0x23cc80:0xeb,_0xa4dbd6:0xeb},_0xab780=_0x52b6c5;super(_0x147ed8),this['options']['maxCanvasSize']=this['options']['maxCanvasSize']??document['body']['clientWidth'],this[_0xab780(0xeb)]['maxCanvasSize']=Math['min'](this['options']['maxCanvasSize'],0x1388),this['options']['minCanvasSize']=this['options']['minCanvasSize']??document['body']['clientHeight'],this[_0xab780(0xeb)][_0xab780(0xcf)]=Math['max'](this[_0xab780(_0x116cd0._0x23cc80)]['minCanvasSize'],0x2bc),this['options']['heatStyle']={...DEF_HEATSTYLE,...this[_0xab780(_0x116cd0._0xa4dbd6)]['heatStyle']||{}},this['options']['style']={...DEF_STYLE,...this['options']['style']||{}};}get['layer'](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set[_0x52b6c5(0xfd)](_0x6ef19c){const _0x51ec43={_0x14fc49:0xd8},_0x245b7e=_0x52b6c5;this['options'][_0x245b7e(0xfd)]=mars3d__namespace[_0x245b7e(_0x51ec43._0x14fc49)]['merge'](this[_0x245b7e(0xeb)]['heatStyle'],_0x6ef19c),this['_heat']&&(this['_heat']['configure'](this['options']['heatStyle']),this['_updatePositionsHook'](!![]));}get['style'](){return this['options']['style'];}set[_0x52b6c5(0xce)](_0x399a1e){this['options']['style']=mars3d__namespace['Util']['merge'](this['options']['style'],_0x399a1e);}get['positions'](){return this['_positions'];}set['positions'](_0x4b4fe3){const _0x51a107=_0x52b6c5;this[_0x51a107(0xf1)](_0x4b4fe3);}get['coordinates'](){const _0x429167={_0x41731c:0x10a},_0x512243=[];return this['points']['forEach'](_0x111cb3=>{const _0x47517e=_0x102e;_0x512243[_0x47517e(_0x429167._0x41731c)](_0x111cb3['toArray']());}),_0x512243;}get['rectangle'](){return this['_rectangle'];}['_setOptionsHook'](_0x5946b2,_0x19469c){const _0x571b05={_0x3bafd9:0x116},_0xb1c07b=_0x52b6c5;_0x5946b2[_0xb1c07b(_0x571b05._0x3bafd9)]&&(this['positions']=_0x5946b2['positions']);}['_mountedHook'](){const _0x97ef8d={_0x3a74a8:0xce,_0x342599:0xe1,_0x1bdd89:0xe1},_0x2595ac=_0x52b6c5;this[_0x2595ac(_0x97ef8d._0x3a74a8)]['type']==='image'?this[_0x2595ac(_0x97ef8d._0x342599)]=new mars3d__namespace[(_0x2595ac(0x115))]['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this[_0x2595ac(_0x97ef8d._0x1bdd89)]=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}[_0x52b6c5(0xde)](){const _0x259003={_0x1e2fa4:0xe1,_0x183e0b:0xdb,_0x2b4dad:0x105,_0x24d1a8:0xfa,_0x11147b:0x116},_0x410388=_0x52b6c5;this['_map']['addLayer'](this[_0x410388(_0x259003._0x1e2fa4)]),this[_0x410388(0xe8)]=mars3d__namespace[_0x410388(_0x259003._0x183e0b)]['create']('div',_0x410388(_0x259003._0x2b4dad),this[_0x410388(_0x259003._0x24d1a8)][_0x410388(0xf4)]),this[_0x410388(0xeb)]['positions']&&(this[_0x410388(_0x259003._0x11147b)]=this['options']['positions']),this['options']['flyTo']&&this['flyToByAnimationEnd']();}['_removedHook'](){const _0x3582ad={_0x1040ac:0xdb,_0x1e2fd3:0xf8},_0x2e8068=_0x52b6c5;this['_container']&&(mars3d__namespace[_0x2e8068(_0x3582ad._0x1040ac)][_0x2e8068(0xe4)](this['_container']),delete this['_container']),this['clear'](),this['_map'][_0x2e8068(_0x3582ad._0x1e2fd3)](this['_layer']);}['addPosition'](_0x4860dc,_0x3ba749){const _0x1fa6f7={_0x39b790:0xf6},_0x2e2029=_0x52b6c5;this['_positions']=this['_positions']||[],this['_positions']['push'](_0x4860dc),this[_0x2e2029(_0x1fa6f7._0x39b790)](_0x3ba749);}['setPositions'](_0x2bda0c,_0x270bb2){this['_positions']=_0x2bda0c,this['_updatePositionsHook'](_0x270bb2);}['clear'](){const _0x2ca863={_0x53ba7d:0x102,_0x28c79b:0x111},_0x12548f=_0x52b6c5;this['_graphic']&&(this['_layer'][_0x12548f(0xfb)](this[_0x12548f(_0x2ca863._0x53ba7d)],!![]),delete this[_0x12548f(0x102)]),this['_graphic2']&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this[_0x12548f(_0x2ca863._0x28c79b)]);}['_updatePositionsHook'](_0x2436aa){const _0xec5584={_0x1048ef:0xfa,_0x1afa93:0x116,_0x59cff2:0xfc,_0x57321e:0xdc,_0xf700d6:0x107,_0x5ee511:0x111,_0x38f818:0x102,_0x4b09a4:0x102},_0x41ffa7=_0x52b6c5;if(!this['show']||!this[_0x41ffa7(_0xec5584._0x1048ef)]||!this[_0x41ffa7(_0xec5584._0x1afa93)]||this['positions']['length']===0x0)return this;const _0x5d5331=this['_getHeatCanvas']();if(this['style']['type']==='image')this['_layer']['setOptions']({'url':_0x5d5331['toDataURL'](_0x41ffa7(_0xec5584._0x59cff2)),'rectangle':this[_0x41ffa7(_0xec5584._0x57321e)],'opacity':this[_0x41ffa7(0xce)]['opacity']});else this['style']['arc']?this[_0x41ffa7(0x102)]&&_0x2436aa?(this['_graphic'][_0x41ffa7(_0xec5584._0xf700d6)]['image']=_0x5d5331,this['_graphic']['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x5d5331,this[_0x41ffa7(_0xec5584._0x5ee511)]['uniforms']['bumpMap']=this['_graphic']['uniforms']['bumpMap'])):this['_createArcGraphic'](_0x5d5331):this[_0x41ffa7(_0xec5584._0x38f818)]&&_0x2436aa?this[_0x41ffa7(_0xec5584._0x4b09a4)]['uniforms']['image']=_0x5d5331:this['_createGraphic'](_0x5d5331);return this;}[_0x52b6c5(0x11e)](_0x40ac9d){const _0x411e24={_0x14b6e6:0x119,_0x488cd0:0xe1},_0x34302f=_0x52b6c5;this['clear'](),this['_graphic']=new mars3d__namespace[(_0x34302f(_0x411e24._0x14b6e6))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x40ac9d},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x34302f(_0x411e24._0x488cd0)]['addGraphic'](this[_0x34302f(0x102)]);}['_createArcGraphic'](_0xd50db2){const _0x1284b4={_0x33566b:0x121,_0x4adc7a:0x101,_0x27eef6:0x101,_0x3c334b:0xef,_0x10e4c8:0xdc,_0x8e9d14:0x108},_0x38b5c9=_0x52b6c5;this[_0x38b5c9(_0x1284b4._0x33566b)]();const _0x58544f=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium[_0x38b5c9(0x11b)][_0x38b5c9(0x101)],'zFail':Cesium['StencilOperation'][_0x38b5c9(_0x1284b4._0x4adc7a)],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation'][_0x38b5c9(_0x1284b4._0x27eef6)],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x162bc9=Math[_0x38b5c9(0x11f)](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style'][_0x38b5c9(0x106)]&&delete this['style']['diffHeight'];const _0x5794ae=(this['style']['splitNum'],0x64);let _0x13b18f=Math['max'](this[_0x38b5c9(0xdc)]['height'],this['_rectangle']['width']);this['style'][_0x38b5c9(_0x1284b4._0x3c334b)]=_0x13b18f/=_0x5794ae;const _0x211ef4=new Cesium['Material']({'fabric':{'uniforms':{'image':_0xd50db2,'repeat':new Cesium[(_0x38b5c9(0xe9))](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this[_0x38b5c9(0x113)]()},'source':HeatMaterial},'translucent':!![]}),_0x24edb3=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace['graphic'][(_0x38b5c9(0x112))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x58544f,'material':_0x211ef4,'vertexShaderSource':getVertexShaderSource(_0x162bc9*_0x24edb3)})}),this[_0x38b5c9(0xe1)]['addGraphic'](this['_graphic']),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x38b5c9(_0x1284b4._0x10e4c8)],'appearance':new Cesium[(_0x38b5c9(_0x1284b4._0x8e9d14))]({'flat':!![],'aboveGround':!![],'renderState':_0x58544f,'material':_0x211ef4,'vertexShaderSource':getVertexShaderSource(-_0x162bc9)})}),this['_layer']['addGraphic'](this[_0x38b5c9(0x111)]));}['getRectangle'](_0x1ecdc7){const _0x453ce9={_0xec7e35:0xd7},_0x3e0b01=_0x52b6c5;return _0x1ecdc7!==null&&_0x1ecdc7!==void 0x0&&_0x1ecdc7[_0x3e0b01(0xe2)]&&this[_0x3e0b01(0xdc)]?mars3d__namespace['PolyUtil'][_0x3e0b01(_0x453ce9._0xec7e35)](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x395fb5={_0xc1bca5:0xfe,_0x4a9573:0xd1,_0x30d4fe:0xeb,_0x36edba:0xe6,_0x334195:0x120,_0x4115ba:0xfd,_0x572081:0xe8,_0x1efff8:0xda,_0x3bf95b:0xff},_0x14c7a4={_0x4f57d9:0xcd},_0x691d93={_0x543ce3:0xcd},_0xe4bb8a=_0x52b6c5,_0x38ebc2=this['_positions'],_0x4d9603=[];let _0x349405,_0x333b9d,_0x5e0fd2,_0x35ed54;_0x38ebc2[_0xe4bb8a(0x109)](_0x26dd90=>{const _0x2785ab=_0xe4bb8a,_0xe478e6=mars3d__namespace['LngLatPoint'][_0x2785ab(0xed)](_0x26dd90);if(!_0xe478e6)return;_0xe478e6['value']=_0x26dd90['value']||0x1,!this['options']['rectangle']&&(_0x349405===undefined?(_0x349405=_0xe478e6['lng'],_0x333b9d=_0xe478e6[_0x2785ab(0xec)],_0x5e0fd2=_0xe478e6['lat'],_0x35ed54=_0xe478e6['lat']):(_0x349405=Math['min'](_0x349405,_0xe478e6[_0x2785ab(0xec)]),_0x333b9d=Math['max'](_0x333b9d,_0xe478e6['lng']),_0x5e0fd2=Math[_0x2785ab(_0x691d93._0x543ce3)](_0x5e0fd2,_0xe478e6['lat']),_0x35ed54=Math['max'](_0x35ed54,_0xe478e6['lat']))),_0x4d9603[_0x2785ab(0x10a)](_0xe478e6);});_0x349405===_0x333b9d&&(_0x349405-=0.000001,_0x333b9d+=0.000001);_0x5e0fd2===_0x35ed54&&(_0x5e0fd2-=0.000001,_0x35ed54+=0.000001);let _0xe4dda8=this['options']['rectangle']||{'xmin':_0x349405,'xmax':_0x333b9d,'ymin':_0x5e0fd2,'ymax':_0x35ed54};const _0x5ac463=getMercatorBounds(_0xe4dda8),_0x2589bd=Math[_0xe4bb8a(_0x395fb5._0xc1bca5)](_0x5ac463['xmax']-_0x5ac463['xmin']),_0x3dd38d=Math[_0xe4bb8a(0xfe)](_0x5ac463[_0xe4bb8a(_0x395fb5._0x4a9573)]-_0x5ac463['ymin']),_0x139337=Math['max'](_0x2589bd,_0x3dd38d),_0x56533b=Math['min'](_0x2589bd,_0x3dd38d);this['_mBoundsMax']=_0x139337;let _0x59ddf8=0x1;if(_0x139337>this['options']['maxCanvasSize'])_0x59ddf8=_0x139337/this['options']['maxCanvasSize'],_0x56533b/_0x59ddf8<this[_0xe4bb8a(0xeb)]['minCanvasSize']&&(_0x59ddf8=_0x56533b/this[_0xe4bb8a(0xeb)]['minCanvasSize']);else _0x56533b<this['options']['minCanvasSize']&&(_0x59ddf8=_0x56533b/this['options']['minCanvasSize'],_0x139337/_0x59ddf8>this[_0xe4bb8a(_0x395fb5._0x30d4fe)]['maxCanvasSize']&&(_0x59ddf8=_0x139337/this['options'][_0xe4bb8a(0xd4)]));const _0x514178=this['heatStyle'][_0xe4bb8a(0xe7)]*1.5,_0x421f8e=_0x2589bd/_0x59ddf8+_0x514178*0x2,_0x4a0e32=_0x3dd38d/_0x59ddf8+_0x514178*0x2,_0x37fe91=_0x514178*_0x59ddf8;_0x5ac463['xmin']-=_0x37fe91,_0x5ac463['ymin']-=_0x37fe91,_0x5ac463['xmax']+=_0x37fe91,_0x5ac463['ymax']+=_0x37fe91,this['_scale']=_0x59ddf8,_0xe4dda8=geLatLngBounds(_0x5ac463),this['_rectangle']=Cesium['Rectangle'][_0xe4bb8a(0x11d)](_0xe4dda8['xmin'],_0xe4dda8['ymin'],_0xe4dda8[_0xe4bb8a(_0x395fb5._0x36edba)],_0xe4dda8['ymax']);let _0x28331c=_0x4d9603[0x0]['value']??0x1,_0x374d51=_0x4d9603[0x0]['value']??0x0;const _0x20bfff=[];_0x4d9603['forEach'](_0x24d152=>{const _0x2f3719=_0xe4bb8a,_0xfc4fa2=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x24d152['lng'],_0x24d152['lat']]),_0x459b01=_0x24d152['value']||0x1,_0x26c41f=Math['round']((_0xfc4fa2[0x0]-_0x5ac463[_0x2f3719(0xe0)])/_0x59ddf8),_0x50312c=Math['round']((_0x5ac463['ymax']-_0xfc4fa2[0x1])/_0x59ddf8);_0x28331c=Math['max'](_0x28331c,_0x459b01),_0x374d51=Math[_0x2f3719(_0x14c7a4._0x4f57d9)](_0x374d51,_0x459b01),_0x20bfff[_0x2f3719(0x10a)]({'x':_0x26c41f,'y':_0x50312c,'value':_0x459b01});});const _0x30f6d0={'min':this['options']['min']??_0x374d51,'max':this['options']['max']??_0x28331c,'data':_0x20bfff};this['_last_heatData']=_0x30f6d0;if(!this['_last_mBounds']||_0x5ac463['xmin']!==this[_0xe4bb8a(0xd9)]['xmin']||_0x5ac463[_0xe4bb8a(0xdd)]!==this['_last_mBounds']['ymin']||_0x5ac463[_0xe4bb8a(0xe6)]!==this[_0xe4bb8a(0xd9)]['xmax']||_0x5ac463[_0xe4bb8a(0xd1)]!==this['_last_mBounds']['ymax']){this[_0xe4bb8a(0xd9)]=_0x5ac463,this['_container']['style']['cssText']='width:'+_0x421f8e+'px;height:'+_0x4a0e32+_0xe4bb8a(_0x395fb5._0x334195);const _0x55db97={...this[_0xe4bb8a(_0x395fb5._0x4115ba)],'container':this[_0xe4bb8a(_0x395fb5._0x572081)]};!this[_0xe4bb8a(0xda)]?this[_0xe4bb8a(0xda)]=h337__namespace[_0xe4bb8a(0xd5)](_0x55db97):this['_heat']['configure'](_0x55db97);}this[_0xe4bb8a(0xda)][_0xe4bb8a(0x10c)](_0x30f6d0);const _0x4f69b6=mars3d__namespace['DomUtil'][_0xe4bb8a(0xd2)](this[_0xe4bb8a(_0x395fb5._0x1efff8)]['_renderer'][_0xe4bb8a(_0x395fb5._0x3bf95b)]);return _0x4f69b6;}['_getArcHeatCanvas'](){const _0xe92ce7={_0x4f351d:0xfd,_0x36a1c9:0xda},_0xc9f01c=_0x52b6c5;this['_heat']['configure']({'radius':this['heatStyle'][_0xc9f01c(0xe7)]*this['style']['arcRadiusScale'],'blur':this['heatStyle']['blur']*this['style'][_0xc9f01c(0xf3)],'gradient':this[_0xc9f01c(_0xe92ce7._0x4f351d)]['gradientArc']||{0.25:'rgb(0,0,0)',0.55:_0xc9f01c(0x11c),0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x48109c=mars3d__namespace[_0xc9f01c(0xdb)]['copyCanvas'](this[_0xc9f01c(_0xe92ce7._0x36a1c9)]['_renderer']['canvas']);return this['_heat']['configure'](this['options']['heatStyle']),_0x48109c;}[_0x52b6c5(0x117)](_0x15e71e){const _0x45d82f={_0x4266b6:0xe5,_0x6ff2c0:0xec,_0x14d2d3:0xf7,_0x250336:0xd1,_0x2d7a0f:0xdf},_0x4ce400=_0x52b6c5,_0x412a1f=mars3d__namespace['LngLatPoint']['parse'](_0x15e71e);if(!_0x412a1f)return{};const _0x103b6c=mars3d__namespace['PointTrans'][_0x4ce400(_0x45d82f._0x4266b6)]([_0x412a1f[_0x4ce400(_0x45d82f._0x6ff2c0)],_0x412a1f['lat']]),_0x3c3641=this[_0x4ce400(0xd9)],_0x45f558=Math['round']((_0x103b6c[0x0]-_0x3c3641['xmin'])/this[_0x4ce400(_0x45d82f._0x14d2d3)]),_0x264b46=Math['round']((_0x3c3641[_0x4ce400(_0x45d82f._0x250336)]-_0x103b6c[0x1])/this['_scale']),_0x2493d9=this['_heat']['getValueAt']({'x':_0x45f558,'y':_0x264b46}),_0x529463=this[_0x4ce400(0xda)]['_renderer']['ctx']['getImageData'](_0x45f558-0x1,_0x264b46-0x1,0x1,0x1)['data'];return{'x':_0x45f558,'y':_0x264b46,'value':_0x2493d9,'color':_0x4ce400(_0x45d82f._0x2d7a0f)+_0x529463[0x0]+','+_0x529463[0x1]+','+_0x529463[0x2]+','+_0x529463[0x3]+')'};}}mars3d__namespace['LayerUtil']['register']('heat',HeatLayer),mars3d__namespace[_0x52b6c5(0x115)]['HeatLayer']=HeatLayer,mars3d__namespace[_0x52b6c5(0xee)]=h337__namespace;function getMercatorBounds(_0x56346b){const _0xcf108d={_0x53d059:0x114},_0x335d6a=_0x52b6c5,_0x30502f=mars3d__namespace[_0x335d6a(_0xcf108d._0x53d059)]['lonlat2mercator']([_0x56346b['xmin'],_0x56346b['ymin']]),_0x31e42f=mars3d__namespace[_0x335d6a(0x114)][_0x335d6a(0xe5)]([_0x56346b[_0x335d6a(0xe6)],_0x56346b['ymax']]);return{'xmin':_0x30502f[0x0],'ymin':_0x30502f[0x1],'xmax':_0x31e42f[0x0],'ymax':_0x31e42f[0x1]};}function _0x102e(_0x410b4f,_0x720d09){const _0x800b68=_0x800b();return _0x102e=function(_0x102e2d,_0x2e7371){_0x102e2d=_0x102e2d-0xcd;let _0x3b0c92=_0x800b68[_0x102e2d];return _0x3b0c92;},_0x102e(_0x410b4f,_0x720d09);}function geLatLngBounds(_0x441331){const _0x19226f={_0x2d7123:0xe0,_0x35486f:0xe6},_0xb1680b=_0x52b6c5,_0x1ecf7f=mars3d__namespace[_0xb1680b(0x114)]['mercator2lonlat']([_0x441331[_0xb1680b(_0x19226f._0x2d7123)],_0x441331['ymin']]),_0x2ce7dd=mars3d__namespace['PointTrans'][_0xb1680b(0xf5)]([_0x441331[_0xb1680b(_0x19226f._0x35486f)],_0x441331['ymax']]);return{'xmin':_0x1ecf7f[0x0],'ymin':_0x1ecf7f[0x1],'xmax':_0x2ce7dd[0x0],'ymax':_0x2ce7dd[0x1]};}function getVertexShaderSource(_0x4d694){const _0x58908b={_0x508602:0x10f},_0xf666a4=_0x52b6c5;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'+_0x4d694+_0xf666a4(_0x58908b._0x508602);}exports[_0x52b6c5(0x118)]=HeatLayer,Object['defineProperty'](exports,'__esModule',{'value':!![]});
14
+ 'use strict';const _0x3fb9db=_0x591d;(function(_0x2c67f6,_0x53d7e0){const _0x32dc05={_0x2cb909:0x19e,_0x273cc0:0x185,_0x1a4357:0x19d,_0xfd04c5:0x19c,_0x42c5bb:0x167,_0x1a5356:0x156,_0xde1f14:0x17f},_0x4d16dc=_0x591d,_0x2165a3=_0x2c67f6();while(!![]){try{const _0x14d754=-parseInt(_0x4d16dc(0x19b))/0x1*(-parseInt(_0x4d16dc(_0x32dc05._0x2cb909))/0x2)+parseInt(_0x4d16dc(_0x32dc05._0x273cc0))/0x3+-parseInt(_0x4d16dc(_0x32dc05._0x1a4357))/0x4*(-parseInt(_0x4d16dc(_0x32dc05._0xfd04c5))/0x5)+parseInt(_0x4d16dc(_0x32dc05._0x42c5bb))/0x6+parseInt(_0x4d16dc(_0x32dc05._0x1a5356))/0x7*(parseInt(_0x4d16dc(0x155))/0x8)+-parseInt(_0x4d16dc(0x19a))/0x9+parseInt(_0x4d16dc(_0x32dc05._0xde1f14))/0xa*(-parseInt(_0x4d16dc(0x194))/0xb);if(_0x14d754===_0x53d7e0)break;else _0x2165a3['push'](_0x2165a3['shift']());}catch(_0x499fdb){_0x2165a3['push'](_0x2165a3['shift']());}}}(_0x5a0b,0x7ec30));function _interopNamespace(_0x1cdc73){const _0x30b711={_0x4d0856:0x17b},_0x110ef7={_0x4c2690:0x17d,_0x3bfc33:0x158},_0x459c6a=_0x591d;if(_0x1cdc73&&_0x1cdc73['__esModule'])return _0x1cdc73;var _0x5ccf13=Object['create'](null);return _0x1cdc73&&Object[_0x459c6a(_0x30b711._0x4d0856)](_0x1cdc73)['forEach'](function(_0x522138){const _0x5557e7=_0x459c6a;if(_0x522138!=='default'){var _0x1ab342=Object[_0x5557e7(_0x110ef7._0x4c2690)](_0x1cdc73,_0x522138);Object[_0x5557e7(_0x110ef7._0x3bfc33)](_0x5ccf13,_0x522138,_0x1ab342['get']?_0x1ab342:{'enumerable':!![],'get':function(){return _0x1cdc73[_0x522138];}});}}),_0x5ccf13['default']=_0x1cdc73,_0x5ccf13;}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(_0x3fb9db(0x196));const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x3fb9db(0x190)]['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:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium[_0x3fb9db(0x160)]['VERTEX_FORMAT']};function _0x591d(_0x1bbc64,_0x39bbb3){const _0x5a0b93=_0x5a0b();return _0x591d=function(_0x591df0,_0x105464){_0x591df0=_0x591df0-0x155;let _0x3560bd=_0x5a0b93[_0x591df0];return _0x3560bd;},_0x591d(_0x1bbc64,_0x39bbb3);}class HeatLayer extends BaseLayer{constructor(_0x14e969={}){const _0xa52934={_0x5cecce:0x168,_0x1bb2ff:0x176,_0x2820c2:0x15a,_0x5041cb:0x15c,_0x5c9230:0x15a,_0x2d20af:0x163},_0x3fa99d=_0x3fb9db;super(_0x14e969),this[_0x3fa99d(0x15a)][_0x3fa99d(_0xa52934._0x5cecce)]=this['options']['maxCanvasSize']??document[_0x3fa99d(_0xa52934._0x1bb2ff)]['clientWidth'],this['options']['maxCanvasSize']=Math['min'](this['options']['maxCanvasSize'],0x1388),this[_0x3fa99d(_0xa52934._0x2820c2)][_0x3fa99d(_0xa52934._0x5041cb)]=this['options']['minCanvasSize']??document['body'][_0x3fa99d(0x18b)],this['options']['minCanvasSize']=Math[_0x3fa99d(0x18c)](this['options']['minCanvasSize'],0x2bc),this[_0x3fa99d(_0xa52934._0x5c9230)][_0x3fa99d(_0xa52934._0x2d20af)]={...DEF_HEATSTYLE,...this[_0x3fa99d(0x15a)]['heatStyle']||{}},this['options']['style']={...DEF_STYLE,...this['options'][_0x3fa99d(0x187)]||{}};}get['layer'](){const _0x10873b=_0x3fb9db;return this[_0x10873b(0x192)];}get['heatStyle'](){return this['options']['heatStyle'];}set[_0x3fb9db(0x163)](_0x23c1dd){const _0x1fb9ee={_0x10e135:0x1a3,_0x184ea7:0x163,_0x38ecb2:0x15a},_0x14ef25=_0x3fb9db;this['options'][_0x14ef25(0x163)]=mars3d__namespace['Util'][_0x14ef25(_0x1fb9ee._0x10e135)](this['options'][_0x14ef25(_0x1fb9ee._0x184ea7)],_0x23c1dd),this[_0x14ef25(0x18e)]&&(this['_heat']['configure'](this[_0x14ef25(_0x1fb9ee._0x38ecb2)]['heatStyle']),this['_updatePositionsHook'](!![]));}get['style'](){const _0x48979c=_0x3fb9db;return this['options'][_0x48979c(0x187)];}set[_0x3fb9db(0x187)](_0x43f8f6){const _0x38b0d3={_0x3ed89f:0x15a,_0x5de968:0x187},_0x1d8b78=_0x3fb9db;this['options']['style']=mars3d__namespace['Util']['merge'](this[_0x1d8b78(_0x38b0d3._0x3ed89f)][_0x1d8b78(_0x38b0d3._0x5de968)],_0x43f8f6);}get['positions'](){return this['_positions'];}set[_0x3fb9db(0x1ae)](_0x2d907a){this['setPositions'](_0x2d907a);}get[_0x3fb9db(0x16e)](){const _0x303de1=_0x3fb9db,_0x3b405e=[];return this[_0x303de1(0x172)]['forEach'](_0x115f5d=>{_0x3b405e['push'](_0x115f5d['toArray']());}),_0x3b405e;}get['rectangle'](){return this['_rectangle'];}['_setOptionsHook'](_0x293bc7,_0x3dd8bd){_0x293bc7['positions']&&(this['positions']=_0x293bc7['positions']);}['_mountedHook'](){const _0x372e54={_0x10f228:0x159},_0x175914=_0x3fb9db;this['style'][_0x175914(_0x372e54._0x10f228)]===_0x175914(0x164)?this['_layer']=new mars3d__namespace['layer']['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this['_layer']=new mars3d__namespace[(_0x175914(0x190))]['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0x460540={_0x8946c9:0x17c,_0x5ed264:0x157,_0x259608:0x184,_0x509631:0x1ae,_0x589266:0x15a},_0x5d79bf=_0x3fb9db;this[_0x5d79bf(0x166)][_0x5d79bf(_0x460540._0x8946c9)](this['_layer']),this[_0x5d79bf(0x169)]=mars3d__namespace['DomUtil']['create'](_0x5d79bf(_0x460540._0x5ed264),'mars3d-heatmap\x20mars3d-hideDiv',this['_map'][_0x5d79bf(_0x460540._0x259608)]),this[_0x5d79bf(0x15a)][_0x5d79bf(_0x460540._0x509631)]&&(this['positions']=this[_0x5d79bf(_0x460540._0x589266)][_0x5d79bf(_0x460540._0x509631)]),this['options']['flyTo']&&this[_0x5d79bf(0x1aa)]();}[_0x3fb9db(0x193)](){const _0xde84a3=_0x3fb9db;this[_0xde84a3(0x169)]&&(mars3d__namespace[_0xde84a3(0x191)]['remove'](this['_container']),delete this['_container']),this['clear'](),this['_map']['removeLayer'](this['_layer']);}['addPosition'](_0x532ba7,_0x15e6b6){const _0x16bd6f=_0x3fb9db;this['_positions']=this['_positions']||[],this['_positions']['push'](_0x532ba7),this[_0x16bd6f(0x17e)](_0x15e6b6);}[_0x3fb9db(0x171)](_0x45599d,_0x9f4f91){const _0x3a7f1f={_0x4dc5e6:0x179},_0x478289=_0x3fb9db;this[_0x478289(_0x3a7f1f._0x4dc5e6)]=_0x45599d,this['_updatePositionsHook'](_0x9f4f91);}['clear'](){const _0x8fc9a5={_0x2649e3:0x16d},_0xa77134=_0x3fb9db;this[_0xa77134(_0x8fc9a5._0x2649e3)]&&(this['_layer']['removeGraphic'](this['_graphic'],!![]),delete this['_graphic']),this['_graphic2']&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this['_graphic2']);}[_0x3fb9db(0x17e)](_0x3c0097){const _0x4eb847={_0x2e9d7c:0x174,_0x1fab33:0x187,_0x3fa9ba:0x16d,_0x4acb79:0x16d,_0x49b215:0x173,_0x2210cd:0x198,_0x28b04a:0x19f},_0x5899bb=_0x3fb9db;if(!this['show']||!this['_map']||!this[_0x5899bb(0x1ae)]||this['positions']['length']===0x0)return this;const _0x1293c6=this['_getHeatCanvas']();if(this['style']['type']==='image')this['_layer'][_0x5899bb(_0x4eb847._0x2e9d7c)]({'url':_0x1293c6['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this[_0x5899bb(_0x4eb847._0x1fab33)]['opacity']});else this['style'][_0x5899bb(0x183)]?this['_graphic']&&_0x3c0097?(this[_0x5899bb(_0x4eb847._0x3fa9ba)]['uniforms']['image']=_0x1293c6,this[_0x5899bb(_0x4eb847._0x4acb79)][_0x5899bb(_0x4eb847._0x49b215)]['bumpMap']=this[_0x5899bb(0x1a0)](),this[_0x5899bb(_0x4eb847._0x2210cd)]&&(this['_graphic2'][_0x5899bb(0x173)]['image']=_0x1293c6,this['_graphic2']['uniforms'][_0x5899bb(_0x4eb847._0x28b04a)]=this['_graphic']['uniforms'][_0x5899bb(0x19f)])):this['_createArcGraphic'](_0x1293c6):this['_graphic']&&_0x3c0097?this['_graphic']['uniforms']['image']=_0x1293c6:this['_createGraphic'](_0x1293c6);return this;}[_0x3fb9db(0x180)](_0xfb4ebf){const _0x18c3f9={_0x2ca2d9:0x192},_0x57d5af=_0x3fb9db;this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x57d5af(0x1a2)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0xfb4ebf},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x57d5af(_0x18c3f9._0x2ca2d9)]['addGraphic'](this['_graphic']);}[_0x3fb9db(0x197)](_0x2f5396){const _0x1a0b02={_0x33ef83:0x1af,_0x2d37fa:0x17a,_0x385142:0x187,_0x1918a5:0x18f,_0x3c7f06:0x15a,_0x254780:0x160,_0x519f0a:0x192,_0x42b7a9:0x1a1,_0x579e18:0x1a2,_0x31770d:0x182},_0x99cf7a=_0x3fb9db;this['clear']();const _0x17f7cd=Cesium[_0x99cf7a(_0x1a0b02._0x33ef83)]['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction'][_0x99cf7a(_0x1a0b02._0x2d37fa)],'frontOperation':{'fail':Cesium['StencilOperation'][_0x99cf7a(0x186)],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation'][_0x99cf7a(0x1a8)]},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x4456b9=Math['floor'](this[_0x99cf7a(0x187)]['diffHeight']??this[_0x99cf7a(0x161)]*0.02)+0.1;this['style']['diffHeight']&&delete this['style']['diffHeight'];const _0x12c728=(this[_0x99cf7a(_0x1a0b02._0x385142)][_0x99cf7a(0x1a9)],0x64);let _0x4c9797=Math['max'](this['_rectangle']['height'],this[_0x99cf7a(0x1a2)]['width']);this['style']['granularity']=_0x4c9797/=_0x12c728;const _0x5e65e8=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x2f5396,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium[(_0x99cf7a(_0x1a0b02._0x1918a5))](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x2640cb=this[_0x99cf7a(0x187)][_0x99cf7a(0x1a1)]||0x1;this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0x99cf7a(_0x1a0b02._0x3c7f06)],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x99cf7a(_0x1a0b02._0x254780))]({'flat':!![],'aboveGround':!![],'renderState':_0x17f7cd,'material':_0x5e65e8,'vertexShaderSource':getVertexShaderSource(_0x4456b9*_0x2640cb)})}),this[_0x99cf7a(_0x1a0b02._0x519f0a)]['addGraphic'](this['_graphic']),this[_0x99cf7a(0x187)][_0x99cf7a(_0x1a0b02._0x42b7a9)]===0x0&&(this['_graphic2']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x99cf7a(_0x1a0b02._0x579e18)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x17f7cd,'material':_0x5e65e8,'vertexShaderSource':getVertexShaderSource(-_0x4456b9)})}),this['_layer'][_0x99cf7a(_0x1a0b02._0x31770d)](this['_graphic2']));}['getRectangle'](_0x4b725b){const _0x179708={_0x4f1da5:0x1a6},_0x4f20cb=_0x3fb9db;return _0x4b725b!==null&&_0x4b725b!==void 0x0&&_0x4b725b['isFormat']&&this['_rectangle']?mars3d__namespace[_0x4f20cb(0x15b)][_0x4f20cb(_0x179708._0x4f1da5)](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x4a08d1={_0x3ab48b:0x18d,_0x473709:0x161,_0x31683f:0x15a,_0x34bf3f:0x15a,_0x3eb435:0x168,_0xc09f5f:0x1a4,_0x4f49f4:0x15f,_0x4ebf20:0x1a5,_0x2cf026:0x177,_0x257934:0x187,_0x285a90:0x191,_0xb6f4de:0x16a},_0x23f09c={_0xd5f26d:0x175,_0x307421:0x18c},_0x49ec48={_0x369749:0x1a5,_0x4c98a8:0x195,_0x5cdd8b:0x18c},_0x59a5f1=_0x3fb9db,_0x29e8f5=this['_positions'],_0x33a451=[];let _0x165cf8,_0x373657,_0xac564e,_0x2f7205;_0x29e8f5['forEach'](_0x6de193=>{const _0x2b499e=_0x591d,_0x6c2b1c=mars3d__namespace['LngLatPoint']['parse'](_0x6de193);if(!_0x6c2b1c)return;_0x6c2b1c['value']=_0x6de193[_0x2b499e(_0x49ec48._0x369749)]||0x1,!this['options']['rectangle']&&(_0x165cf8===undefined?(_0x165cf8=_0x6c2b1c['lng'],_0x373657=_0x6c2b1c[_0x2b499e(0x170)],_0xac564e=_0x6c2b1c[_0x2b499e(_0x49ec48._0x4c98a8)],_0x2f7205=_0x6c2b1c['lat']):(_0x165cf8=Math['min'](_0x165cf8,_0x6c2b1c['lng']),_0x373657=Math[_0x2b499e(_0x49ec48._0x5cdd8b)](_0x373657,_0x6c2b1c['lng']),_0xac564e=Math['min'](_0xac564e,_0x6c2b1c['lat']),_0x2f7205=Math['max'](_0x2f7205,_0x6c2b1c['lat']))),_0x33a451[_0x2b499e(0x15e)](_0x6c2b1c);});_0x165cf8===_0x373657&&(_0x165cf8-=0.000001,_0x373657+=0.000001);_0xac564e===_0x2f7205&&(_0xac564e-=0.000001,_0x2f7205+=0.000001);let _0x52191b=this['options']['rectangle']||{'xmin':_0x165cf8,'xmax':_0x373657,'ymin':_0xac564e,'ymax':_0x2f7205};const _0x2be7c9=getMercatorBounds(_0x52191b),_0x158049=Math[_0x59a5f1(0x178)](_0x2be7c9['xmax']-_0x2be7c9['xmin']),_0x6b93ef=Math[_0x59a5f1(0x178)](_0x2be7c9['ymax']-_0x2be7c9[_0x59a5f1(_0x4a08d1._0x3ab48b)]),_0xe41daa=Math[_0x59a5f1(0x18c)](_0x158049,_0x6b93ef),_0x1da183=Math['min'](_0x158049,_0x6b93ef);this[_0x59a5f1(_0x4a08d1._0x473709)]=_0xe41daa;let _0x12785d=0x1;if(_0xe41daa>this['options']['maxCanvasSize'])_0x12785d=_0xe41daa/this['options']['maxCanvasSize'],_0x1da183/_0x12785d<this[_0x59a5f1(_0x4a08d1._0x31683f)]['minCanvasSize']&&(_0x12785d=_0x1da183/this['options']['minCanvasSize']);else _0x1da183<this['options'][_0x59a5f1(0x15c)]&&(_0x12785d=_0x1da183/this['options']['minCanvasSize'],_0xe41daa/_0x12785d>this[_0x59a5f1(_0x4a08d1._0x34bf3f)][_0x59a5f1(_0x4a08d1._0x3eb435)]&&(_0x12785d=_0xe41daa/this['options'][_0x59a5f1(0x168)]));const _0xad2daf=this['heatStyle']['radius']*1.5,_0x3a436f=_0x158049/_0x12785d+_0xad2daf*0x2,_0x4c6987=_0x6b93ef/_0x12785d+_0xad2daf*0x2,_0x3f4918=_0xad2daf*_0x12785d;_0x2be7c9[_0x59a5f1(_0x4a08d1._0xc09f5f)]-=_0x3f4918,_0x2be7c9['ymin']-=_0x3f4918,_0x2be7c9[_0x59a5f1(_0x4a08d1._0x4f49f4)]+=_0x3f4918,_0x2be7c9['ymax']+=_0x3f4918,this['_scale']=_0x12785d,_0x52191b=geLatLngBounds(_0x2be7c9),this['_rectangle']=Cesium['Rectangle']['fromDegrees'](_0x52191b['xmin'],_0x52191b['ymin'],_0x52191b[_0x59a5f1(0x15f)],_0x52191b['ymax']);let _0x42f34e=_0x33a451[0x0][_0x59a5f1(_0x4a08d1._0x4ebf20)]??0x1,_0x4dc9aa=_0x33a451[0x0]['value']??0x0;const _0x2fa972=[];_0x33a451[_0x59a5f1(_0x4a08d1._0x2cf026)](_0x412358=>{const _0x21c2cb=_0x59a5f1,_0x484528=mars3d__namespace['PointTrans'][_0x21c2cb(_0x23f09c._0xd5f26d)]([_0x412358['lng'],_0x412358['lat']]),_0x537a6d=_0x412358['value']||0x1,_0x43eda3=Math['round']((_0x484528[0x0]-_0x2be7c9['xmin'])/_0x12785d),_0x59060f=Math['round']((_0x2be7c9[_0x21c2cb(0x188)]-_0x484528[0x1])/_0x12785d);_0x42f34e=Math[_0x21c2cb(_0x23f09c._0x307421)](_0x42f34e,_0x537a6d),_0x4dc9aa=Math['min'](_0x4dc9aa,_0x537a6d),_0x2fa972['push']({'x':_0x43eda3,'y':_0x59060f,'value':_0x537a6d});});const _0x383687={'min':this['options']['min']??_0x4dc9aa,'max':this[_0x59a5f1(0x15a)]['max']??_0x42f34e,'data':_0x2fa972};this['_last_heatData']=_0x383687;if(!this['_last_mBounds']||_0x2be7c9['xmin']!==this['_last_mBounds']['xmin']||_0x2be7c9['ymin']!==this[_0x59a5f1(0x15d)]['ymin']||_0x2be7c9['xmax']!==this['_last_mBounds']['xmax']||_0x2be7c9['ymax']!==this['_last_mBounds']['ymax']){this['_last_mBounds']=_0x2be7c9,this['_container'][_0x59a5f1(_0x4a08d1._0x257934)]['cssText']='width:'+_0x3a436f+'px;height:'+_0x4c6987+'px;';const _0x347a2f={...this['heatStyle'],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace['create'](_0x347a2f):this['_heat']['configure'](_0x347a2f);}this['_heat']['setData'](_0x383687);const _0x46d6f9=mars3d__namespace[_0x59a5f1(_0x4a08d1._0x285a90)]['copyCanvas'](this['_heat']['_renderer'][_0x59a5f1(_0x4a08d1._0xb6f4de)]);return _0x46d6f9;}[_0x3fb9db(0x1a0)](){const _0x172e7={_0x1ac6a0:0x189,_0x2d64f9:0x16f,_0x18a984:0x1ac,_0x1f9dfb:0x191,_0x1e553d:0x16a,_0x52f244:0x18e},_0x1356ef=_0x3fb9db;this['_heat']['configure']({'radius':this['heatStyle'][_0x1356ef(_0x172e7._0x1ac6a0)]*this['style'][_0x1356ef(_0x172e7._0x2d64f9)],'blur':this['heatStyle']['blur']*this['style']['arcBlurScale'],'gradient':this['heatStyle'][_0x1356ef(0x199)]||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:_0x1356ef(_0x172e7._0x18a984)}});const _0x38eb73=mars3d__namespace[_0x1356ef(_0x172e7._0x1f9dfb)]['copyCanvas'](this['_heat']['_renderer'][_0x1356ef(_0x172e7._0x1e553d)]);return this[_0x1356ef(_0x172e7._0x52f244)]['configure'](this['options']['heatStyle']),_0x38eb73;}['getPointData'](_0x35ea8e){const _0x1f334d={_0x5166ed:0x1ab,_0x2a5e73:0x181,_0x86a03a:0x18a,_0x2604ac:0x165},_0x3df394=_0x3fb9db,_0x209906=mars3d__namespace['LngLatPoint'][_0x3df394(0x16c)](_0x35ea8e);if(!_0x209906)return{};const _0x46adfa=mars3d__namespace[_0x3df394(_0x1f334d._0x5166ed)]['lonlat2mercator']([_0x209906['lng'],_0x209906['lat']]),_0x18700d=this['_last_mBounds'],_0x544cac=Math['round']((_0x46adfa[0x0]-_0x18700d[_0x3df394(0x1a4)])/this['_scale']),_0x578f07=Math['round']((_0x18700d['ymax']-_0x46adfa[0x1])/this['_scale']),_0x39909c=this['_heat'][_0x3df394(_0x1f334d._0x2a5e73)]({'x':_0x544cac,'y':_0x578f07}),_0x2c0db9=this['_heat'][_0x3df394(_0x1f334d._0x86a03a)]['ctx'][_0x3df394(_0x1f334d._0x2604ac)](_0x544cac-0x1,_0x578f07-0x1,0x1,0x1)['data'];return{'x':_0x544cac,'y':_0x578f07,'value':_0x39909c,'color':_0x3df394(0x16b)+_0x2c0db9[0x0]+','+_0x2c0db9[0x1]+','+_0x2c0db9[0x2]+','+_0x2c0db9[0x3]+')'};}}mars3d__namespace[_0x3fb9db(0x1b0)]['register']('heat',HeatLayer),mars3d__namespace['layer'][_0x3fb9db(0x1a7)]=HeatLayer,mars3d__namespace['h337']=h337__namespace;function _0x5a0b(){const _0x22d9e7=['div','defineProperty','type','options','PolyUtil','minCanvasSize','_last_mBounds','push','xmax','EllipsoidSurfaceAppearance','_mBoundsMax',';\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','heatStyle','image','getImageData','_map','3590592uKqSIf','maxCanvasSize','_container','canvas','rgba(','parse','_graphic','coordinates','arcRadiusScale','lng','setPositions','points','uniforms','setOptions','lonlat2mercator','body','forEach','abs','_positions','ALWAYS','keys','addLayer','getOwnPropertyDescriptor','_updatePositionsHook','390eeGUEO','_createGraphic','getValueAt','addGraphic','arc','container','1647996PtwkBc','KEEP','style','ymax','radius','_renderer','clientHeight','max','ymin','_heat','Color','layer','DomUtil','_layer','_removedHook','367576YFRxno','lat','请引入\x20heatmap.js\x20库\x20','_createArcGraphic','_graphic2','gradientArc','7869105UTmOyf','1oXIZFU','25Xcmaug','820884ePBXzT','360398HNCZFL','bumpMap','_getArcHeatCanvas','arcDirection','_rectangle','merge','xmin','value','formatRectangle','HeatLayer','REPLACE','splitNum','flyToByAnimationEnd','PointTrans','rgb(255,255,255)','mercator2lonlat','positions','RenderState','LayerUtil','2741736KUoIZm','7RtTlYi'];_0x5a0b=function(){return _0x22d9e7;};return _0x5a0b();}function getMercatorBounds(_0x5bcad9){const _0xeed848=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5bcad9['xmin'],_0x5bcad9['ymin']]),_0x8d4724=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5bcad9['xmax'],_0x5bcad9['ymax']]);return{'xmin':_0xeed848[0x0],'ymin':_0xeed848[0x1],'xmax':_0x8d4724[0x0],'ymax':_0x8d4724[0x1]};}function geLatLngBounds(_0x2e3ca4){const _0x3bd312={_0x549025:0x1ab,_0x1ca5c0:0x1a4},_0x1e9149=_0x3fb9db,_0x38597e=mars3d__namespace[_0x1e9149(_0x3bd312._0x549025)]['mercator2lonlat']([_0x2e3ca4[_0x1e9149(_0x3bd312._0x1ca5c0)],_0x2e3ca4[_0x1e9149(0x18d)]]),_0x38540c=mars3d__namespace['PointTrans'][_0x1e9149(0x1ad)]([_0x2e3ca4['xmax'],_0x2e3ca4['ymax']]);return{'xmin':_0x38597e[0x0],'ymin':_0x38597e[0x1],'xmax':_0x38540c[0x0],'ymax':_0x38540c[0x1]};}function getVertexShaderSource(_0x64f5d2){const _0x381e00=_0x3fb9db;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'+_0x64f5d2+_0x381e00(0x162);}exports[_0x3fb9db(0x1a7)]=HeatLayer,Object[_0x3fb9db(0x158)](exports,'__esModule',{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-heatmap",
3
- "version": "3.5.12",
3
+ "version": "3.5.13",
4
4
  "description": "Mars3D平台插件,结合heatmap可视化功能插件",
5
5
  "main": "dist/mars3d-heatmap.js",
6
6
  "files": [
@@ -10,7 +10,7 @@
10
10
  "@mars3d/heatmap.js": "^2.0.6"
11
11
  },
12
12
  "devDependencies": {
13
- "mars3d": "~3.5.12"
13
+ "mars3d": "~3.5.13"
14
14
  },
15
15
  "scripts": {
16
16
  "lint": "eslint ./src/**/*.{js,ts} --fix"