mars3d-heatmap 3.5.9 → 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.
package/README.md CHANGED
@@ -33,7 +33,7 @@ Mars3D平台插件, 支持结合heatmap可视化功能插件
33
33
  npm install mars3d --save
34
34
 
35
35
  //安装mars3d插件(按需安装)
36
- npm install mars3d-heatmap --save
36
+ npm install mars3d-heatmap @mars3d/heatmap.js --save
37
37
  ```
38
38
 
39
39
 
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap
3
3
  *
4
- * 版本信息:v3.5.9
5
- * 编译日期:2023-05-29 18:00:49
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 _0x1d34c6=_0x4a6a;function _0x4a6a(_0x520ddf,_0x137f59){const _0x37ce73=_0x37ce();return _0x4a6a=function(_0x4a6ab7,_0x44189a){_0x4a6ab7=_0x4a6ab7-0xf9;let _0x32fc3e=_0x37ce73[_0x4a6ab7];return _0x32fc3e;},_0x4a6a(_0x520ddf,_0x137f59);}(function(_0x3cab92,_0x3ed680){const _0x125036={_0x528b53:0x12a,_0x40e9d7:0x147,_0x338f64:0x12f},_0x58a2e9=_0x4a6a,_0x36ccf3=_0x3cab92();while(!![]){try{const _0x1864c4=parseInt(_0x58a2e9(0xf9))/0x1*(parseInt(_0x58a2e9(_0x125036._0x528b53))/0x2)+parseInt(_0x58a2e9(_0x125036._0x40e9d7))/0x3+-parseInt(_0x58a2e9(0x141))/0x4+-parseInt(_0x58a2e9(0x135))/0x5*(-parseInt(_0x58a2e9(0x151))/0x6)+parseInt(_0x58a2e9(0x143))/0x7+parseInt(_0x58a2e9(0x12b))/0x8+parseInt(_0x58a2e9(_0x125036._0x338f64))/0x9*(-parseInt(_0x58a2e9(0x121))/0xa);if(_0x1864c4===_0x3ed680)break;else _0x36ccf3['push'](_0x36ccf3['shift']());}catch(_0xb82f34){_0x36ccf3['push'](_0x36ccf3['shift']());}}}(_0x37ce,0x65e84));function _interopNamespace(_0x2d3a04){const _0x1eb5e1={_0x17f855:0x11c},_0x791131={_0x2f31f2:0xff,_0x5e05ff:0x146},_0x2287b6=_0x4a6a;if(_0x2d3a04&&_0x2d3a04['__esModule'])return _0x2d3a04;var _0x45c08e=Object['create'](null);return _0x2d3a04&&Object['keys'](_0x2d3a04)[_0x2287b6(_0x1eb5e1._0x17f855)](function(_0x3d4cc2){const _0x265bb0=_0x2287b6;if(_0x3d4cc2!==_0x265bb0(_0x791131._0x2f31f2)){var _0x2a0f68=Object['getOwnPropertyDescriptor'](_0x2d3a04,_0x3d4cc2);Object['defineProperty'](_0x45c08e,_0x3d4cc2,_0x2a0f68[_0x265bb0(_0x791131._0x5e05ff)]?_0x2a0f68:{'enumerable':!![],'get':function(){return _0x2d3a04[_0x3d4cc2];}});}}),_0x45c08e['default']=_0x2d3a04,_0x45c08e;}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[_0x1d34c6(0x114)])throw new Error('请引入\x20heatmap.js\x20库\x20');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:_0x1d34c6(0x125),0.6:_0x1d34c6(0x118),0.8:'yellow',0.9:_0x1d34c6(0x137)}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance']['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x5c4012={}){const _0x23e37c={_0x490bc8:0x126,_0x32279:0x13f,_0x4ce58a:0x145,_0x4358af:0x127,_0x5bb5fe:0x14f},_0x56d87e=_0x1d34c6;super(_0x5c4012),this['options']['maxCanvasSize']=this[_0x56d87e(0x127)]['maxCanvasSize']??document[_0x56d87e(_0x23e37c._0x490bc8)][_0x56d87e(_0x23e37c._0x32279)],this['options'][_0x56d87e(_0x23e37c._0x4ce58a)]=Math['min'](this['options']['maxCanvasSize'],0x1388),this[_0x56d87e(_0x23e37c._0x4358af)][_0x56d87e(_0x23e37c._0x5bb5fe)]=this[_0x56d87e(0x127)][_0x56d87e(0x14f)]??document['body']['clientHeight'],this[_0x56d87e(0x127)]['minCanvasSize']=Math['max'](this['options']['minCanvasSize'],0x2bc),this[_0x56d87e(0x127)]['heatStyle']={...DEF_HEATSTYLE,...this['options'][_0x56d87e(0x109)]||{}},this['options']['style']={...DEF_STYLE,...this['options']['style']||{}};}get[_0x1d34c6(0x10e)](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set[_0x1d34c6(0x109)](_0x4a4108){const _0x2d5085=_0x1d34c6;this['options']['heatStyle']=mars3d__namespace['Util'][_0x2d5085(0x104)](this['options']['heatStyle'],_0x4a4108),this['_heat']&&(this['_heat']['configure'](this['options'][_0x2d5085(0x109)]),this['_updatePositionsHook'](!![]));}get['style'](){const _0x20329e={_0x562ca2:0x11a},_0x217c0b=_0x1d34c6;return this['options'][_0x217c0b(_0x20329e._0x562ca2)];}set[_0x1d34c6(0x11a)](_0x2a1aea){const _0x4373d9={_0x5d77b5:0x127},_0x41e356=_0x1d34c6;this['options']['style']=mars3d__namespace[_0x41e356(0xfb)][_0x41e356(0x104)](this[_0x41e356(_0x4373d9._0x5d77b5)]['style'],_0x2a1aea);}get[_0x1d34c6(0x10c)](){return this['_positions'];}set['positions'](_0x190188){const _0xd6965f=_0x1d34c6;this[_0xd6965f(0x14d)](_0x190188);}get['coordinates'](){const _0x443462={_0x943fdb:0x13b},_0x4c683b=[];return this['points']['forEach'](_0x338454=>{const _0x469934=_0x4a6a;_0x4c683b[_0x469934(_0x443462._0x943fdb)](_0x338454['toArray']());}),_0x4c683b;}get['rectangle'](){return this['_rectangle'];}['_setOptionsHook'](_0x478bab,_0x4e4aea){_0x478bab['positions']&&(this['positions']=_0x478bab['positions']);}[_0x1d34c6(0x129)](){const _0x1fdedc={_0x4f7701:0x10e},_0x596541=_0x1d34c6;this['style']['type']==='image'?this['_layer']=new mars3d__namespace[(_0x596541(_0x1fdedc._0x4f7701))]['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this[_0x596541(0x119)]=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0x12db99={_0x35ea74:0x128,_0xbc28be:0x10c,_0xb3823d:0x150},_0xe5458=_0x1d34c6;this['_map'][_0xe5458(_0x12db99._0x35ea74)](this['_layer']),this['_container']=mars3d__namespace['DomUtil']['create']('div','mars3d-heatmap\x20mars3d-hideDiv',this['_map']['container']),this['options']['positions']&&(this[_0xe5458(_0x12db99._0xbc28be)]=this[_0xe5458(0x127)][_0xe5458(_0x12db99._0xbc28be)]),this['options'][_0xe5458(_0x12db99._0xb3823d)]&&this['flyToByAnimationEnd']();}['_removedHook'](){const _0x590392=_0x1d34c6;this['_container']&&(mars3d__namespace[_0x590392(0x122)][_0x590392(0x14b)](this[_0x590392(0x13e)]),delete this['_container']),this['clear'](),this['_map']['removeLayer'](this['_layer']);}[_0x1d34c6(0x140)](_0x57f06b,_0x26e173){const _0x337d0c={_0x49ae1c:0x14c,_0x110b3e:0xfd},_0x5f38d8=_0x1d34c6;this[_0x5f38d8(_0x337d0c._0x49ae1c)]=this['_positions']||[],this[_0x5f38d8(_0x337d0c._0x49ae1c)]['push'](_0x57f06b),this[_0x5f38d8(_0x337d0c._0x110b3e)](_0x26e173);}['setPositions'](_0x140645,_0x4ffd22){const _0x162455={_0x3ed6e8:0x14c},_0x5c51b8=_0x1d34c6;this[_0x5c51b8(_0x162455._0x3ed6e8)]=_0x140645,this['_updatePositionsHook'](_0x4ffd22);}['clear'](){const _0x102b35={_0x4c89df:0x119,_0x377e85:0x138,_0x1af9d5:0x144},_0x1d631e=_0x1d34c6;this['_graphic']&&(this[_0x1d631e(_0x102b35._0x4c89df)][_0x1d631e(_0x102b35._0x377e85)](this['_graphic'],!![]),delete this[_0x1d631e(_0x102b35._0x1af9d5)]),this[_0x1d631e(0x148)]&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x39aa6f){const _0x5d6a48={_0x4e7c8a:0x124,_0x1884c0:0x139,_0x5a1cfd:0x11a,_0x5bd31d:0x108,_0x3bee83:0x102,_0x5d8e3b:0x144},_0x505e47=_0x1d34c6;if(!this[_0x505e47(0xfc)]||!this[_0x505e47(_0x5d6a48._0x4e7c8a)]||!this[_0x505e47(0x10c)]||this['positions']['length']===0x0)return this;const _0x47779e=this[_0x505e47(0x107)]();if(this['style']['type']==='image')this['_layer']['setOptions']({'url':_0x47779e['toDataURL']('image/png'),'rectangle':this[_0x505e47(0x105)],'opacity':this['style'][_0x505e47(_0x5d6a48._0x1884c0)]});else this[_0x505e47(_0x5d6a48._0x5a1cfd)]['arc']?this[_0x505e47(0x144)]&&_0x39aa6f?(this['_graphic']['uniforms']['image']=_0x47779e,this['_graphic'][_0x505e47(0x111)][_0x505e47(_0x5d6a48._0x5bd31d)]=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x47779e,this['_graphic2']['uniforms']['bumpMap']=this['_graphic']['uniforms'][_0x505e47(0x108)])):this[_0x505e47(_0x5d6a48._0x3bee83)](_0x47779e):this['_graphic']&&_0x39aa6f?this[_0x505e47(_0x5d6a48._0x5d8e3b)]['uniforms'][_0x505e47(0x103)]=_0x47779e:this['_createGraphic'](_0x47779e);return this;}['_createGraphic'](_0x20954e){const _0x3fec52={_0x421c06:0x120,_0x4067d0:0x119},_0x576ec0=_0x1d34c6;this[_0x576ec0(_0x3fec52._0x421c06)](),this[_0x576ec0(0x144)]=new mars3d__namespace['graphic'][(_0x576ec0(0x113))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x576ec0(0x117))]({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x20954e},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x576ec0(_0x3fec52._0x4067d0)]['addGraphic'](this[_0x576ec0(0x144)]);}['_createArcGraphic'](_0x146e30){const _0x5a8ce6={_0x20701b:0x115,_0x51e325:0x106,_0x2bb63a:0x14e,_0x27afaa:0x11a,_0x143509:0x149,_0x3148e9:0x13a,_0x461379:0x144,_0x22967b:0x119,_0x193b9:0x105,_0x3a36ad:0x148},_0x4021aa=_0x1d34c6;this['clear']();const _0x1f44fb=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium[_0x4021aa(_0x5a8ce6._0x20701b)]['ALWAYS'],'frontOperation':{'fail':Cesium[_0x4021aa(_0x5a8ce6._0x51e325)]['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium[_0x4021aa(0x106)]['REPLACE']},'backFunction':Cesium[_0x4021aa(0x115)]['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation'][_0x4021aa(_0x5a8ce6._0x2bb63a)],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium[_0x4021aa(0xfa)]['ALPHA_BLEND']}),_0x8f2e4b=Math['floor'](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this[_0x4021aa(_0x5a8ce6._0x27afaa)][_0x4021aa(_0x5a8ce6._0x143509)]&&delete this['style']['diffHeight'];const _0x38d819=(this['style'][_0x4021aa(_0x5a8ce6._0x3148e9)],0x64);let _0x7c8aa1=Math['max'](this['_rectangle']['height'],this['_rectangle']['width']);this['style']['granularity']=_0x7c8aa1/=_0x38d819;const _0x244dbf=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x146e30,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x56a3b9=this['style']['arcDirection']||0x1;this[_0x4021aa(_0x5a8ce6._0x461379)]=new mars3d__namespace[(_0x4021aa(0x14a))][(_0x4021aa(0x113))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x1f44fb,'material':_0x244dbf,'vertexShaderSource':getVertexShaderSource(_0x8f2e4b*_0x56a3b9)})}),this[_0x4021aa(_0x5a8ce6._0x22967b)]['addGraphic'](this['_graphic']),this['style'][_0x4021aa(0x10a)]===0x0&&(this['_graphic2']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x4021aa(_0x5a8ce6._0x193b9)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x1f44fb,'material':_0x244dbf,'vertexShaderSource':getVertexShaderSource(-_0x8f2e4b)})}),this['_layer']['addGraphic'](this[_0x4021aa(_0x5a8ce6._0x3a36ad)]));}[_0x1d34c6(0x132)](_0x556c36){const _0x12f541=_0x1d34c6;return _0x556c36!==null&&_0x556c36!==void 0x0&&_0x556c36[_0x12f541(0x10b)]&&this[_0x12f541(0x105)]?mars3d__namespace['PolyUtil']['formatRectangle'](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x1b0061={_0x1bbb77:0x12c,_0x19c01a:0x145,_0x2653b9:0x14f,_0x460f1b:0x127,_0x9f912e:0x12e,_0x3434e2:0x105,_0x188886:0x112,_0x13ea08:0x10f,_0x1e855e:0x134,_0x461809:0x13d,_0xffebd4:0x136,_0x55e84f:0x136,_0xd8a5be:0x11b},_0x284235={_0x7d8889:0x12d},_0x3a6f8f=_0x1d34c6,_0x468fe3=this['_positions'],_0x3913c9=[];let _0x4e0f88,_0x42914f,_0xaaba57,_0x3116ac;_0x468fe3['forEach'](_0x516588=>{const _0x3526db=_0x4a6a,_0x247770=mars3d__namespace['LngLatPoint'][_0x3526db(0x10d)](_0x516588);if(!_0x247770)return;_0x247770['value']=_0x516588['value']||0x1,!this['options']['rectangle']&&(_0x4e0f88===undefined?(_0x4e0f88=_0x247770['lng'],_0x42914f=_0x247770['lng'],_0xaaba57=_0x247770[_0x3526db(_0x284235._0x7d8889)],_0x3116ac=_0x247770['lat']):(_0x4e0f88=Math[_0x3526db(0xfe)](_0x4e0f88,_0x247770['lng']),_0x42914f=Math['max'](_0x42914f,_0x247770['lng']),_0xaaba57=Math['min'](_0xaaba57,_0x247770['lat']),_0x3116ac=Math['max'](_0x3116ac,_0x247770['lat']))),_0x3913c9['push'](_0x247770);});let _0xc998ec=this['options']['rectangle']||{'xmin':_0x4e0f88,'xmax':_0x42914f,'ymin':_0xaaba57,'ymax':_0x3116ac};const _0x510faf=getMercatorBounds(_0xc998ec),_0x1af62b=Math['abs'](_0x510faf['xmax']-_0x510faf['xmin']),_0x3bd1f0=Math[_0x3a6f8f(_0x1b0061._0x1bbb77)](_0x510faf[_0x3a6f8f(0x112)]-_0x510faf['ymin']),_0x372034=Math['max'](_0x1af62b,_0x3bd1f0),_0x2ced22=Math['min'](_0x1af62b,_0x3bd1f0);this['_mBoundsMax']=_0x372034;let _0x3cfb76=0x1;if(_0x372034>this['options'][_0x3a6f8f(0x145)])_0x3cfb76=_0x372034/this['options'][_0x3a6f8f(_0x1b0061._0x19c01a)],_0x2ced22/_0x3cfb76<this['options'][_0x3a6f8f(_0x1b0061._0x2653b9)]&&(_0x3cfb76=_0x2ced22/this['options']['minCanvasSize']);else _0x2ced22<this[_0x3a6f8f(_0x1b0061._0x460f1b)][_0x3a6f8f(0x14f)]&&(_0x3cfb76=_0x2ced22/this['options']['minCanvasSize'],_0x372034/_0x3cfb76>this[_0x3a6f8f(0x127)]['maxCanvasSize']&&(_0x3cfb76=_0x372034/this['options']['maxCanvasSize']));const _0x3c89c9=this[_0x3a6f8f(0x109)]['radius']*1.5,_0x83d34b=_0x1af62b/_0x3cfb76+_0x3c89c9*0x2,_0x59c0b6=_0x3bd1f0/_0x3cfb76+_0x3c89c9*0x2,_0x5520fd=_0x3c89c9*_0x3cfb76;_0x510faf[_0x3a6f8f(_0x1b0061._0x9f912e)]-=_0x5520fd,_0x510faf[_0x3a6f8f(0x136)]-=_0x5520fd,_0x510faf[_0x3a6f8f(0x100)]+=_0x5520fd,_0x510faf['ymax']+=_0x5520fd,this['_scale']=_0x3cfb76,_0xc998ec=geLatLngBounds(_0x510faf),this[_0x3a6f8f(_0x1b0061._0x3434e2)]=Cesium[_0x3a6f8f(0x110)]['fromDegrees'](_0xc998ec[_0x3a6f8f(_0x1b0061._0x9f912e)],_0xc998ec['ymin'],_0xc998ec['xmax'],_0xc998ec[_0x3a6f8f(_0x1b0061._0x188886)]);let _0x5c64c8=_0x3913c9[0x0][_0x3a6f8f(0x131)]??0x1,_0x19429b=_0x3913c9[0x0]['value']??0x0;const _0x4d8a0d=[];_0x3913c9['forEach'](_0x4f6eb9=>{const _0x5d64be=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x4f6eb9['lng'],_0x4f6eb9['lat']]),_0x5577c0=_0x4f6eb9['value']||0x1,_0x48d06c=Math['round']((_0x5d64be[0x0]-_0x510faf['xmin'])/_0x3cfb76),_0x20145a=Math['round']((_0x510faf['ymax']-_0x5d64be[0x1])/_0x3cfb76);_0x5c64c8=Math['max'](_0x5c64c8,_0x5577c0),_0x19429b=Math['min'](_0x19429b,_0x5577c0),_0x4d8a0d['push']({'x':_0x48d06c,'y':_0x20145a,'value':_0x5577c0});});const _0x42fdd2={'min':this['options']['min']??_0x19429b,'max':this['options'][_0x3a6f8f(_0x1b0061._0x13ea08)]??_0x5c64c8,'data':_0x4d8a0d};this[_0x3a6f8f(_0x1b0061._0x1e855e)]=_0x42fdd2;if(!this['_last_mBounds']||_0x510faf['xmin']!==this[_0x3a6f8f(_0x1b0061._0x461809)]['xmin']||_0x510faf[_0x3a6f8f(_0x1b0061._0xffebd4)]!==this[_0x3a6f8f(0x13d)][_0x3a6f8f(_0x1b0061._0x55e84f)]||_0x510faf['xmax']!==this['_last_mBounds']['xmax']||_0x510faf['ymax']!==this['_last_mBounds']['ymax']){this['_last_mBounds']=_0x510faf,this['_container']['style']['cssText']='width:'+_0x83d34b+'px;height:'+_0x59c0b6+_0x3a6f8f(0x11e);const _0x335283={...this[_0x3a6f8f(0x109)],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace['create'](_0x335283):this['_heat']['configure'](_0x335283);}this['_heat'][_0x3a6f8f(_0x1b0061._0xd8a5be)](_0x42fdd2);const _0xb18662=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer'][_0x3a6f8f(0x133)]);return _0xb18662;}['_getArcHeatCanvas'](){const _0x9e725a={_0x2b8a40:0x123,_0x1b94de:0x109,_0x55d331:0x11d,_0x1dab78:0x133},_0x897cd7=_0x1d34c6;this['_heat']['configure']({'radius':this['heatStyle'][_0x897cd7(_0x9e725a._0x2b8a40)]*this['style']['arcRadiusScale'],'blur':this[_0x897cd7(_0x9e725a._0x1b94de)]['blur']*this['style']['arcBlurScale'],'gradient':this[_0x897cd7(_0x9e725a._0x1b94de)]['gradientArc']||{0.25:_0x897cd7(_0x9e725a._0x55d331),0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x1ba4e7=mars3d__namespace[_0x897cd7(0x122)][_0x897cd7(0x116)](this['_heat']['_renderer'][_0x897cd7(_0x9e725a._0x1dab78)]);return this['_heat']['configure'](this['options']['heatStyle']),_0x1ba4e7;}['getPointData'](_0x4b7115){const _0xa32317={_0x201ce8:0x11f,_0x5b058:0x12d},_0x438b92=_0x1d34c6,_0xfe49b2=mars3d__namespace[_0x438b92(_0xa32317._0x201ce8)]['parse'](_0x4b7115);if(!_0xfe49b2)return{};const _0xe867f4=mars3d__namespace[_0x438b92(0x130)]['lonlat2mercator']([_0xfe49b2['lng'],_0xfe49b2[_0x438b92(_0xa32317._0x5b058)]]),_0x5120b1=this['_last_mBounds'],_0x44d5f3=Math['round']((_0xe867f4[0x0]-_0x5120b1['xmin'])/this['_scale']),_0x450468=Math['round']((_0x5120b1['ymax']-_0xe867f4[0x1])/this['_scale']),_0x3e11ac=this['_heat']['getValueAt']({'x':_0x44d5f3,'y':_0x450468}),_0x6b0319=this[_0x438b92(0x142)]['_renderer']['ctx']['getImageData'](_0x44d5f3-0x1,_0x450468-0x1,0x1,0x1)['data'];return{'x':_0x44d5f3,'y':_0x450468,'value':_0x3e11ac,'color':'rgba('+_0x6b0319[0x0]+','+_0x6b0319[0x1]+','+_0x6b0319[0x2]+','+_0x6b0319[0x3]+')'};}}mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace[_0x1d34c6(0x13c)]['register']('heat',HeatLayer);function _0x37ce(){const _0xad8d56=['337dzxCHQ','BlendingState','Util','show','_updatePositionsHook','min','default','xmax',';\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','_createArcGraphic','image','merge','_rectangle','StencilOperation','_getHeatCanvas','bumpMap','heatStyle','arcDirection','isFormat','positions','parse','layer','max','Rectangle','uniforms','ymax','RectanglePrimitive','create','StencilFunction','copyCanvas','EllipsoidSurfaceAppearance','green','_layer','style','setData','forEach','rgb(0,0,0)','px;','LngLatPoint','clear','2600630WcglNo','DomUtil','radius','_map','blue','body','options','addLayer','_mountedHook','4878SIetxr','2810320rwNhNG','abs','lat','xmin','36MQBPPg','PointTrans','value','getRectangle','canvas','_last_heatData','1922905YXBcwP','ymin','red','removeGraphic','opacity','splitNum','push','LayerUtil','_last_mBounds','_container','clientWidth','addPosition','1761536WksGot','_heat','1648192FbVQUN','_graphic','maxCanvasSize','get','314334zOyxSZ','_graphic2','diffHeight','graphic','remove','_positions','setPositions','KEEP','minCanvasSize','flyTo','6vtERwj'];_0x37ce=function(){return _0xad8d56;};return _0x37ce();}function getMercatorBounds(_0x418b8e){const _0x473e62=_0x1d34c6,_0x51ca7d=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x418b8e[_0x473e62(0x12e)],_0x418b8e['ymin']]),_0xda2906=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x418b8e['xmax'],_0x418b8e['ymax']]);return{'xmin':_0x51ca7d[0x0],'ymin':_0x51ca7d[0x1],'xmax':_0xda2906[0x0],'ymax':_0xda2906[0x1]};}function geLatLngBounds(_0x4bf585){const _0x3b4e0b=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x4bf585['xmin'],_0x4bf585['ymin']]),_0x487fa2=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x4bf585['xmax'],_0x4bf585['ymax']]);return{'xmin':_0x3b4e0b[0x0],'ymin':_0x3b4e0b[0x1],'xmax':_0x487fa2[0x0],'ymax':_0x487fa2[0x1]};}function getVertexShaderSource(_0x37d61e){const _0x10acd9=_0x1d34c6;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'+_0x37d61e+_0x10acd9(0x101);}exports['HeatLayer']=HeatLayer,Object['defineProperty'](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.9",
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.9"
13
+ "mars3d": "~3.5.11"
14
14
  },
15
15
  "scripts": {
16
16
  "lint": "eslint ./src/**/*.{js,ts} --fix"