mars3d-heatmap
Advanced tools
Comparing version 3.6.17 to 3.6.18
/** | ||
* Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap | ||
* | ||
* 版本信息:v3.6.17 | ||
* 编译日期:2023-12-18 20:13:45 | ||
* 版本信息:v3.6.18 | ||
* 编译日期:2023-12-31 22:36:48 | ||
* 版权所有:Copyright by 火星科技 http://mars3d.cn | ||
@@ -14,3 +14,3 @@ * 使用单位:免费公开版 ,2023-03-17 | ||
})(this, (function (exports, mars3d, h337) { | ||
'use strict';function _0x1839(){const _0x2de345=['6cLIvqQ','addGraphic','image','_last_heatData','default','_createGraphic','body','1782568RXpIoz','PointTrans','_graphic','Cesium','lat','_heat','rectangle','mercator2lonlat','EllipsoidSurfaceAppearance','fromDegrees','minCanvasSize','flyTo','cssText','_container','xmax','create','LngLatPoint','forEach','_getArcHeatCanvas','push','bumpMap','arc','546225RXTWAh','EPSG:3857','_updatePositionsHook','325575qxnBne','3389309DZtJxm','uniforms','toArray','_scale','_layer','round','register','_graphic2','clientHeight','GraphicLayer','layer','35852PZuQhM','ymax','9OKJUlb','DomUtil','BaseLayer','parse','10691325PqNbRf','heat','abs','xmin','KEEP','options','heatStyle','addLayer','PolyUtil','isFormat','_rectangle','setOptions','235848viOePB','lonlat2mercator','setData','removeGraphic','style','addPosition','max','StencilOperation','positions','ymin','arcRadiusScale','yellow','min','merge','StencilFunction','ImageLayer','setPositions','_removedHook','_renderer','_last_mBounds','px;height:','_positions'];_0x1839=function(){return _0x2de345;};return _0x1839();}const _0x3fe13f=_0x463d;(function(_0x49f4fd,_0x24a5db){const _0x296b89={_0x17e9b1:0xc0,_0x18b9e:0xcf,_0x1a3e82:0xaa,_0x3c6dc9:0xc4},_0x7fa634=_0x463d,_0x35d0db=_0x49f4fd();while(!![]){try{const _0x5d6f74=parseInt(_0x7fa634(_0x296b89._0x17e9b1))/0x1+parseInt(_0x7fa634(_0x296b89._0x18b9e))/0x2*(parseInt(_0x7fa634(0xd1))/0x3)+parseInt(_0x7fa634(_0x296b89._0x1a3e82))/0x4+-parseInt(_0x7fa634(0xc3))/0x5+-parseInt(_0x7fa634(0xa3))/0x6*(-parseInt(_0x7fa634(_0x296b89._0x3c6dc9))/0x7)+parseInt(_0x7fa634(0xe1))/0x8+-parseInt(_0x7fa634(0xd5))/0x9;if(_0x5d6f74===_0x24a5db)break;else _0x35d0db['push'](_0x35d0db['shift']());}catch(_0x314ab7){_0x35d0db['push'](_0x35d0db['shift']());}}}(_0x1839,0x4ac61));function _interopNamespace(_0x3e5030){const _0x13ad0d=_0x463d;if(_0x3e5030&&_0x3e5030['__esModule'])return _0x3e5030;var _0x3591aa=Object[_0x13ad0d(0xb9)](null);return _0x3e5030&&Object['keys'](_0x3e5030)['forEach'](function(_0x39caa1){if(_0x39caa1!=='default'){var _0x491954=Object['getOwnPropertyDescriptor'](_0x3e5030,_0x39caa1);Object['defineProperty'](_0x3591aa,_0x39caa1,_0x491954['get']?_0x491954:{'enumerable':!![],'get':function(){return _0x3e5030[_0x39caa1];}});}}),_0x3591aa[_0x13ad0d(0xa7)]=_0x3e5030,_0x3591aa;}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[_0x3fe13f(0xb9)])throw new Error('请引入\x20heatmap.js\x20库\x20');function _0x463d(_0x5ca123,_0x16b0ba){const _0x183927=_0x1839();return _0x463d=function(_0x463dfe,_0x14b96e){_0x463dfe=_0x463dfe-0x8e;let _0x376727=_0x183927[_0x463dfe];return _0x376727;},_0x463d(_0x5ca123,_0x16b0ba);}const Cesium=mars3d__namespace[_0x3fe13f(0xad)],BaseLayer=mars3d__namespace['layer'][_0x3fe13f(0xd3)],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:'blue',0.6:'green',0.8:_0x3fe13f(0x98),0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance']['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x52b8c6={}){const _0x5209ba={_0x248e23:0xda,_0x27cab9:0x99,_0x18740a:0xb4},_0x3e9a12=_0x3fe13f;super(_0x52b8c6),this['options']['maxCanvasSize']=this[_0x3e9a12(_0x5209ba._0x248e23)]['maxCanvasSize']??document['body']['clientWidth'],this['options']['maxCanvasSize']=Math[_0x3e9a12(_0x5209ba._0x27cab9)](this[_0x3e9a12(0xda)]['maxCanvasSize'],0x1388),this['options'][_0x3e9a12(_0x5209ba._0x18740a)]=this['options']['minCanvasSize']??document[_0x3e9a12(0xa9)][_0x3e9a12(0xcc)],this[_0x3e9a12(0xda)]['minCanvasSize']=Math[_0x3e9a12(0x93)](this['options']['minCanvasSize'],0x2bc),this[_0x3e9a12(0xda)]['heatStyle']={...DEF_HEATSTYLE,...this[_0x3e9a12(_0x5209ba._0x248e23)]['heatStyle']},this['options']['style']={...DEF_STYLE,...this['options']['style']};}get['layer'](){return this['_layer'];}get['heatStyle'](){const _0x434681={_0x2281ff:0xda},_0x8b516c=_0x3fe13f;return this[_0x8b516c(_0x434681._0x2281ff)]['heatStyle'];}set['heatStyle'](_0x4de1f1){const _0x2ca07c={_0xbda8b1:0x9a,_0x245dc0:0xaf},_0x49e506=_0x3fe13f;this[_0x49e506(0xda)]['heatStyle']=mars3d__namespace['Util'][_0x49e506(_0x2ca07c._0xbda8b1)](this['options']['heatStyle'],_0x4de1f1),this['_heat']&&(this[_0x49e506(_0x2ca07c._0x245dc0)]['configure'](this['options']['heatStyle']),this['_updatePositionsHook'](!![]));}get['style'](){const _0x3016ca={_0x4c65b8:0xda},_0x310909=_0x3fe13f;return this[_0x310909(_0x3016ca._0x4c65b8)]['style'];}set[_0x3fe13f(0x91)](_0x490274){const _0x8dc0d9={_0x26d33f:0x91},_0x47f5bb=_0x3fe13f;this['options']['style']=mars3d__namespace['Util'][_0x47f5bb(0x9a)](this[_0x47f5bb(0xda)][_0x47f5bb(_0x8dc0d9._0x26d33f)],_0x490274);}get[_0x3fe13f(0x95)](){const _0x22802b={_0x3202da:0xa2},_0x2dc456=_0x3fe13f;return this[_0x2dc456(_0x22802b._0x3202da)];}set[_0x3fe13f(0x95)](_0x72d773){const _0x1fec57={_0x244b83:0x9d},_0x4abdda=_0x3fe13f;this[_0x4abdda(_0x1fec57._0x244b83)](_0x72d773);}get['coordinates'](){const _0x2901eb=[];return this['points']['forEach'](_0x4035d4=>{const _0x193253=_0x463d;_0x2901eb['push'](_0x4035d4[_0x193253(0xc6)]());}),_0x2901eb;}get['rectangle'](){return this['_rectangle'];}['_setOptionsHook'](_0x469f2b,_0x16c2c0){const _0xa9db42=_0x3fe13f;_0x469f2b[_0xa9db42(0x95)]&&(this[_0xa9db42(0x95)]=_0x469f2b['positions']);}['_mountedHook'](){const _0x16036b={_0x2d9127:0xa5,_0x5885dd:0xce,_0x4e483b:0x9c},_0x45c08a=_0x3fe13f;this['style']['type']===_0x45c08a(_0x16036b._0x2d9127)?this['_layer']=new mars3d__namespace[(_0x45c08a(_0x16036b._0x5885dd))][(_0x45c08a(_0x16036b._0x4e483b))]({'crs':_0x45c08a(0xc1),'private':!![]}):this['_layer']=new mars3d__namespace['layer'][(_0x45c08a(0xcd))]({'private':!![]});}['_addedHook'](){const _0x59f42c={_0x574e37:0xda},_0x37c2e8=_0x3fe13f;this['_map'][_0x37c2e8(0xdc)](this['_layer']),this['_container']=mars3d__namespace['DomUtil']['create']('div','mars3d-heatmap\x20mars3d-hideDiv',this['_map']['container']),this[_0x37c2e8(_0x59f42c._0x574e37)]['positions']&&(this['positions']=this['options']['positions']),this['options'][_0x37c2e8(0xb5)]&&this['flyToByAnimationEnd']();}[_0x3fe13f(0x9e)](){const _0x2e8c83={_0x1fd17a:0xb7,_0x8081cd:0xc8},_0x50d0fd=_0x3fe13f;this[_0x50d0fd(0xb7)]&&(mars3d__namespace['DomUtil']['remove'](this['_container']),delete this[_0x50d0fd(_0x2e8c83._0x1fd17a)]),this['clear'](),this['_map']['removeLayer'](this[_0x50d0fd(_0x2e8c83._0x8081cd)]);}[_0x3fe13f(0x92)](_0x3afd0b,_0x4d2013){const _0x2cc3e={_0x5709a9:0xa2},_0xa77423=_0x3fe13f;this[_0xa77423(_0x2cc3e._0x5709a9)]=this['_positions']||[],this['_positions'][_0xa77423(0xbd)](_0x3afd0b),this['_updatePositionsHook'](_0x4d2013);}[_0x3fe13f(0x9d)](_0x22b03a,_0x16f47a){this['_positions']=_0x22b03a,this['_updatePositionsHook'](_0x16f47a);}['clear'](){const _0x5c4b10=_0x3fe13f;this[_0x5c4b10(0xac)]&&(this['_layer'][_0x5c4b10(0x90)](this['_graphic'],!![]),delete this[_0x5c4b10(0xac)]),this['_graphic2']&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this['_graphic2']);}[_0x3fe13f(0xc2)](_0x186d1c){const _0x31428c={_0x123f0c:0xe0,_0xd2e93c:0xbc},_0x4cacbe=_0x3fe13f;if(!this['show']||!this['_map']||!this['positions']||this['positions']['length']===0x0)return this;const _0x21e9ef=this['_getHeatCanvas']();if(this['style']['type']==='image')this[_0x4cacbe(0xc8)][_0x4cacbe(_0x31428c._0x123f0c)]({'url':_0x21e9ef['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style'][_0x4cacbe(0xbf)]?this['_graphic']&&_0x186d1c?(this['_graphic'][_0x4cacbe(0xc5)]['image']=_0x21e9ef,this['_graphic']['uniforms']['bumpMap']=this[_0x4cacbe(_0x31428c._0xd2e93c)](),this[_0x4cacbe(0xcb)]&&(this['_graphic2']['uniforms']['image']=_0x21e9ef,this[_0x4cacbe(0xcb)][_0x4cacbe(0xc5)]['bumpMap']=this[_0x4cacbe(0xac)]['uniforms'][_0x4cacbe(0xbe)])):this['_createArcGraphic'](_0x21e9ef):this['_graphic']&&_0x186d1c?this['_graphic']['uniforms'][_0x4cacbe(0xa5)]=_0x21e9ef:this['_createGraphic'](_0x21e9ef);return this;}[_0x3fe13f(0xa8)](_0x2b3545){const _0x42ad66={_0x4fec6a:0xb2},_0x553f3c=_0x3fe13f;this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x553f3c(_0x42ad66._0x4fec6a))]({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x2b3545},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this['_layer'][_0x553f3c(0xa4)](this['_graphic']);}['_createArcGraphic'](_0x55c0eb){const _0x46031c={_0x5c2480:0x9b,_0x4c021e:0x94,_0x396842:0x91,_0xfa425a:0xac,_0x10c1d1:0xdf},_0x4d4ab0=_0x3fe13f;this['clear']();const _0x46373d=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium[_0x4d4ab0(_0x46031c._0x5c2480)]['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium[_0x4d4ab0(_0x46031c._0x4c021e)]['REPLACE']},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation'][_0x4d4ab0(0xd9)],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x78660a=Math['floor'](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style']['diffHeight']&&delete this[_0x4d4ab0(0x91)]['diffHeight'];const _0x344153=(this[_0x4d4ab0(_0x46031c._0x396842)]['splitNum'],0x64);let _0x17b28b=Math['max'](this['_rectangle']['height'],this['_rectangle']['width']);this[_0x4d4ab0(_0x46031c._0x396842)]['granularity']=_0x17b28b/=_0x344153;const _0x31ab3f=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x55c0eb,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x519bd5=this['style']['arcDirection']||0x1;this[_0x4d4ab0(_0x46031c._0xfa425a)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x46373d,'material':_0x31ab3f,'vertexShaderSource':getVertexShaderSource(_0x78660a*_0x519bd5)})}),this['_layer']['addGraphic'](this['_graphic']),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x4d4ab0(_0x46031c._0x10c1d1)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x46373d,'material':_0x31ab3f,'vertexShaderSource':getVertexShaderSource(-_0x78660a)})}),this['_layer']['addGraphic'](this['_graphic2']));}['getRectangle'](_0x1fde56){const _0x4dbcac={_0x587e4a:0xdd},_0x37216c=_0x3fe13f;return _0x1fde56!==null&&_0x1fde56!==void 0x0&&_0x1fde56[_0x37216c(0xde)]&&this['_rectangle']?mars3d__namespace[_0x37216c(_0x4dbcac._0x587e4a)]['formatRectangle'](this['_rectangle']):this[_0x37216c(0xdf)];}['_getHeatCanvas'](){const _0x41c3ef={_0x12c192:0xa2,_0x109cc2:0xd7,_0x21c17:0x96,_0x43767b:0xd0,_0x47b10a:0xc7,_0x3621f3:0xbb,_0x530f28:0xda,_0x297ce8:0x93,_0x475a34:0xa6,_0x5961b4:0xa0,_0x534c30:0xd8,_0x387d27:0xd0,_0x4b0e66:0xa0,_0x2178bc:0x91,_0x853149:0xa1,_0x4d202b:0x8f},_0x527a1d={_0x2395c7:0x8e,_0x135399:0xd0,_0x132ad0:0x93},_0x1b7bac={_0x143d21:0xba,_0x48cb3b:0xb0},_0xd39d91=_0x3fe13f,_0x3d69b1=this[_0xd39d91(_0x41c3ef._0x12c192)],_0x4eff89=[];let _0x48ec3d,_0x3fe325,_0x4a3986,_0xed37a7;_0x3d69b1['forEach'](_0x5e957e=>{const _0x5d06e2=_0xd39d91,_0x4ec082=mars3d__namespace[_0x5d06e2(_0x1b7bac._0x143d21)]['parse'](_0x5e957e);if(!_0x4ec082)return;_0x4ec082['value']=_0x5e957e['value']||0x1,!this['options'][_0x5d06e2(_0x1b7bac._0x48cb3b)]&&(_0x48ec3d===undefined?(_0x48ec3d=_0x4ec082['lng'],_0x3fe325=_0x4ec082['lng'],_0x4a3986=_0x4ec082['lat'],_0xed37a7=_0x4ec082['lat']):(_0x48ec3d=Math['min'](_0x48ec3d,_0x4ec082['lng']),_0x3fe325=Math[_0x5d06e2(0x93)](_0x3fe325,_0x4ec082['lng']),_0x4a3986=Math['min'](_0x4a3986,_0x4ec082['lat']),_0xed37a7=Math['max'](_0xed37a7,_0x4ec082['lat']))),_0x4eff89['push'](_0x4ec082);});_0x48ec3d===_0x3fe325&&(_0x48ec3d-=0.000001,_0x3fe325+=0.000001);_0x4a3986===_0xed37a7&&(_0x4a3986-=0.000001,_0xed37a7+=0.000001);let _0x4040b5=this['options'][_0xd39d91(0xb0)]||{'xmin':_0x48ec3d,'xmax':_0x3fe325,'ymin':_0x4a3986,'ymax':_0xed37a7};const _0x17836f=getMercatorBounds(_0x4040b5),_0x28947e=Math[_0xd39d91(0xd7)](_0x17836f['xmax']-_0x17836f[_0xd39d91(0xd8)]),_0x4c2c40=Math[_0xd39d91(_0x41c3ef._0x109cc2)](_0x17836f['ymax']-_0x17836f[_0xd39d91(_0x41c3ef._0x21c17)]),_0x4c1f6d=Math['max'](_0x28947e,_0x4c2c40),_0x18e949=Math['min'](_0x28947e,_0x4c2c40);this['_mBoundsMax']=_0x4c1f6d;let _0x4fc339=0x1;if(_0x4c1f6d>this['options']['maxCanvasSize'])_0x4fc339=_0x4c1f6d/this['options']['maxCanvasSize'],_0x18e949/_0x4fc339<this[_0xd39d91(0xda)]['minCanvasSize']&&(_0x4fc339=_0x18e949/this[_0xd39d91(0xda)]['minCanvasSize']);else _0x18e949<this['options']['minCanvasSize']&&(_0x4fc339=_0x18e949/this['options']['minCanvasSize'],_0x4c1f6d/_0x4fc339>this[_0xd39d91(0xda)]['maxCanvasSize']&&(_0x4fc339=_0x4c1f6d/this['options']['maxCanvasSize']));const _0x304db0=this[_0xd39d91(0xdb)]['radius']*1.5,_0x3760d1=_0x28947e/_0x4fc339+_0x304db0*0x2,_0x362793=_0x4c2c40/_0x4fc339+_0x304db0*0x2,_0x531e32=_0x304db0*_0x4fc339;_0x17836f[_0xd39d91(0xd8)]-=_0x531e32,_0x17836f['ymin']-=_0x531e32,_0x17836f['xmax']+=_0x531e32,_0x17836f[_0xd39d91(_0x41c3ef._0x43767b)]+=_0x531e32,this[_0xd39d91(_0x41c3ef._0x47b10a)]=_0x4fc339,_0x4040b5=geLatLngBounds(_0x17836f),this['_rectangle']=Cesium['Rectangle'][_0xd39d91(0xb3)](_0x4040b5['xmin'],_0x4040b5['ymin'],_0x4040b5['xmax'],_0x4040b5[_0xd39d91(0xd0)]);let _0x161628=_0x4eff89[0x0]['value']??0x1,_0x1d1bfc=_0x4eff89[0x0]['value']??0x0;const _0x589033=[];_0x4eff89[_0xd39d91(_0x41c3ef._0x3621f3)](_0x15e7b0=>{const _0x455200=_0xd39d91,_0x1dbbcf=mars3d__namespace[_0x455200(0xab)][_0x455200(_0x527a1d._0x2395c7)]([_0x15e7b0['lng'],_0x15e7b0['lat']]),_0x4f0eb9=_0x15e7b0['value']||0x1,_0x252b1d=Math['round']((_0x1dbbcf[0x0]-_0x17836f[_0x455200(0xd8)])/_0x4fc339),_0x2b353b=Math['round']((_0x17836f[_0x455200(_0x527a1d._0x135399)]-_0x1dbbcf[0x1])/_0x4fc339);_0x161628=Math[_0x455200(_0x527a1d._0x132ad0)](_0x161628,_0x4f0eb9),_0x1d1bfc=Math['min'](_0x1d1bfc,_0x4f0eb9),_0x589033[_0x455200(0xbd)]({'x':_0x252b1d,'y':_0x2b353b,'value':_0x4f0eb9});});const _0x2d489b={'min':this[_0xd39d91(_0x41c3ef._0x530f28)][_0xd39d91(0x99)]??_0x1d1bfc,'max':this['options'][_0xd39d91(_0x41c3ef._0x297ce8)]??_0x161628,'data':_0x589033};this[_0xd39d91(_0x41c3ef._0x475a34)]=_0x2d489b;if(!this[_0xd39d91(_0x41c3ef._0x5961b4)]||_0x17836f['xmin']!==this[_0xd39d91(0xa0)][_0xd39d91(_0x41c3ef._0x534c30)]||_0x17836f['ymin']!==this['_last_mBounds']['ymin']||_0x17836f['xmax']!==this['_last_mBounds'][_0xd39d91(0xb8)]||_0x17836f[_0xd39d91(_0x41c3ef._0x387d27)]!==this['_last_mBounds']['ymax']){this[_0xd39d91(_0x41c3ef._0x4b0e66)]=_0x17836f,this[_0xd39d91(0xb7)][_0xd39d91(_0x41c3ef._0x2178bc)][_0xd39d91(0xb6)]='width:'+_0x3760d1+_0xd39d91(_0x41c3ef._0x853149)+_0x362793+'px;';const _0x36b090={...this['heatStyle'],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace[_0xd39d91(0xb9)](_0x36b090):this['_heat']['configure'](_0x36b090);}this['_heat'][_0xd39d91(_0x41c3ef._0x4d202b)](_0x2d489b);const _0x26fc98=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return _0x26fc98;}[_0x3fe13f(0xbc)](){const _0x51c2da={_0x14515d:0x97,_0x2be72c:0xaf},_0x5e26e1=_0x3fe13f;this['_heat']['configure']({'radius':this['heatStyle']['radius']*this['style'][_0x5e26e1(_0x51c2da._0x14515d)],'blur':this['heatStyle']['blur']*this['style']['arcBlurScale'],'gradient':this['heatStyle']['gradientArc']||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x4f3718=mars3d__namespace[_0x5e26e1(0xd2)]['copyCanvas'](this[_0x5e26e1(0xaf)]['_renderer']['canvas']);return this[_0x5e26e1(_0x51c2da._0x2be72c)]['configure'](this[_0x5e26e1(0xda)]['heatStyle']),_0x4f3718;}['getPointData'](_0xb8569){const _0x287f28={_0x3d2eaa:0xd4,_0x3798ce:0xab},_0x5434d1=_0x3fe13f,_0x171c99=mars3d__namespace['LngLatPoint'][_0x5434d1(_0x287f28._0x3d2eaa)](_0xb8569);if(!_0x171c99)return{};const _0x40c5c2=mars3d__namespace[_0x5434d1(_0x287f28._0x3798ce)]['lonlat2mercator']([_0x171c99['lng'],_0x171c99[_0x5434d1(0xae)]]),_0x45ddc5=this[_0x5434d1(0xa0)],_0x48a376=Math[_0x5434d1(0xc9)]((_0x40c5c2[0x0]-_0x45ddc5['xmin'])/this['_scale']),_0x2f01df=Math['round']((_0x45ddc5[_0x5434d1(0xd0)]-_0x40c5c2[0x1])/this[_0x5434d1(0xc7)]),_0x478d67=this['_heat']['getValueAt']({'x':_0x48a376,'y':_0x2f01df}),_0x2a2017=this['_heat'][_0x5434d1(0x9f)]['ctx']['getImageData'](_0x48a376-0x1,_0x2f01df-0x1,0x1,0x1)['data'];return{'x':_0x48a376,'y':_0x2f01df,'value':_0x478d67,'color':'rgba('+_0x2a2017[0x0]+','+_0x2a2017[0x1]+','+_0x2a2017[0x2]+','+_0x2a2017[0x3]+')'};}}mars3d__namespace['LayerUtil'][_0x3fe13f(0xca)](_0x3fe13f(0xd6),HeatLayer),mars3d__namespace[_0x3fe13f(0xce)]['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x392af7){const _0x2f3489=_0x3fe13f,_0x71b5bc=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x392af7['xmin'],_0x392af7[_0x2f3489(0x96)]]),_0xba6146=mars3d__namespace['PointTrans'][_0x2f3489(0x8e)]([_0x392af7['xmax'],_0x392af7['ymax']]);return{'xmin':_0x71b5bc[0x0],'ymin':_0x71b5bc[0x1],'xmax':_0xba6146[0x0],'ymax':_0xba6146[0x1]};}function geLatLngBounds(_0x408487){const _0xd9aee2=_0x3fe13f,_0x416e1c=mars3d__namespace[_0xd9aee2(0xab)][_0xd9aee2(0xb1)]([_0x408487['xmin'],_0x408487['ymin']]),_0x3c050f=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x408487['xmax'],_0x408487['ymax']]);return{'xmin':_0x416e1c[0x0],'ymin':_0x416e1c[0x1],'xmax':_0x3c050f[0x0],'ymax':_0x3c050f[0x1]};}function getVertexShaderSource(_0x16412a){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'+_0x16412a+';\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['defineProperty'](exports,'__esModule',{'value':!![]}); | ||
'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':!![]}); | ||
})); |
{ | ||
"name": "mars3d-heatmap", | ||
"version": "3.6.17", | ||
"version": "3.6.18", | ||
"description": "Mars3D平台插件,结合heatmap可视化功能插件", | ||
@@ -13,3 +13,3 @@ "main": "dist/mars3d-heatmap.js", | ||
"devDependencies": { | ||
"mars3d": "~3.6.17" | ||
"mars3d": "~3.6.18" | ||
}, | ||
@@ -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
24966
94