mars3d-heatmap 3.5.10 → 3.5.11

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.10
5
- * 编译日期:2023-06-05 18:17:57
4
+ * 版本信息:v3.5.11
5
+ * 编译日期:2023-06-12 21:55:10
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 _0x5997cb=_0x453f;(function(_0x499800,_0x42dcc1){const _0x49fcf3={_0x11214a:0x1ea,_0x13cdab:0x229,_0x25a5e1:0x21c,_0x35bde7:0x1f4},_0x5e2832=_0x453f,_0x547f27=_0x499800();while(!![]){try{const _0x44bf63=-parseInt(_0x5e2832(_0x49fcf3._0x11214a))/0x1+parseInt(_0x5e2832(0x22b))/0x2*(parseInt(_0x5e2832(_0x49fcf3._0x13cdab))/0x3)+-parseInt(_0x5e2832(0x21f))/0x4*(parseInt(_0x5e2832(_0x49fcf3._0x25a5e1))/0x5)+parseInt(_0x5e2832(0x204))/0x6+-parseInt(_0x5e2832(0x212))/0x7*(parseInt(_0x5e2832(_0x49fcf3._0x35bde7))/0x8)+parseInt(_0x5e2832(0x1fb))/0x9+parseInt(_0x5e2832(0x1dc))/0xa;if(_0x44bf63===_0x42dcc1)break;else _0x547f27['push'](_0x547f27['shift']());}catch(_0xe136e2){_0x547f27['push'](_0x547f27['shift']());}}}(_0xdc72,0x56f50));function _interopNamespace(_0x3c2e21){const _0x3f5188={_0x1ed444:0x22f},_0x19a13c=_0x453f;if(_0x3c2e21&&_0x3c2e21[_0x19a13c(0x1e1)])return _0x3c2e21;var _0x232fa5=Object['create'](null);return _0x3c2e21&&Object['keys'](_0x3c2e21)[_0x19a13c(_0x3f5188._0x1ed444)](function(_0x40610b){const _0x1c605b=_0x19a13c;if(_0x40610b!==_0x1c605b(0x21b)){var _0x163664=Object['getOwnPropertyDescriptor'](_0x3c2e21,_0x40610b);Object['defineProperty'](_0x232fa5,_0x40610b,_0x163664['get']?_0x163664:{'enumerable':!![],'get':function(){return _0x3c2e21[_0x40610b];}});}}),_0x232fa5['default']=_0x3c2e21,_0x232fa5;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial=_0x5997cb(0x1eb);function _0xdc72(){const _0x2fd941=['value','options','lat','_getHeatCanvas','arcDirection','diffHeight','rgb(0,0,0)','_createGraphic','positions','LayerUtil','layer','div','20846dVPMiF','rgba(','_rectangle','RectanglePrimitive','Cartesian2','StencilOperation','_setOptionsHook','configure','PointTrans','default','5tLkfIc','push','heatStyle','58088yecqNr','flyTo','round','height','_heat','_layer','image','create','Rectangle','maxCanvasSize','9KWZByv','copyCanvas','3642enFAAK','length','ymin','bumpMap','forEach','px;height:','minCanvasSize','DomUtil','_updatePositionsHook','3862550jWplqf','xmin','uniforms','VERTEX_FORMAT','ImageLayer','__esModule','_graphic','_scale','min','body','_renderer','EllipsoidSurfaceAppearance','_positions','KEEP','546005VQmujk','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','max','addLayer','graphic','xmax','defineProperty','clear',';\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','Material','920FbHGSe','lng','ALWAYS','_last_mBounds','removeLayer','rectangle','_getArcHeatCanvas','6211494RbnEoR','container','EPSG:3857','getImageData','ymax','px;','_graphic2','setData','removeGraphic','1063734qvjQUU','style'];_0xdc72=function(){return _0x2fd941;};return _0xdc72();}function _0x453f(_0xe960,_0x8fef39){const _0xdc72fe=_0xdc72();return _0x453f=function(_0x453fdd,_0x4c8f5a){_0x453fdd=_0x453fdd-0x1d8;let _0x4e2ea3=_0xdc72fe[_0x453fdd];return _0x4e2ea3;},_0x453f(_0xe960,_0x8fef39);}if(!h337__namespace[_0x5997cb(0x226)])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x5997cb(0x210)]['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['EllipsoidSurfaceAppearance'][_0x5997cb(0x1df)]};class HeatLayer extends BaseLayer{constructor(_0x347ec7={}){const _0x48edc0={_0x565ae4:0x228,_0x40195d:0x207,_0x6f8c8e:0x1d9,_0x5e0487:0x21e},_0x559c0e=_0x5997cb;super(_0x347ec7),this['options'][_0x559c0e(0x228)]=this[_0x559c0e(0x207)]['maxCanvasSize']??document[_0x559c0e(0x1e5)]['clientWidth'],this['options'][_0x559c0e(_0x48edc0._0x565ae4)]=Math[_0x559c0e(0x1e4)](this[_0x559c0e(_0x48edc0._0x40195d)]['maxCanvasSize'],0x1388),this['options']['minCanvasSize']=this['options']['minCanvasSize']??document['body']['clientHeight'],this['options'][_0x559c0e(_0x48edc0._0x6f8c8e)]=Math['max'](this['options']['minCanvasSize'],0x2bc),this['options'][_0x559c0e(_0x48edc0._0x5e0487)]={...DEF_HEATSTYLE,...this['options']['heatStyle']||{}},this[_0x559c0e(_0x48edc0._0x40195d)]['style']={...DEF_STYLE,...this['options'][_0x559c0e(0x205)]||{}};}get['layer'](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set[_0x5997cb(0x21e)](_0xddec85){const _0x4918a6={_0x5accbc:0x207,_0x2c4ce1:0x223,_0x1c58e9:0x1db},_0x3ba0f5=_0x5997cb;this[_0x3ba0f5(_0x4918a6._0x5accbc)][_0x3ba0f5(0x21e)]=mars3d__namespace['Util']['merge'](this['options'][_0x3ba0f5(0x21e)],_0xddec85),this['_heat']&&(this[_0x3ba0f5(_0x4918a6._0x2c4ce1)]['configure'](this['options']['heatStyle']),this[_0x3ba0f5(_0x4918a6._0x1c58e9)](!![]));}get[_0x5997cb(0x205)](){return this['options']['style'];}set[_0x5997cb(0x205)](_0x42adf4){this['options']['style']=mars3d__namespace['Util']['merge'](this['options']['style'],_0x42adf4);}get[_0x5997cb(0x20e)](){const _0x298630=_0x5997cb;return this[_0x298630(0x1e8)];}set['positions'](_0x2c62b0){this['setPositions'](_0x2c62b0);}get['coordinates'](){const _0x2d219b=[];return this['points']['forEach'](_0x3f9dae=>{_0x2d219b['push'](_0x3f9dae['toArray']());}),_0x2d219b;}get[_0x5997cb(0x1f9)](){const _0x3d85c5={_0x18b423:0x214},_0x458382=_0x5997cb;return this[_0x458382(_0x3d85c5._0x18b423)];}[_0x5997cb(0x218)](_0x1c9640,_0x6f6430){_0x1c9640['positions']&&(this['positions']=_0x1c9640['positions']);}['_mountedHook'](){const _0x4446d5={_0x1b19e8:0x224,_0x5d2ce3:0x1e0},_0x5a57ba=_0x5997cb;this['style']['type']==='image'?this[_0x5a57ba(_0x4446d5._0x1b19e8)]=new mars3d__namespace['layer'][(_0x5a57ba(_0x4446d5._0x5d2ce3))]({'crs':_0x5a57ba(0x1fd),'private':!![]}):this['_layer']=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0x24935e={_0x3e9d60:0x1ed,_0x52f3db:0x224,_0x3bc2b8:0x211,_0x29bbab:0x1fc,_0x4d1bd4:0x20e},_0x2fd4bd=_0x5997cb;this['_map'][_0x2fd4bd(_0x24935e._0x3e9d60)](this[_0x2fd4bd(_0x24935e._0x52f3db)]),this['_container']=mars3d__namespace[_0x2fd4bd(0x1da)]['create'](_0x2fd4bd(_0x24935e._0x3bc2b8),'mars3d-heatmap\x20mars3d-hideDiv',this['_map'][_0x2fd4bd(_0x24935e._0x29bbab)]),this[_0x2fd4bd(0x207)][_0x2fd4bd(0x20e)]&&(this[_0x2fd4bd(_0x24935e._0x4d1bd4)]=this['options'][_0x2fd4bd(0x20e)]),this['options'][_0x2fd4bd(0x220)]&&this['flyToByAnimationEnd']();}['_removedHook'](){const _0x517720={_0x2fd9b8:0x1f1},_0x1811a6=_0x5997cb;this['_container']&&(mars3d__namespace['DomUtil']['remove'](this['_container']),delete this['_container']),this[_0x1811a6(_0x517720._0x2fd9b8)](),this['_map'][_0x1811a6(0x1f8)](this['_layer']);}['addPosition'](_0x36ffa5,_0x57e78e){const _0x3db2c4=_0x5997cb;this['_positions']=this['_positions']||[],this['_positions'][_0x3db2c4(0x21d)](_0x36ffa5),this['_updatePositionsHook'](_0x57e78e);}['setPositions'](_0x28b56a,_0x3700aa){this['_positions']=_0x28b56a,this['_updatePositionsHook'](_0x3700aa);}['clear'](){const _0x546c86={_0x4d4817:0x201},_0x12c243=_0x5997cb;this['_graphic']&&(this[_0x12c243(0x224)]['removeGraphic'](this['_graphic'],!![]),delete this['_graphic']),this[_0x12c243(_0x546c86._0x4d4817)]&&(this['_layer'][_0x12c243(0x203)](this['_graphic2'],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0xfbca6e){const _0x572122={_0x56d69f:0x20e,_0x482c7e:0x225,_0x45694b:0x22e},_0x462ec5=_0x5997cb;if(!this['show']||!this['_map']||!this[_0x462ec5(_0x572122._0x56d69f)]||this['positions'][_0x462ec5(0x22c)]===0x0)return this;const _0x4d676b=this['_getHeatCanvas']();if(this['style']['type']==='image')this['_layer']['setOptions']({'url':_0x4d676b['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style']['arc']?this['_graphic']&&_0xfbca6e?(this['_graphic']['uniforms'][_0x462ec5(_0x572122._0x482c7e)]=_0x4d676b,this['_graphic']['uniforms'][_0x462ec5(_0x572122._0x45694b)]=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x4d676b,this['_graphic2']['uniforms']['bumpMap']=this['_graphic']['uniforms']['bumpMap'])):this['_createArcGraphic'](_0x4d676b):this['_graphic']&&_0xfbca6e?this['_graphic'][_0x462ec5(0x1de)][_0x462ec5(0x225)]=_0x4d676b:this[_0x462ec5(0x20d)](_0x4d676b);return this;}['_createGraphic'](_0x2ca68a){const _0x29901a={_0x1e866c:0x1e2,_0xb3e280:0x215},_0x45d5b3=_0x5997cb;this['clear'](),this[_0x45d5b3(_0x29901a._0x1e866c)]=new mars3d__namespace['graphic'][(_0x45d5b3(_0x29901a._0xb3e280))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x2ca68a},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this['_layer']['addGraphic'](this[_0x45d5b3(0x1e2)]);}['_createArcGraphic'](_0x1fbf66){const _0x5472b5={_0x391e2e:0x1f1,_0x2277b9:0x217,_0x24b7aa:0x1e9,_0x29740a:0x1e9,_0x14034b:0x216,_0x56d2a2:0x1e7,_0x5a689a:0x224},_0x31fde0=_0x5997cb;this[_0x31fde0(_0x5472b5._0x391e2e)]();const _0x37274a=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction'][_0x31fde0(0x1f6)],'frontOperation':{'fail':Cesium[_0x31fde0(_0x5472b5._0x2277b9)][_0x31fde0(_0x5472b5._0x24b7aa)],'zFail':Cesium['StencilOperation'][_0x31fde0(_0x5472b5._0x29740a)],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0x31fde0(_0x5472b5._0x2277b9)]['KEEP'],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x28ed5e=Math['floor'](this['style'][_0x31fde0(0x20b)]??this['_mBoundsMax']*0.02)+0.1;this['style']['diffHeight']&&delete this['style'][_0x31fde0(0x20b)];const _0x670f6a=(this['style']['splitNum'],0x64);let _0x2443e7=Math['max'](this['_rectangle'][_0x31fde0(0x222)],this['_rectangle']['width']);this['style']['granularity']=_0x2443e7/=_0x670f6a;const _0x3707f8=new Cesium[(_0x31fde0(0x1f3))]({'fabric':{'uniforms':{'image':_0x1fbf66,'repeat':new Cesium[(_0x31fde0(_0x5472b5._0x14034b))](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this[_0x31fde0(0x1fa)]()},'source':HeatMaterial},'translucent':!![]}),_0x2ef528=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace[(_0x31fde0(0x1ee))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x31fde0(_0x5472b5._0x56d2a2))]({'flat':!![],'aboveGround':!![],'renderState':_0x37274a,'material':_0x3707f8,'vertexShaderSource':getVertexShaderSource(_0x28ed5e*_0x2ef528)})}),this['_layer']['addGraphic'](this['_graphic']),this[_0x31fde0(0x205)][_0x31fde0(0x20a)]===0x0&&(this['_graphic2']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x31fde0(0x214)],'appearance':new Cesium[(_0x31fde0(0x1e7))]({'flat':!![],'aboveGround':!![],'renderState':_0x37274a,'material':_0x3707f8,'vertexShaderSource':getVertexShaderSource(-_0x28ed5e)})}),this[_0x31fde0(_0x5472b5._0x5a689a)]['addGraphic'](this['_graphic2']));}['getRectangle'](_0x26fe32){return _0x26fe32!==null&&_0x26fe32!==void 0x0&&_0x26fe32['isFormat']&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this['_rectangle']):this['_rectangle'];}[_0x5997cb(0x209)](){const _0x5d8cb5={_0x2f43d9:0x1dd,_0x3c464e:0x1e4,_0x44cd7b:0x207,_0x51700d:0x1d9,_0x2408b8:0x1d9,_0x23dfd4:0x228,_0x5b0640:0x1ff,_0x2282f1:0x1e3,_0x34ec24:0x214,_0x5600ef:0x1ef,_0x228097:0x219,_0x26f975:0x202},_0x85f917={_0x52200d:0x21a,_0x54bb17:0x1dd,_0x39b8c8:0x1ff},_0x273348={_0x280036:0x206,_0xf6ba14:0x207,_0x497cc9:0x1e4,_0x261548:0x1ec},_0xc41b96=_0x5997cb,_0x29fe70=this['_positions'],_0x1045d7=[];let _0x366f0c,_0x5a941b,_0x5feb9d,_0x31f8fb;_0x29fe70['forEach'](_0x5c492f=>{const _0x545e64=_0x453f,_0x47b8ee=mars3d__namespace['LngLatPoint']['parse'](_0x5c492f);if(!_0x47b8ee)return;_0x47b8ee['value']=_0x5c492f[_0x545e64(_0x273348._0x280036)]||0x1,!this[_0x545e64(_0x273348._0xf6ba14)]['rectangle']&&(_0x366f0c===undefined?(_0x366f0c=_0x47b8ee['lng'],_0x5a941b=_0x47b8ee['lng'],_0x5feb9d=_0x47b8ee['lat'],_0x31f8fb=_0x47b8ee['lat']):(_0x366f0c=Math['min'](_0x366f0c,_0x47b8ee['lng']),_0x5a941b=Math['max'](_0x5a941b,_0x47b8ee['lng']),_0x5feb9d=Math[_0x545e64(_0x273348._0x497cc9)](_0x5feb9d,_0x47b8ee['lat']),_0x31f8fb=Math[_0x545e64(_0x273348._0x261548)](_0x31f8fb,_0x47b8ee['lat']))),_0x1045d7['push'](_0x47b8ee);});let _0x5480c5=this['options'][_0xc41b96(0x1f9)]||{'xmin':_0x366f0c,'xmax':_0x5a941b,'ymin':_0x5feb9d,'ymax':_0x31f8fb};const _0x5c6ca7=getMercatorBounds(_0x5480c5),_0x1df1da=Math['abs'](_0x5c6ca7['xmax']-_0x5c6ca7[_0xc41b96(_0x5d8cb5._0x2f43d9)]),_0xaa4fb=Math['abs'](_0x5c6ca7[_0xc41b96(0x1ff)]-_0x5c6ca7['ymin']),_0x49b7bb=Math['max'](_0x1df1da,_0xaa4fb),_0x13b3bf=Math[_0xc41b96(_0x5d8cb5._0x3c464e)](_0x1df1da,_0xaa4fb);this['_mBoundsMax']=_0x49b7bb;let _0x19962f=0x1;if(_0x49b7bb>this['options']['maxCanvasSize'])_0x19962f=_0x49b7bb/this[_0xc41b96(_0x5d8cb5._0x44cd7b)]['maxCanvasSize'],_0x13b3bf/_0x19962f<this['options']['minCanvasSize']&&(_0x19962f=_0x13b3bf/this['options']['minCanvasSize']);else _0x13b3bf<this[_0xc41b96(0x207)][_0xc41b96(_0x5d8cb5._0x51700d)]&&(_0x19962f=_0x13b3bf/this['options'][_0xc41b96(_0x5d8cb5._0x2408b8)],_0x49b7bb/_0x19962f>this['options'][_0xc41b96(_0x5d8cb5._0x23dfd4)]&&(_0x19962f=_0x49b7bb/this['options']['maxCanvasSize']));const _0x33f6c2=this['heatStyle']['radius']*1.5,_0x5b257d=_0x1df1da/_0x19962f+_0x33f6c2*0x2,_0x105c7a=_0xaa4fb/_0x19962f+_0x33f6c2*0x2,_0x1adf9c=_0x33f6c2*_0x19962f;_0x5c6ca7['xmin']-=_0x1adf9c,_0x5c6ca7['ymin']-=_0x1adf9c,_0x5c6ca7['xmax']+=_0x1adf9c,_0x5c6ca7[_0xc41b96(_0x5d8cb5._0x5b0640)]+=_0x1adf9c,this[_0xc41b96(_0x5d8cb5._0x2282f1)]=_0x19962f,_0x5480c5=geLatLngBounds(_0x5c6ca7),this[_0xc41b96(_0x5d8cb5._0x34ec24)]=Cesium[_0xc41b96(0x227)]['fromDegrees'](_0x5480c5['xmin'],_0x5480c5['ymin'],_0x5480c5[_0xc41b96(_0x5d8cb5._0x5600ef)],_0x5480c5['ymax']);let _0x959fe5=_0x1045d7[0x0]['value']??0x1,_0x506991=_0x1045d7[0x0][_0xc41b96(0x206)]??0x0;const _0x1fab3f=[];_0x1045d7['forEach'](_0x54e1d7=>{const _0x4448cc=_0xc41b96,_0x2baac9=mars3d__namespace[_0x4448cc(_0x85f917._0x52200d)]['lonlat2mercator']([_0x54e1d7['lng'],_0x54e1d7[_0x4448cc(0x208)]]),_0x12ddbd=_0x54e1d7['value']||0x1,_0x3a5e18=Math['round']((_0x2baac9[0x0]-_0x5c6ca7[_0x4448cc(_0x85f917._0x54bb17)])/_0x19962f),_0xe34bdc=Math['round']((_0x5c6ca7[_0x4448cc(_0x85f917._0x39b8c8)]-_0x2baac9[0x1])/_0x19962f);_0x959fe5=Math['max'](_0x959fe5,_0x12ddbd),_0x506991=Math['min'](_0x506991,_0x12ddbd),_0x1fab3f['push']({'x':_0x3a5e18,'y':_0xe34bdc,'value':_0x12ddbd});});const _0x5e61a2={'min':this['options'][_0xc41b96(_0x5d8cb5._0x3c464e)]??_0x506991,'max':this['options'][_0xc41b96(0x1ec)]??_0x959fe5,'data':_0x1fab3f};this['_last_heatData']=_0x5e61a2;if(!this[_0xc41b96(0x1f7)]||_0x5c6ca7['xmin']!==this['_last_mBounds']['xmin']||_0x5c6ca7['ymin']!==this['_last_mBounds'][_0xc41b96(0x22d)]||_0x5c6ca7[_0xc41b96(0x1ef)]!==this['_last_mBounds'][_0xc41b96(0x1ef)]||_0x5c6ca7[_0xc41b96(0x1ff)]!==this['_last_mBounds']['ymax']){this['_last_mBounds']=_0x5c6ca7,this['_container'][_0xc41b96(0x205)]['cssText']='width:'+_0x5b257d+_0xc41b96(0x1d8)+_0x105c7a+_0xc41b96(0x200);const _0x41fcbf={...this['heatStyle'],'container':this['_container']};!this['_heat']?this[_0xc41b96(0x223)]=h337__namespace['create'](_0x41fcbf):this['_heat'][_0xc41b96(_0x5d8cb5._0x228097)](_0x41fcbf);}this['_heat'][_0xc41b96(_0x5d8cb5._0x26f975)](_0x5e61a2);const _0x4818ce=mars3d__namespace[_0xc41b96(0x1da)]['copyCanvas'](this[_0xc41b96(0x223)]['_renderer']['canvas']);return _0x4818ce;}[_0x5997cb(0x1fa)](){const _0x497085={_0x1b9161:0x22a},_0x476dc1=_0x5997cb;this['_heat'][_0x476dc1(0x219)]({'radius':this['heatStyle']['radius']*this['style']['arcRadiusScale'],'blur':this[_0x476dc1(0x21e)]['blur']*this['style']['arcBlurScale'],'gradient':this['heatStyle']['gradientArc']||{0.25:_0x476dc1(0x20c),0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x4f25dc=mars3d__namespace['DomUtil'][_0x476dc1(_0x497085._0x1b9161)](this[_0x476dc1(0x223)]['_renderer']['canvas']);return this['_heat']['configure'](this['options'][_0x476dc1(0x21e)]),_0x4f25dc;}['getPointData'](_0x310a97){const _0x5a7b9e={_0x463af7:0x221,_0x3ba806:0x1e3,_0x361ee0:0x1e6,_0x2f2826:0x1fe},_0x590f1a=_0x5997cb,_0x596240=mars3d__namespace['LngLatPoint']['parse'](_0x310a97);if(!_0x596240)return{};const _0x5aa91d=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x596240[_0x590f1a(0x1f5)],_0x596240[_0x590f1a(0x208)]]),_0x20ebee=this['_last_mBounds'],_0x2e4c0b=Math[_0x590f1a(0x221)]((_0x5aa91d[0x0]-_0x20ebee['xmin'])/this[_0x590f1a(0x1e3)]),_0x3df0fa=Math[_0x590f1a(_0x5a7b9e._0x463af7)]((_0x20ebee[_0x590f1a(0x1ff)]-_0x5aa91d[0x1])/this[_0x590f1a(_0x5a7b9e._0x3ba806)]),_0x55b73d=this['_heat']['getValueAt']({'x':_0x2e4c0b,'y':_0x3df0fa}),_0x36f71e=this['_heat'][_0x590f1a(_0x5a7b9e._0x361ee0)]['ctx'][_0x590f1a(_0x5a7b9e._0x2f2826)](_0x2e4c0b-0x1,_0x3df0fa-0x1,0x1,0x1)['data'];return{'x':_0x2e4c0b,'y':_0x3df0fa,'value':_0x55b73d,'color':_0x590f1a(0x213)+_0x36f71e[0x0]+','+_0x36f71e[0x1]+','+_0x36f71e[0x2]+','+_0x36f71e[0x3]+')'};}}mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace[_0x5997cb(0x20f)]['register']('heat',HeatLayer);function getMercatorBounds(_0x1bd2f6){const _0x5f2ff6={_0x28b19c:0x22d},_0x4b966a=_0x5997cb,_0x2ac9e1=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x1bd2f6['xmin'],_0x1bd2f6[_0x4b966a(_0x5f2ff6._0x28b19c)]]),_0x281cee=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x1bd2f6['xmax'],_0x1bd2f6['ymax']]);return{'xmin':_0x2ac9e1[0x0],'ymin':_0x2ac9e1[0x1],'xmax':_0x281cee[0x0],'ymax':_0x281cee[0x1]};}function geLatLngBounds(_0x35ac9d){const _0xc2cb22={_0x15d02f:0x21a},_0x25b6e7=_0x5997cb,_0xccafa6=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x35ac9d['xmin'],_0x35ac9d['ymin']]),_0x93abec=mars3d__namespace[_0x25b6e7(_0xc2cb22._0x15d02f)]['mercator2lonlat']([_0x35ac9d['xmax'],_0x35ac9d['ymax']]);return{'xmin':_0xccafa6[0x0],'ymin':_0xccafa6[0x1],'xmax':_0x93abec[0x0],'ymax':_0x93abec[0x1]};}function getVertexShaderSource(_0x44e8a9){const _0x50b84c={_0x3ac1f8:0x1f2},_0x403eec=_0x5997cb;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'+_0x44e8a9+_0x403eec(_0x50b84c._0x3ac1f8);}exports['HeatLayer']=HeatLayer,Object[_0x5997cb(0x1f0)](exports,'__esModule',{'value':!![]});
14
+ 'use strict';function _0x42e2(_0x25fe9f,_0x5b2401){const _0x1d45f6=_0x1d45();return _0x42e2=function(_0x42e20e,_0x1f71a3){_0x42e20e=_0x42e20e-0x18c;let _0x3a80d6=_0x1d45f6[_0x42e20e];return _0x3a80d6;},_0x42e2(_0x25fe9f,_0x5b2401);}const _0x44291e=_0x42e2;(function(_0x2052f8,_0x16397a){const _0x5bc1fa={_0x4ee35c:0x1d4,_0xfb8741:0x1a7,_0x3542af:0x1a9,_0x3da205:0x199,_0x39d30f:0x195,_0x5c9934:0x1d6},_0x5820bd=_0x42e2,_0x27f4fa=_0x2052f8();while(!![]){try{const _0x3b9e04=parseInt(_0x5820bd(_0x5bc1fa._0x4ee35c))/0x1*(parseInt(_0x5820bd(0x1b1))/0x2)+-parseInt(_0x5820bd(_0x5bc1fa._0xfb8741))/0x3*(parseInt(_0x5820bd(0x197))/0x4)+parseInt(_0x5820bd(_0x5bc1fa._0x3542af))/0x5+parseInt(_0x5820bd(_0x5bc1fa._0x3da205))/0x6+-parseInt(_0x5820bd(0x1ce))/0x7*(-parseInt(_0x5820bd(0x1be))/0x8)+parseInt(_0x5820bd(_0x5bc1fa._0x39d30f))/0x9+-parseInt(_0x5820bd(_0x5bc1fa._0x5c9934))/0xa;if(_0x3b9e04===_0x16397a)break;else _0x27f4fa['push'](_0x27f4fa['shift']());}catch(_0xe9af18){_0x27f4fa['push'](_0x27f4fa['shift']());}}}(_0x1d45,0x95cd3));function _interopNamespace(_0x4b2ccf){const _0x5a46df={_0x3de8ba:0x1e1,_0x4456ad:0x1e5},_0xc1cbca=_0x42e2;if(_0x4b2ccf&&_0x4b2ccf[_0xc1cbca(_0x5a46df._0x3de8ba)])return _0x4b2ccf;var _0x539367=Object['create'](null);return _0x4b2ccf&&Object[_0xc1cbca(_0x5a46df._0x4456ad)](_0x4b2ccf)[_0xc1cbca(0x1b3)](function(_0x26ff11){if(_0x26ff11!=='default'){var _0x426330=Object['getOwnPropertyDescriptor'](_0x4b2ccf,_0x26ff11);Object['defineProperty'](_0x539367,_0x26ff11,_0x426330['get']?_0x426330:{'enumerable':!![],'get':function(){return _0x4b2ccf[_0x26ff11];}});}}),_0x539367['default']=_0x4b2ccf,_0x539367;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial=_0x44291e(0x19c);if(!h337__namespace['create'])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer'][_0x44291e(0x1c3)],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:'blue',0.6:_0x44291e(0x1e4),0.8:_0x44291e(0x1cc),0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance']['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x621d56={}){const _0x5ddbfd={_0x4cb3db:0x1cf,_0x2764a2:0x190},_0x4434ad=_0x44291e;super(_0x621d56),this['options']['maxCanvasSize']=this['options']['maxCanvasSize']??document['body']['clientWidth'],this['options']['maxCanvasSize']=Math['min'](this['options']['maxCanvasSize'],0x1388),this[_0x4434ad(0x190)]['minCanvasSize']=this['options']['minCanvasSize']??document['body'][_0x4434ad(_0x5ddbfd._0x4cb3db)],this['options']['minCanvasSize']=Math['max'](this['options']['minCanvasSize'],0x2bc),this['options'][_0x4434ad(0x1a4)]={...DEF_HEATSTYLE,...this['options']['heatStyle']||{}},this[_0x4434ad(_0x5ddbfd._0x2764a2)][_0x4434ad(0x1dd)]={...DEF_STYLE,...this['options']['style']||{}};}get[_0x44291e(0x193)](){return this['_layer'];}get['heatStyle'](){const _0x151610={_0x17602d:0x1a4},_0x322cbe=_0x44291e;return this['options'][_0x322cbe(_0x151610._0x17602d)];}set['heatStyle'](_0x1013de){const _0x2ca458={_0x329e7d:0x1c8,_0x46ce0e:0x18e},_0x5b540c=_0x44291e;this[_0x5b540c(0x190)][_0x5b540c(0x1a4)]=mars3d__namespace['Util']['merge'](this['options']['heatStyle'],_0x1013de),this[_0x5b540c(_0x2ca458._0x329e7d)]&&(this['_heat']['configure'](this['options']['heatStyle']),this[_0x5b540c(_0x2ca458._0x46ce0e)](!![]));}get['style'](){return this['options']['style'];}set['style'](_0x4210bb){this['options']['style']=mars3d__namespace['Util']['merge'](this['options']['style'],_0x4210bb);}get[_0x44291e(0x1cb)](){return this['_positions'];}set['positions'](_0x5f2d2f){const _0x2f45cb={_0x1e3009:0x18f},_0xb36642=_0x44291e;this[_0xb36642(_0x2f45cb._0x1e3009)](_0x5f2d2f);}get['coordinates'](){const _0x3577f7=[];return this['points']['forEach'](_0x10708a=>{_0x3577f7['push'](_0x10708a['toArray']());}),_0x3577f7;}get[_0x44291e(0x1bd)](){return this['_rectangle'];}[_0x44291e(0x18c)](_0x33001a,_0x2e0de0){const _0x511b46=_0x44291e;_0x33001a[_0x511b46(0x1cb)]&&(this['positions']=_0x33001a[_0x511b46(0x1cb)]);}['_mountedHook'](){const _0x4c597b={_0x5e7386:0x1d3},_0x2eef28=_0x44291e;this[_0x2eef28(0x1dd)][_0x2eef28(0x1b7)]==='image'?this['_layer']=new mars3d__namespace['layer']['ImageLayer']({'crs':_0x2eef28(0x1d7),'private':!![]}):this['_layer']=new mars3d__namespace['layer'][(_0x2eef28(_0x4c597b._0x5e7386))]({'private':!![]});}[_0x44291e(0x18d)](){const _0xeb6eb3=_0x44291e;this[_0xeb6eb3(0x191)]['addLayer'](this['_layer']),this['_container']=mars3d__namespace['DomUtil']['create'](_0xeb6eb3(0x1a5),'mars3d-heatmap\x20mars3d-hideDiv',this['_map']['container']),this['options']['positions']&&(this['positions']=this['options']['positions']),this['options']['flyTo']&&this[_0xeb6eb3(0x1a3)]();}[_0x44291e(0x1c9)](){const _0x299555={_0x2405dc:0x1bf},_0x4c0402=_0x44291e;this['_container']&&(mars3d__namespace['DomUtil']['remove'](this[_0x4c0402(0x1a1)]),delete this[_0x4c0402(0x1a1)]),this[_0x4c0402(0x19b)](),this['_map'][_0x4c0402(_0x299555._0x2405dc)](this['_layer']);}[_0x44291e(0x1db)](_0x435848,_0x371e14){const _0x73d386=_0x44291e;this['_positions']=this[_0x73d386(0x1b4)]||[],this['_positions']['push'](_0x435848),this['_updatePositionsHook'](_0x371e14);}[_0x44291e(0x18f)](_0x54986b,_0x3716a9){this['_positions']=_0x54986b,this['_updatePositionsHook'](_0x3716a9);}['clear'](){const _0x543673={_0x1fbeed:0x1d9,_0xfbecd5:0x1c4,_0x501b3f:0x1d5},_0x39efc6=_0x44291e;this['_graphic']&&(this[_0x39efc6(0x1c4)]['removeGraphic'](this[_0x39efc6(_0x543673._0x1fbeed)],!![]),delete this['_graphic']),this['_graphic2']&&(this[_0x39efc6(_0x543673._0xfbecd5)]['removeGraphic'](this['_graphic2'],!![]),delete this[_0x39efc6(_0x543673._0x501b3f)]);}['_updatePositionsHook'](_0x3b8895){const _0x20d3e7={_0x3485d5:0x1dd,_0x348fc7:0x19d,_0x91c72c:0x1a2,_0x3ebe8c:0x1d5},_0x32a1c1=_0x44291e;if(!this['show']||!this[_0x32a1c1(0x191)]||!this['positions']||this['positions']['length']===0x0)return this;const _0x23f085=this[_0x32a1c1(0x1c6)]();if(this['style']['type']==='image')this['_layer'][_0x32a1c1(0x1ab)]({'url':_0x23f085['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this[_0x32a1c1(_0x20d3e7._0x3485d5)]['opacity']});else this['style']['arc']?this[_0x32a1c1(0x1d9)]&&_0x3b8895?(this[_0x32a1c1(0x1d9)]['uniforms'][_0x32a1c1(_0x20d3e7._0x348fc7)]=_0x23f085,this[_0x32a1c1(0x1d9)][_0x32a1c1(_0x20d3e7._0x91c72c)][_0x32a1c1(0x1bb)]=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x23f085,this[_0x32a1c1(_0x20d3e7._0x3ebe8c)]['uniforms']['bumpMap']=this['_graphic']['uniforms'][_0x32a1c1(0x1bb)])):this['_createArcGraphic'](_0x23f085):this['_graphic']&&_0x3b8895?this['_graphic'][_0x32a1c1(0x1a2)]['image']=_0x23f085:this['_createGraphic'](_0x23f085);return this;}['_createGraphic'](_0x5952c6){const _0x4aaa8d={_0x51ae21:0x1df},_0x2faa64=_0x44291e;this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium[(_0x2faa64(_0x4aaa8d._0x51ae21))]({'fabric':{'uniforms':{'image':_0x5952c6},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x2faa64(0x1c4)]['addGraphic'](this['_graphic']);}['_createArcGraphic'](_0x2e3ee9){const _0x5dedb4={_0x46eaa5:0x198,_0x64bcfa:0x1e0,_0x2b268a:0x1ca,_0x4f218d:0x1c7,_0x2797ba:0x1dd,_0x4106c2:0x1e7,_0x1a7f68:0x1cd,_0x539665:0x1df},_0x10c0f9=_0x44291e;this['clear']();const _0x24d3f1=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium[_0x10c0f9(_0x5dedb4._0x46eaa5)]['ALWAYS'],'frontOperation':{'fail':Cesium[_0x10c0f9(_0x5dedb4._0x64bcfa)]['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium[_0x10c0f9(_0x5dedb4._0x64bcfa)]['REPLACE']},'backFunction':Cesium[_0x10c0f9(0x198)][_0x10c0f9(0x1b9)],'backOperation':{'fail':Cesium[_0x10c0f9(_0x5dedb4._0x64bcfa)][_0x10c0f9(0x1ca)],'zFail':Cesium['StencilOperation'][_0x10c0f9(_0x5dedb4._0x2b268a)],'zPass':Cesium['StencilOperation'][_0x10c0f9(_0x5dedb4._0x4f218d)]},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState'][_0x10c0f9(0x19f)]}),_0x3f5686=Math['floor'](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this[_0x10c0f9(_0x5dedb4._0x2797ba)]['diffHeight']&&delete this['style'][_0x10c0f9(0x194)];const _0x1351a2=(this[_0x10c0f9(0x1dd)][_0x10c0f9(_0x5dedb4._0x4106c2)],0x64);let _0x244a31=Math['max'](this[_0x10c0f9(_0x5dedb4._0x1a7f68)]['height'],this[_0x10c0f9(0x1cd)]['width']);this['style']['granularity']=_0x244a31/=_0x1351a2;const _0x1ab967=new Cesium[(_0x10c0f9(_0x5dedb4._0x539665))]({'fabric':{'uniforms':{'image':_0x2e3ee9,'repeat':new Cesium[(_0x10c0f9(0x1e3))](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x1139fa=this[_0x10c0f9(0x1dd)]['arcDirection']||0x1;this[_0x10c0f9(0x1d9)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x24d3f1,'material':_0x1ab967,'vertexShaderSource':getVertexShaderSource(_0x3f5686*_0x1139fa)})}),this['_layer']['addGraphic'](this['_graphic']),this[_0x10c0f9(_0x5dedb4._0x2797ba)]['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace[(_0x10c0f9(0x1ba))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x24d3f1,'material':_0x1ab967,'vertexShaderSource':getVertexShaderSource(-_0x3f5686)})}),this['_layer']['addGraphic'](this['_graphic2']));}[_0x44291e(0x1a8)](_0xfa7f2b){const _0x422844=_0x44291e;return _0xfa7f2b!==null&&_0xfa7f2b!==void 0x0&&_0xfa7f2b['isFormat']&&this['_rectangle']?mars3d__namespace[_0x422844(0x1d2)]['formatRectangle'](this['_rectangle']):this['_rectangle'];}[_0x44291e(0x1c6)](){const _0x54adcb={_0x8d483d:0x190,_0x30c3c3:0x190,_0x4edb44:0x1a4,_0x26ef1c:0x1cd,_0x30e27c:0x1aa,_0x42ecf5:0x1d1,_0x48f08c:0x1b8,_0x552ed2:0x1a4,_0x322337:0x1c8,_0x50fe10:0x1c2},_0x122fc7={_0x2826f2:0x1bc,_0x245b6a:0x1a0},_0x1a1058={_0x5ed77a:0x1de,_0x437cf7:0x1ad},_0x31f231=_0x44291e,_0x507ad8=this['_positions'],_0x31fa80=[];let _0x2d1f8a,_0x10471d,_0x504e52,_0x351306;_0x507ad8['forEach'](_0x487b4c=>{const _0x4d0804=_0x42e2,_0xcb9695=mars3d__namespace['LngLatPoint']['parse'](_0x487b4c);if(!_0xcb9695)return;_0xcb9695[_0x4d0804(0x1a0)]=_0x487b4c['value']||0x1,!this['options']['rectangle']&&(_0x2d1f8a===undefined?(_0x2d1f8a=_0xcb9695[_0x4d0804(0x1de)],_0x10471d=_0xcb9695['lng'],_0x504e52=_0xcb9695['lat'],_0x351306=_0xcb9695[_0x4d0804(0x1c0)]):(_0x2d1f8a=Math['min'](_0x2d1f8a,_0xcb9695['lng']),_0x10471d=Math[_0x4d0804(0x1ad)](_0x10471d,_0xcb9695[_0x4d0804(_0x1a1058._0x5ed77a)]),_0x504e52=Math[_0x4d0804(0x1b6)](_0x504e52,_0xcb9695['lat']),_0x351306=Math[_0x4d0804(_0x1a1058._0x437cf7)](_0x351306,_0xcb9695['lat']))),_0x31fa80['push'](_0xcb9695);});_0x2d1f8a===_0x10471d&&(_0x2d1f8a-=0.000001,_0x10471d+=0.000001);_0x504e52===_0x351306&&(_0x504e52-=0.000001,_0x351306+=0.000001);let _0x465ae6=this[_0x31f231(0x190)]['rectangle']||{'xmin':_0x2d1f8a,'xmax':_0x10471d,'ymin':_0x504e52,'ymax':_0x351306};const _0x4e3405=getMercatorBounds(_0x465ae6),_0x23558e=Math['abs'](_0x4e3405['xmax']-_0x4e3405['xmin']),_0x4da639=Math['abs'](_0x4e3405['ymax']-_0x4e3405['ymin']),_0x1f8606=Math['max'](_0x23558e,_0x4da639),_0x4981bb=Math['min'](_0x23558e,_0x4da639);this['_mBoundsMax']=_0x1f8606;let _0x39a9c5=0x1;if(_0x1f8606>this['options']['maxCanvasSize'])_0x39a9c5=_0x1f8606/this[_0x31f231(_0x54adcb._0x8d483d)]['maxCanvasSize'],_0x4981bb/_0x39a9c5<this['options']['minCanvasSize']&&(_0x39a9c5=_0x4981bb/this['options']['minCanvasSize']);else _0x4981bb<this[_0x31f231(0x190)]['minCanvasSize']&&(_0x39a9c5=_0x4981bb/this['options'][_0x31f231(0x1b2)],_0x1f8606/_0x39a9c5>this[_0x31f231(_0x54adcb._0x30c3c3)][_0x31f231(0x1ac)]&&(_0x39a9c5=_0x1f8606/this['options']['maxCanvasSize']));const _0x7f97d1=this[_0x31f231(_0x54adcb._0x4edb44)]['radius']*1.5,_0x118b31=_0x23558e/_0x39a9c5+_0x7f97d1*0x2,_0x5c61d2=_0x4da639/_0x39a9c5+_0x7f97d1*0x2,_0x3ab00a=_0x7f97d1*_0x39a9c5;_0x4e3405['xmin']-=_0x3ab00a,_0x4e3405['ymin']-=_0x3ab00a,_0x4e3405['xmax']+=_0x3ab00a,_0x4e3405['ymax']+=_0x3ab00a,this['_scale']=_0x39a9c5,_0x465ae6=geLatLngBounds(_0x4e3405),this[_0x31f231(_0x54adcb._0x26ef1c)]=Cesium['Rectangle']['fromDegrees'](_0x465ae6[_0x31f231(_0x54adcb._0x30e27c)],_0x465ae6[_0x31f231(0x19a)],_0x465ae6[_0x31f231(_0x54adcb._0x42ecf5)],_0x465ae6['ymax']);let _0x1b02fa=_0x31fa80[0x0]['value']??0x1,_0x2fb24b=_0x31fa80[0x0]['value']??0x0;const _0x87a0c1=[];_0x31fa80[_0x31f231(0x1b3)](_0x518017=>{const _0x41e1e0=_0x31f231,_0x201f05=mars3d__namespace['PointTrans'][_0x41e1e0(_0x122fc7._0x2826f2)]([_0x518017['lng'],_0x518017['lat']]),_0x288f9c=_0x518017[_0x41e1e0(_0x122fc7._0x245b6a)]||0x1,_0xa8e247=Math['round']((_0x201f05[0x0]-_0x4e3405[_0x41e1e0(0x1aa)])/_0x39a9c5),_0x2331aa=Math[_0x41e1e0(0x1da)]((_0x4e3405['ymax']-_0x201f05[0x1])/_0x39a9c5);_0x1b02fa=Math['max'](_0x1b02fa,_0x288f9c),_0x2fb24b=Math['min'](_0x2fb24b,_0x288f9c),_0x87a0c1['push']({'x':_0xa8e247,'y':_0x2331aa,'value':_0x288f9c});});const _0x1b35a9={'min':this['options']['min']??_0x2fb24b,'max':this['options']['max']??_0x1b02fa,'data':_0x87a0c1};this['_last_heatData']=_0x1b35a9;if(!this['_last_mBounds']||_0x4e3405['xmin']!==this[_0x31f231(_0x54adcb._0x48f08c)]['xmin']||_0x4e3405['ymin']!==this['_last_mBounds'][_0x31f231(0x19a)]||_0x4e3405[_0x31f231(0x1d1)]!==this['_last_mBounds']['xmax']||_0x4e3405['ymax']!==this['_last_mBounds'][_0x31f231(0x1b0)]){this['_last_mBounds']=_0x4e3405,this[_0x31f231(0x1a1)]['style']['cssText']='width:'+_0x118b31+_0x31f231(0x192)+_0x5c61d2+'px;';const _0x39f674={...this[_0x31f231(_0x54adcb._0x552ed2)],'container':this['_container']};!this['_heat']?this[_0x31f231(_0x54adcb._0x322337)]=h337__namespace['create'](_0x39f674):this['_heat']['configure'](_0x39f674);}this['_heat']['setData'](_0x1b35a9);const _0x29c4d0=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer'][_0x31f231(_0x54adcb._0x50fe10)]);return _0x29c4d0;}[_0x44291e(0x19e)](){const _0x70627={_0x3ff7fa:0x1b5,_0x4fe21f:0x1c5,_0xc58166:0x196,_0x1d7346:0x1c8},_0xbf894d=_0x44291e;this['_heat'][_0xbf894d(_0x70627._0x3ff7fa)]({'radius':this[_0xbf894d(0x1a4)]['radius']*this['style']['arcRadiusScale'],'blur':this['heatStyle']['blur']*this['style']['arcBlurScale'],'gradient':this[_0xbf894d(0x1a4)]['gradientArc']||{0.25:'rgb(0,0,0)',0.55:_0xbf894d(_0x70627._0x4fe21f),0.85:'rgb(216,216,216)',0x1:_0xbf894d(_0x70627._0xc58166)}});const _0x402e3b=mars3d__namespace['DomUtil'][_0xbf894d(0x1c1)](this['_heat']['_renderer']['canvas']);return this[_0xbf894d(_0x70627._0x1d7346)][_0xbf894d(0x1b5)](this['options'][_0xbf894d(0x1a4)]),_0x402e3b;}['getPointData'](_0xa79ad9){const _0xe4b61={_0x16b25a:0x1e6,_0x306203:0x1b0,_0x2394cc:0x1ae,_0x2b1dc5:0x1a6,_0x128d30:0x1e2},_0x24c477=_0x44291e,_0x4906d4=mars3d__namespace[_0x24c477(_0xe4b61._0x16b25a)]['parse'](_0xa79ad9);if(!_0x4906d4)return{};const _0xc8ae57=mars3d__namespace[_0x24c477(0x1af)][_0x24c477(0x1bc)]([_0x4906d4['lng'],_0x4906d4['lat']]),_0x2705c3=this['_last_mBounds'],_0x527b00=Math['round']((_0xc8ae57[0x0]-_0x2705c3['xmin'])/this['_scale']),_0x1c113b=Math['round']((_0x2705c3[_0x24c477(_0xe4b61._0x306203)]-_0xc8ae57[0x1])/this[_0x24c477(_0xe4b61._0x2394cc)]),_0x32b86e=this['_heat'][_0x24c477(0x1d0)]({'x':_0x527b00,'y':_0x1c113b}),_0x271ec6=this['_heat'][_0x24c477(_0xe4b61._0x2b1dc5)]['ctx']['getImageData'](_0x527b00-0x1,_0x1c113b-0x1,0x1,0x1)[_0x24c477(_0xe4b61._0x128d30)];return{'x':_0x527b00,'y':_0x1c113b,'value':_0x32b86e,'color':'rgba('+_0x271ec6[0x0]+','+_0x271ec6[0x1]+','+_0x271ec6[0x2]+','+_0x271ec6[0x3]+')'};}}mars3d__namespace[_0x44291e(0x1dc)]['register']('heat',HeatLayer),mars3d__namespace['layer'][_0x44291e(0x1d8)]=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x511600){const _0x324d89={_0x3a0d35:0x1bc},_0xf63d7c=_0x44291e,_0x3cae58=mars3d__namespace['PointTrans'][_0xf63d7c(_0x324d89._0x3a0d35)]([_0x511600['xmin'],_0x511600['ymin']]),_0x5a8757=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x511600['xmax'],_0x511600['ymax']]);return{'xmin':_0x3cae58[0x0],'ymin':_0x3cae58[0x1],'xmax':_0x5a8757[0x0],'ymax':_0x5a8757[0x1]};}function _0x1d45(){const _0x1c4950=['positions','yellow','_rectangle','8393581GWdHGo','clientHeight','getValueAt','xmax','PolyUtil','GraphicLayer','82xmEkQd','_graphic2','5978850UaCcPd','EPSG:3857','HeatLayer','_graphic','round','addPosition','LayerUtil','style','lng','Material','StencilOperation','__esModule','data','Cartesian2','green','keys','LngLatPoint','splitNum','_setOptionsHook','_addedHook','_updatePositionsHook','setPositions','options','_map','px;height:','layer','diffHeight','2187882KfCszg','rgb(255,255,255)','6808yyIags','StencilFunction','140898pBwBfq','ymin','clear','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','image','_getArcHeatCanvas','ALPHA_BLEND','value','_container','uniforms','flyToByAnimationEnd','heatStyle','div','_renderer','1854GiemMO','getRectangle','3890230ZqIqqR','xmin','setOptions','maxCanvasSize','max','_scale','PointTrans','ymax','478DmepOa','minCanvasSize','forEach','_positions','configure','min','type','_last_mBounds','ALWAYS','graphic','bumpMap','lonlat2mercator','rectangle','8GtobRD','removeLayer','lat','copyCanvas','canvas','BaseLayer','_layer','rgb(140,140,140)','_getHeatCanvas','REPLACE','_heat','_removedHook','KEEP'];_0x1d45=function(){return _0x1c4950;};return _0x1d45();}function geLatLngBounds(_0x3afbcc){const _0x488727=_0x44291e,_0x59070c=mars3d__namespace[_0x488727(0x1af)]['mercator2lonlat']([_0x3afbcc['xmin'],_0x3afbcc['ymin']]),_0x18fa8f=mars3d__namespace[_0x488727(0x1af)]['mercator2lonlat']([_0x3afbcc[_0x488727(0x1d1)],_0x3afbcc[_0x488727(0x1b0)]]);return{'xmin':_0x59070c[0x0],'ymin':_0x59070c[0x1],'xmax':_0x18fa8f[0x0],'ymax':_0x18fa8f[0x1]};}function getVertexShaderSource(_0x11f18c){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'+_0x11f18c+';\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[_0x44291e(0x1d8)]=HeatLayer,Object['defineProperty'](exports,'__esModule',{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-heatmap",
3
- "version": "3.5.10",
3
+ "version": "3.5.11",
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.10"
13
+ "mars3d": "~3.5.11"
14
14
  },
15
15
  "scripts": {
16
16
  "lint": "eslint ./src/**/*.{js,ts} --fix"