mars3d-heatmap
Advanced tools
Comparing version 3.6.18 to 3.7.0
/** | ||
* Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap | ||
* | ||
* 版本信息:v3.6.18 | ||
* 编译日期:2023-12-31 22:36:48 | ||
* 版本信息:v3.7.0 | ||
* 编译日期:2024-01-15 15:59:39 | ||
* 版权所有:Copyright by 火星科技 http://mars3d.cn | ||
@@ -14,3 +14,3 @@ * 使用单位:免费公开版 ,2023-03-17 | ||
})(this, (function (exports, mars3d, h337) { | ||
'use strict';const _0x5d47d9=_0x48fe;(function(_0x2b07a2,_0x5e3458){const _0x2dcf25={_0x5c7282:0x18b,_0x25a678:0x197,_0x2eb820:0x170},_0x167259=_0x48fe,_0xc2b1c=_0x2b07a2();while(!![]){try{const _0x518b8e=parseInt(_0x167259(_0x2dcf25._0x5c7282))/0x1+parseInt(_0x167259(0x193))/0x2+parseInt(_0x167259(0x166))/0x3*(parseInt(_0x167259(0x1a7))/0x4)+parseInt(_0x167259(0x195))/0x5+parseInt(_0x167259(0x190))/0x6+parseInt(_0x167259(_0x2dcf25._0x25a678))/0x7+-parseInt(_0x167259(_0x2dcf25._0x2eb820))/0x8*(parseInt(_0x167259(0x19c))/0x9);if(_0x518b8e===_0x5e3458)break;else _0xc2b1c['push'](_0xc2b1c['shift']());}catch(_0x2870b0){_0xc2b1c['push'](_0xc2b1c['shift']());}}}(_0x95b3,0x7cf7c));function _interopNamespace(_0x2d5ebd){const _0xdd3bb1={_0x4ffea9:0x18d},_0x2ffd7c=_0x48fe;if(_0x2d5ebd&&_0x2d5ebd['__esModule'])return _0x2d5ebd;var _0x145600=Object[_0x2ffd7c(0x189)](null);return _0x2d5ebd&&Object['keys'](_0x2d5ebd)['forEach'](function(_0x1daec8){const _0x3bc580=_0x2ffd7c;if(_0x1daec8!=='default'){var _0x19ed3d=Object['getOwnPropertyDescriptor'](_0x2d5ebd,_0x1daec8);Object['defineProperty'](_0x145600,_0x1daec8,_0x19ed3d[_0x3bc580(_0xdd3bb1._0x4ffea9)]?_0x19ed3d:{'enumerable':!![],'get':function(){return _0x2d5ebd[_0x1daec8];}});}}),_0x145600['default']=_0x2d5ebd,_0x145600;}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 _0x95b3(){const _0x3d12e3=['flyToByAnimationEnd','h337','ymin','copyCanvas','gradientArc','rectangle','_graphic','StencilFunction','BlendingState','EllipsoidSurfaceAppearance','_graphic2','show','coordinates','_heat','create','options','1013747bwucHL','container','get','StencilOperation','lonlat2mercator','1662258oLZJWr','arcDirection','bumpMap','1982052wfgJvA','rgba(','530180RGXoVj','_getHeatCanvas','3795470WkqnIU','floor','configure','layer','PointTrans','387zLFjiT','canvas','forEach','_last_mBounds','_updatePositionsHook','isFormat','type','style','ymax','addGraphic','__esModule','106236QfrISa','_container','ALWAYS','merge','_removedHook','xmax','image','Rectangle','getPointData','arc','REPLACE','DomUtil','clientHeight','KEEP','_map','setOptions','_createGraphic','min','removeLayer','_setOptionsHook','positions','lng','RenderState','请引入\x20heatmap.js\x20库\x20','image/png','rgb(140,140,140)','xmin','clientWidth','78jIJIFl','PolyUtil','heatStyle','max','_scale','mars3d-heatmap\x20mars3d-hideDiv','maxCanvasSize','abs','_positions','_layer','578368fgTObp','setPositions','Util','radius','value','getRectangle','_getArcHeatCanvas','_rectangle','getImageData','uniforms','_renderer'];_0x95b3=function(){return _0x3d12e3;};return _0x95b3();}if(!h337__namespace['create'])throw new Error(_0x5d47d9(0x161));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:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium[_0x5d47d9(0x184)]['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x5cab86={}){const _0x1d0b9e={_0x54f775:0x18a,_0x3261cb:0x18a},_0x4a1e86=_0x5d47d9;super(_0x5cab86),this['options']['maxCanvasSize']=this['options']['maxCanvasSize']??document['body'][_0x4a1e86(0x165)],this['options'][_0x4a1e86(0x16c)]=Math['min'](this['options']['maxCanvasSize'],0x1388),this[_0x4a1e86(_0x1d0b9e._0x54f775)]['minCanvasSize']=this[_0x4a1e86(_0x1d0b9e._0x54f775)]['minCanvasSize']??document['body'][_0x4a1e86(0x1b3)],this[_0x4a1e86(0x18a)]['minCanvasSize']=Math['max'](this[_0x4a1e86(0x18a)]['minCanvasSize'],0x2bc),this[_0x4a1e86(_0x1d0b9e._0x3261cb)]['heatStyle']={...DEF_HEATSTYLE,...this['options']['heatStyle']},this['options']['style']={...DEF_STYLE,...this[_0x4a1e86(0x18a)]['style']};}get['layer'](){return this['_layer'];}get['heatStyle'](){const _0xb7a482=_0x5d47d9;return this[_0xb7a482(0x18a)]['heatStyle'];}set[_0x5d47d9(0x168)](_0x1bcd85){const _0x3c2298={_0x477062:0x1aa,_0x47dc2e:0x188,_0x15a2ad:0x199,_0x2f4227:0x18a,_0x55ffdf:0x1a0},_0x1aa099=_0x5d47d9;this['options']['heatStyle']=mars3d__namespace['Util'][_0x1aa099(_0x3c2298._0x477062)](this['options']['heatStyle'],_0x1bcd85),this[_0x1aa099(_0x3c2298._0x47dc2e)]&&(this['_heat'][_0x1aa099(_0x3c2298._0x15a2ad)](this[_0x1aa099(_0x3c2298._0x2f4227)]['heatStyle']),this[_0x1aa099(_0x3c2298._0x55ffdf)](!![]));}get['style'](){return this['options']['style'];}set['style'](_0x2b27b7){const _0x2159b3={_0x177854:0x18a},_0x526665=_0x5d47d9;this[_0x526665(_0x2159b3._0x177854)][_0x526665(0x1a3)]=mars3d__namespace[_0x526665(0x172)]['merge'](this['options']['style'],_0x2b27b7);}get['positions'](){return this['_positions'];}set['positions'](_0x58a33f){this['setPositions'](_0x58a33f);}get[_0x5d47d9(0x187)](){const _0x50b145=_0x5d47d9,_0x4019df=[];return this['points'][_0x50b145(0x19e)](_0x1a4c82=>{_0x4019df['push'](_0x1a4c82['toArray']());}),_0x4019df;}get['rectangle'](){return this['_rectangle'];}[_0x5d47d9(0x15d)](_0x250559,_0x5114da){const _0x482bb6={_0x47d943:0x15e},_0x299174=_0x5d47d9;_0x250559['positions']&&(this['positions']=_0x250559[_0x299174(_0x482bb6._0x47d943)]);}['_mountedHook'](){const _0x155e0a={_0x106d60:0x1a2},_0x4b4ff3=_0x5d47d9;this['style'][_0x4b4ff3(_0x155e0a._0x106d60)]==='image'?this[_0x4b4ff3(0x16f)]=new mars3d__namespace['layer']['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this['_layer']=new mars3d__namespace[(_0x4b4ff3(0x19a))]['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0x2a4c72={_0x73deb7:0x1a8,_0xe6230a:0x16b,_0x234c35:0x18a,_0x3ead14:0x18a,_0x555f95:0x17b},_0x19daff=_0x5d47d9;this['_map']['addLayer'](this[_0x19daff(0x16f)]),this[_0x19daff(_0x2a4c72._0x73deb7)]=mars3d__namespace['DomUtil']['create']('div',_0x19daff(_0x2a4c72._0xe6230a),this['_map'][_0x19daff(0x18c)]),this['options']['positions']&&(this['positions']=this[_0x19daff(_0x2a4c72._0x234c35)]['positions']),this[_0x19daff(_0x2a4c72._0x3ead14)]['flyTo']&&this[_0x19daff(_0x2a4c72._0x555f95)]();}[_0x5d47d9(0x1ab)](){const _0x5d1d95={_0x3f8bbc:0x1a8,_0x185f7b:0x1b2,_0x3c48d5:0x15c},_0x2822ff=_0x5d47d9;this[_0x2822ff(_0x5d1d95._0x3f8bbc)]&&(mars3d__namespace[_0x2822ff(_0x5d1d95._0x185f7b)]['remove'](this['_container']),delete this['_container']),this['clear'](),this['_map'][_0x2822ff(_0x5d1d95._0x3c48d5)](this['_layer']);}['addPosition'](_0xe119de,_0x22951e){const _0xf3c76e=_0x5d47d9;this['_positions']=this['_positions']||[],this['_positions']['push'](_0xe119de),this[_0xf3c76e(0x1a0)](_0x22951e);}[_0x5d47d9(0x171)](_0x4cad01,_0x39d6c0){const _0x4d782f=_0x5d47d9;this[_0x4d782f(0x16e)]=_0x4cad01,this['_updatePositionsHook'](_0x39d6c0);}['clear'](){const _0x1ce9ee={_0x48db1a:0x185},_0x5586b6=_0x5d47d9;this['_graphic']&&(this['_layer']['removeGraphic'](this['_graphic'],!![]),delete this['_graphic']),this[_0x5586b6(_0x1ce9ee._0x48db1a)]&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this[_0x5586b6(0x185)]);}['_updatePositionsHook'](_0x1e06ce){const _0x55388e={_0x384485:0x158,_0x3438ba:0x1b0,_0x2eb3d2:0x1ad,_0xe924d4:0x179,_0x3a3b70:0x185,_0x2da68f:0x192,_0x2d04ad:0x181,_0x2c7a0f:0x1ad},_0x368733=_0x5d47d9;if(!this[_0x368733(0x186)]||!this[_0x368733(_0x55388e._0x384485)]||!this['positions']||this['positions']['length']===0x0)return this;const _0x358d8a=this['_getHeatCanvas']();if(this['style']['type']==='image')this['_layer'][_0x368733(0x159)]({'url':_0x358d8a['toDataURL'](_0x368733(0x162),0x1),'rectangle':this[_0x368733(0x177)],'opacity':this['style']['opacity']});else this['style'][_0x368733(_0x55388e._0x3438ba)]?this['_graphic']&&_0x1e06ce?(this[_0x368733(0x181)]['uniforms'][_0x368733(_0x55388e._0x2eb3d2)]=_0x358d8a,this['_graphic'][_0x368733(_0x55388e._0xe924d4)]['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this[_0x368733(_0x55388e._0x3a3b70)]['uniforms']['image']=_0x358d8a,this[_0x368733(0x185)]['uniforms']['bumpMap']=this['_graphic'][_0x368733(0x179)][_0x368733(_0x55388e._0x2da68f)])):this['_createArcGraphic'](_0x358d8a):this['_graphic']&&_0x1e06ce?this[_0x368733(_0x55388e._0x2d04ad)][_0x368733(0x179)][_0x368733(_0x55388e._0x2c7a0f)]=_0x358d8a:this[_0x368733(0x15a)](_0x358d8a);return this;}[_0x5d47d9(0x15a)](_0x14f676){const _0x5e9567=_0x5d47d9;this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x5e9567(0x177)],'appearance':new Cesium[(_0x5e9567(0x184))]({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x14f676},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x5e9567(0x16f)]['addGraphic'](this[_0x5e9567(0x181)]);}['_createArcGraphic'](_0x4ecfdf){const _0x21d8c9={_0x166300:0x160,_0x1f40a4:0x18e,_0x57762e:0x1b4,_0x5a39b2:0x1a3,_0x52dd0c:0x181,_0x349934:0x1a5,_0x48e708:0x191,_0x20bb34:0x185,_0x3bec7c:0x177,_0x233b8f:0x184},_0x296047=_0x5d47d9;this['clear']();const _0x1e53de=Cesium[_0x296047(_0x21d8c9._0x166300)]['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction'][_0x296047(0x1a9)],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation'][_0x296047(0x1b1)]},'backFunction':Cesium[_0x296047(0x182)]['ALWAYS'],'backOperation':{'fail':Cesium[_0x296047(_0x21d8c9._0x1f40a4)][_0x296047(_0x21d8c9._0x57762e)],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium[_0x296047(0x183)]['ALPHA_BLEND']}),_0x45e612=Math[_0x296047(0x198)](this[_0x296047(_0x21d8c9._0x5a39b2)]['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style']['diffHeight']&&delete this['style']['diffHeight'];const _0x47bdcb=(this[_0x296047(_0x21d8c9._0x5a39b2)]['splitNum'],0x64);let _0x2d89ba=Math['max'](this['_rectangle']['height'],this['_rectangle']['width']);this['style']['granularity']=_0x2d89ba/=_0x47bdcb;const _0x268f16=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x4ecfdf,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this[_0x296047(0x176)]()},'source':HeatMaterial},'translucent':!![]}),_0x439144=this['style'][_0x296047(0x191)]||0x1;this[_0x296047(_0x21d8c9._0x52dd0c)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x1e53de,'material':_0x268f16,'vertexShaderSource':getVertexShaderSource(_0x45e612*_0x439144)})}),this['_layer'][_0x296047(_0x21d8c9._0x349934)](this[_0x296047(0x181)]),this[_0x296047(0x1a3)][_0x296047(_0x21d8c9._0x48e708)]===0x0&&(this[_0x296047(_0x21d8c9._0x20bb34)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0x296047(0x18a)],'rectangle':this[_0x296047(_0x21d8c9._0x3bec7c)],'appearance':new Cesium[(_0x296047(_0x21d8c9._0x233b8f))]({'flat':!![],'aboveGround':!![],'renderState':_0x1e53de,'material':_0x268f16,'vertexShaderSource':getVertexShaderSource(-_0x45e612)})}),this['_layer']['addGraphic'](this['_graphic2']));}[_0x5d47d9(0x175)](_0x2b9e7f){const _0x24bac1=_0x5d47d9;return _0x2b9e7f!==null&&_0x2b9e7f!==void 0x0&&_0x2b9e7f[_0x24bac1(0x1a1)]&&this['_rectangle']?mars3d__namespace[_0x24bac1(0x167)]['formatRectangle'](this[_0x24bac1(0x177)]):this['_rectangle'];}[_0x5d47d9(0x196)](){const _0x2a9788={_0x5acb74:0x16d,_0x13c326:0x1a4,_0x14a492:0x169,_0x2e58ee:0x18a,_0x1d1b2d:0x16c,_0x4c69e1:0x164,_0x49fcec:0x1ae,_0x47164c:0x164,_0x3cc658:0x174,_0x408c77:0x17d,_0x47dbda:0x1ac,_0x4000aa:0x168,_0x575486:0x1a8,_0x579a78:0x188,_0x3a5e0d:0x1b2,_0x1215ea:0x19d},_0x1c32cf={_0x4dd609:0x18f,_0x4f7786:0x174,_0x52c5bb:0x1a4,_0x33145b:0x15b},_0x53bd8a={_0x10f73a:0x15f},_0x2e7060=_0x5d47d9,_0x5a9ba9=this['_positions'],_0x27b53b=[];let _0x1a86c4,_0x5b3415,_0x59d6b1,_0xeff3ad;_0x5a9ba9['forEach'](_0x1e8b3f=>{const _0x560bf5=_0x48fe,_0x251712=mars3d__namespace['LngLatPoint']['parse'](_0x1e8b3f);if(!_0x251712)return;_0x251712['value']=_0x1e8b3f['value']||0x1,!this['options']['rectangle']&&(_0x1a86c4===undefined?(_0x1a86c4=_0x251712[_0x560bf5(_0x53bd8a._0x10f73a)],_0x5b3415=_0x251712['lng'],_0x59d6b1=_0x251712['lat'],_0xeff3ad=_0x251712['lat']):(_0x1a86c4=Math['min'](_0x1a86c4,_0x251712[_0x560bf5(_0x53bd8a._0x10f73a)]),_0x5b3415=Math[_0x560bf5(0x169)](_0x5b3415,_0x251712['lng']),_0x59d6b1=Math['min'](_0x59d6b1,_0x251712['lat']),_0xeff3ad=Math['max'](_0xeff3ad,_0x251712['lat']))),_0x27b53b['push'](_0x251712);});_0x1a86c4===_0x5b3415&&(_0x1a86c4-=0.000001,_0x5b3415+=0.000001);_0x59d6b1===_0xeff3ad&&(_0x59d6b1-=0.000001,_0xeff3ad+=0.000001);let _0x334710=this['options'][_0x2e7060(0x180)]||{'xmin':_0x1a86c4,'xmax':_0x5b3415,'ymin':_0x59d6b1,'ymax':_0xeff3ad};const _0x2afce9=getMercatorBounds(_0x334710),_0xd752ce=Math['abs'](_0x2afce9['xmax']-_0x2afce9['xmin']),_0x1c5016=Math[_0x2e7060(_0x2a9788._0x5acb74)](_0x2afce9[_0x2e7060(_0x2a9788._0x13c326)]-_0x2afce9['ymin']),_0x33a7d5=Math[_0x2e7060(_0x2a9788._0x14a492)](_0xd752ce,_0x1c5016),_0x4b5387=Math['min'](_0xd752ce,_0x1c5016);this['_mBoundsMax']=_0x33a7d5;let _0x22300a=0x1;if(_0x33a7d5>this[_0x2e7060(0x18a)][_0x2e7060(0x16c)])_0x22300a=_0x33a7d5/this['options'][_0x2e7060(0x16c)],_0x4b5387/_0x22300a<this['options']['minCanvasSize']&&(_0x22300a=_0x4b5387/this['options']['minCanvasSize']);else _0x4b5387<this[_0x2e7060(_0x2a9788._0x2e58ee)]['minCanvasSize']&&(_0x22300a=_0x4b5387/this['options']['minCanvasSize'],_0x33a7d5/_0x22300a>this['options'][_0x2e7060(_0x2a9788._0x1d1b2d)]&&(_0x22300a=_0x33a7d5/this[_0x2e7060(0x18a)][_0x2e7060(0x16c)]));const _0x8f5475=this['heatStyle']['radius']*1.5,_0xa2dcb9=_0xd752ce/_0x22300a+_0x8f5475*0x2,_0x144f64=_0x1c5016/_0x22300a+_0x8f5475*0x2,_0x1a4e86=_0x8f5475*_0x22300a;_0x2afce9[_0x2e7060(_0x2a9788._0x4c69e1)]-=_0x1a4e86,_0x2afce9['ymin']-=_0x1a4e86,_0x2afce9['xmax']+=_0x1a4e86,_0x2afce9['ymax']+=_0x1a4e86,this['_scale']=_0x22300a,_0x334710=geLatLngBounds(_0x2afce9),this['_rectangle']=Cesium[_0x2e7060(_0x2a9788._0x49fcec)]['fromDegrees'](_0x334710[_0x2e7060(_0x2a9788._0x47164c)],_0x334710['ymin'],_0x334710['xmax'],_0x334710['ymax']);let _0x3aee5f=_0x27b53b[0x0][_0x2e7060(_0x2a9788._0x3cc658)]??0x1,_0x3ee4f4=_0x27b53b[0x0]['value']??0x0;const _0x456534=[];_0x27b53b[_0x2e7060(0x19e)](_0x1b61e6=>{const _0xa993d4=_0x2e7060,_0x3b741d=mars3d__namespace['PointTrans'][_0xa993d4(_0x1c32cf._0x4dd609)]([_0x1b61e6['lng'],_0x1b61e6['lat']]),_0x127ecd=_0x1b61e6[_0xa993d4(_0x1c32cf._0x4f7786)]||0x1,_0x216971=Math['round']((_0x3b741d[0x0]-_0x2afce9['xmin'])/_0x22300a),_0xb1ac77=Math['round']((_0x2afce9[_0xa993d4(_0x1c32cf._0x52c5bb)]-_0x3b741d[0x1])/_0x22300a);_0x3aee5f=Math[_0xa993d4(0x169)](_0x3aee5f,_0x127ecd),_0x3ee4f4=Math[_0xa993d4(_0x1c32cf._0x33145b)](_0x3ee4f4,_0x127ecd),_0x456534['push']({'x':_0x216971,'y':_0xb1ac77,'value':_0x127ecd});});const _0x11426d={'min':this['options']['min']??_0x3ee4f4,'max':this['options'][_0x2e7060(_0x2a9788._0x14a492)]??_0x3aee5f,'data':_0x456534};this['_last_heatData']=_0x11426d;if(!this[_0x2e7060(0x19f)]||_0x2afce9['xmin']!==this['_last_mBounds']['xmin']||_0x2afce9[_0x2e7060(_0x2a9788._0x408c77)]!==this['_last_mBounds']['ymin']||_0x2afce9['xmax']!==this['_last_mBounds'][_0x2e7060(_0x2a9788._0x47dbda)]||_0x2afce9['ymax']!==this[_0x2e7060(0x19f)]['ymax']){this['_last_mBounds']=_0x2afce9,this['_container']['style']['cssText']='width:'+_0xa2dcb9+'px;height:'+_0x144f64+'px;';const _0x11a660={...this[_0x2e7060(_0x2a9788._0x4000aa)],'container':this[_0x2e7060(_0x2a9788._0x575486)]};!this[_0x2e7060(_0x2a9788._0x579a78)]?this[_0x2e7060(_0x2a9788._0x579a78)]=h337__namespace['create'](_0x11a660):this[_0x2e7060(0x188)]['configure'](_0x11a660);}this[_0x2e7060(0x188)]['setData'](_0x11426d);const _0x107737=mars3d__namespace[_0x2e7060(_0x2a9788._0x3a5e0d)][_0x2e7060(0x17e)](this['_heat'][_0x2e7060(0x17a)][_0x2e7060(_0x2a9788._0x1215ea)]);return _0x107737;}['_getArcHeatCanvas'](){const _0x33d293={_0x49058b:0x17f,_0x5461fa:0x1b2},_0x4c33e6=_0x5d47d9;this['_heat']['configure']({'radius':this['heatStyle'][_0x4c33e6(0x173)]*this['style']['arcRadiusScale'],'blur':this['heatStyle']['blur']*this[_0x4c33e6(0x1a3)]['arcBlurScale'],'gradient':this['heatStyle'][_0x4c33e6(_0x33d293._0x49058b)]||{0.25:'rgb(0,0,0)',0.55:_0x4c33e6(0x163),0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x2ed62e=mars3d__namespace[_0x4c33e6(_0x33d293._0x5461fa)]['copyCanvas'](this['_heat']['_renderer']['canvas']);return this['_heat'][_0x4c33e6(0x199)](this['options']['heatStyle']),_0x2ed62e;}[_0x5d47d9(0x1af)](_0x25b7a8){const _0x1b11b7={_0x4e291c:0x164,_0x380db0:0x16a,_0x11fc01:0x178,_0x4f1175:0x194},_0x406525=_0x5d47d9,_0x2585da=mars3d__namespace['LngLatPoint']['parse'](_0x25b7a8);if(!_0x2585da)return{};const _0x1ee19d=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x2585da['lng'],_0x2585da['lat']]),_0x9b2e98=this['_last_mBounds'],_0x7273c3=Math['round']((_0x1ee19d[0x0]-_0x9b2e98[_0x406525(_0x1b11b7._0x4e291c)])/this[_0x406525(_0x1b11b7._0x380db0)]),_0x1d6f76=Math['round']((_0x9b2e98['ymax']-_0x1ee19d[0x1])/this['_scale']),_0x39451c=this[_0x406525(0x188)]['getValueAt']({'x':_0x7273c3,'y':_0x1d6f76}),_0x373f27=this['_heat'][_0x406525(0x17a)]['ctx'][_0x406525(_0x1b11b7._0x11fc01)](_0x7273c3-0x1,_0x1d6f76-0x1,0x1,0x1)['data'];return{'x':_0x7273c3,'y':_0x1d6f76,'value':_0x39451c,'color':_0x406525(_0x1b11b7._0x4f1175)+_0x373f27[0x0]+','+_0x373f27[0x1]+','+_0x373f27[0x2]+','+_0x373f27[0x3]+')'};}}mars3d__namespace['LayerUtil']['register']('heat',HeatLayer),mars3d__namespace[_0x5d47d9(0x19a)]['HeatLayer']=HeatLayer,mars3d__namespace[_0x5d47d9(0x17c)]=h337__namespace;function getMercatorBounds(_0x3f48cc){const _0x44db08={_0x452b6a:0x19b,_0x5618e1:0x18f},_0x8e3adf=_0x5d47d9,_0x4e8ce2=mars3d__namespace[_0x8e3adf(_0x44db08._0x452b6a)]['lonlat2mercator']([_0x3f48cc[_0x8e3adf(0x164)],_0x3f48cc['ymin']]),_0x28ee69=mars3d__namespace[_0x8e3adf(_0x44db08._0x452b6a)][_0x8e3adf(_0x44db08._0x5618e1)]([_0x3f48cc[_0x8e3adf(0x1ac)],_0x3f48cc[_0x8e3adf(0x1a4)]]);return{'xmin':_0x4e8ce2[0x0],'ymin':_0x4e8ce2[0x1],'xmax':_0x28ee69[0x0],'ymax':_0x28ee69[0x1]};}function geLatLngBounds(_0xd36fc0){const _0x386376={_0x5ded0b:0x17d},_0x35afa8=_0x5d47d9,_0x2512fa=mars3d__namespace[_0x35afa8(0x19b)]['mercator2lonlat']([_0xd36fc0['xmin'],_0xd36fc0[_0x35afa8(_0x386376._0x5ded0b)]]),_0x5ba078=mars3d__namespace['PointTrans']['mercator2lonlat']([_0xd36fc0['xmax'],_0xd36fc0[_0x35afa8(0x1a4)]]);return{'xmin':_0x2512fa[0x0],'ymin':_0x2512fa[0x1],'xmax':_0x5ba078[0x0],'ymax':_0x5ba078[0x1]};}function getVertexShaderSource(_0x1695c7){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'+_0x1695c7+';\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';}function _0x48fe(_0x4395d9,_0x50f10d){const _0x95b321=_0x95b3();return _0x48fe=function(_0x48fe95,_0x14ba7f){_0x48fe95=_0x48fe95-0x158;let _0x1c9050=_0x95b321[_0x48fe95];return _0x1c9050;},_0x48fe(_0x4395d9,_0x50f10d);}exports['HeatLayer']=HeatLayer,Object['defineProperty'](exports,_0x5d47d9(0x1a6),{'value':!![]}); | ||
'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':!![]}); | ||
})); |
{ | ||
"name": "mars3d-heatmap", | ||
"version": "3.6.18", | ||
"version": "3.7.0", | ||
"description": "Mars3D平台插件,结合heatmap可视化功能插件", | ||
@@ -13,3 +13,3 @@ "main": "dist/mars3d-heatmap.js", | ||
"devDependencies": { | ||
"mars3d": "~3.6.18" | ||
"mars3d": "~3.7.0" | ||
}, | ||
@@ -16,0 +16,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24701
93