mars3d-heatmap 3.6.14 → 3.6.16

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.6.14
5
- * 编译日期:2023-11-27 22:14:18
4
+ * 版本信息:v3.6.16
5
+ * 编译日期:2023-12-12 14:27:06
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 _0x165c22=_0x18a4;(function(_0x8be27d,_0x1de568){const _0x16975c={_0x4bfd37:0x11d,_0x1d5ac2:0x111,_0x2c08f3:0x125,_0xf00de5:0xf2,_0x5a316b:0xff,_0x4af6be:0x11a,_0xfe5902:0x11c},_0x39c2e6=_0x18a4,_0x226b2f=_0x8be27d();while(!![]){try{const _0x4b8614=parseInt(_0x39c2e6(_0x16975c._0x4bfd37))/0x1+-parseInt(_0x39c2e6(_0x16975c._0x1d5ac2))/0x2*(parseInt(_0x39c2e6(0x126))/0x3)+-parseInt(_0x39c2e6(0x128))/0x4+-parseInt(_0x39c2e6(_0x16975c._0x2c08f3))/0x5*(-parseInt(_0x39c2e6(_0x16975c._0xf00de5))/0x6)+parseInt(_0x39c2e6(_0x16975c._0x5a316b))/0x7+parseInt(_0x39c2e6(0xf0))/0x8*(parseInt(_0x39c2e6(0x129))/0x9)+-parseInt(_0x39c2e6(_0x16975c._0x4af6be))/0xa*(parseInt(_0x39c2e6(_0x16975c._0xfe5902))/0xb);if(_0x4b8614===_0x1de568)break;else _0x226b2f['push'](_0x226b2f['shift']());}catch(_0x17f710){_0x226b2f['push'](_0x226b2f['shift']());}}}(_0x1841,0xf17fd));function _interopNamespace(_0x2439fe){const _0x5f5d5c=_0x18a4;if(_0x2439fe&&_0x2439fe['__esModule'])return _0x2439fe;var _0x2d12d3=Object['create'](null);return _0x2439fe&&Object[_0x5f5d5c(0x13e)](_0x2439fe)['forEach'](function(_0x4b10e1){const _0x379210=_0x5f5d5c;if(_0x4b10e1!=='default'){var _0x1dacf0=Object['getOwnPropertyDescriptor'](_0x2439fe,_0x4b10e1);Object['defineProperty'](_0x2d12d3,_0x4b10e1,_0x1dacf0[_0x379210(0x120)]?_0x1dacf0:{'enumerable':!![],'get':function(){return _0x2439fe[_0x4b10e1];}});}}),_0x2d12d3['default']=_0x2439fe,_0x2d12d3;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial='uniform\x20sampler2D\x20image;\x0a\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput)\x20{\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20vec4\x20colorImage\x20=\x20texture(image,\x20st);\x0a\x20\x20if(colorImage.rgb\x20==\x20vec3(1.0)\x20||\x20colorImage.rgb\x20==\x20vec3(0.0))\x20{\x0a\x20\x20\x20\x20discard;\x0a\x20\x20}\x0a\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0a\x20\x20material.alpha\x20=\x20colorImage.a;\x0a\x20\x20return\x20material;\x0a}\x0a';if(!h337__namespace['create'])throw new Error('请引入\x20heatmap.js\x20库\x20');function _0x18a4(_0x103529,_0x4415aa){const _0x1841bb=_0x1841();return _0x18a4=function(_0x18a410,_0x133279){_0x18a410=_0x18a410-0xeb;let _0x46cada=_0x1841bb[_0x18a410];return _0x46cada;},_0x18a4(_0x103529,_0x4415aa);}const Cesium=mars3d__namespace[_0x165c22(0x140)],BaseLayer=mars3d__namespace['layer'][_0x165c22(0x108)],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:'blue',0.6:_0x165c22(0x10e),0.8:'yellow',0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium[_0x165c22(0x13b)][_0x165c22(0x11f)]};class HeatLayer extends BaseLayer{constructor(_0x29b668={}){const _0x5b4b07={_0x43a6e5:0x10f,_0x9d381a:0x10f,_0x3ff128:0xfe},_0x4f2e1c=_0x165c22;super(_0x29b668),this['options']['maxCanvasSize']=this['options']['maxCanvasSize']??document['body'][_0x4f2e1c(0x100)],this[_0x4f2e1c(_0x5b4b07._0x43a6e5)][_0x4f2e1c(0xef)]=Math[_0x4f2e1c(0xee)](this[_0x4f2e1c(_0x5b4b07._0x9d381a)][_0x4f2e1c(0xef)],0x1388),this[_0x4f2e1c(0x10f)]['minCanvasSize']=this['options'][_0x4f2e1c(_0x5b4b07._0x3ff128)]??document['body']['clientHeight'],this['options']['minCanvasSize']=Math['max'](this['options'][_0x4f2e1c(0xfe)],0x2bc),this[_0x4f2e1c(_0x5b4b07._0x9d381a)][_0x4f2e1c(0x132)]={...DEF_HEATSTYLE,...this['options']['heatStyle']},this['options']['style']={...DEF_STYLE,...this['options']['style']};}get['layer'](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set[_0x165c22(0x132)](_0x277986){const _0x40d6da={_0x3fb05f:0x10f},_0x41d9c6=_0x165c22;this[_0x41d9c6(0x10f)]['heatStyle']=mars3d__namespace[_0x41d9c6(0x13f)]['merge'](this['options']['heatStyle'],_0x277986),this['_heat']&&(this['_heat']['configure'](this[_0x41d9c6(_0x40d6da._0x3fb05f)]['heatStyle']),this['_updatePositionsHook'](!![]));}get['style'](){return this['options']['style'];}set[_0x165c22(0x138)](_0xeb690d){const _0x564b5f={_0xf1685b:0x13f},_0x59b9e6=_0x165c22;this['options'][_0x59b9e6(0x138)]=mars3d__namespace[_0x59b9e6(_0x564b5f._0xf1685b)]['merge'](this['options']['style'],_0xeb690d);}get['positions'](){return this['_positions'];}set['positions'](_0x23bdcf){this['setPositions'](_0x23bdcf);}get['coordinates'](){const _0x58a5a2={_0x2754bb:0x12b},_0x41fb42=[];return this['points']['forEach'](_0x243012=>{const _0x844348=_0x18a4;_0x41fb42['push'](_0x243012[_0x844348(_0x58a5a2._0x2754bb)]());}),_0x41fb42;}get[_0x165c22(0x122)](){return this['_rectangle'];}['_setOptionsHook'](_0x3ab4fd,_0x264f9b){_0x3ab4fd['positions']&&(this['positions']=_0x3ab4fd['positions']);}[_0x165c22(0xeb)](){const _0x3f91e6={_0x53e81b:0x138},_0x2c41f6=_0x165c22;this[_0x2c41f6(_0x3f91e6._0x53e81b)]['type']==='image'?this['_layer']=new mars3d__namespace['layer']['ImageLayer']({'crs':_0x2c41f6(0x106),'private':!![]}):this['_layer']=new mars3d__namespace[(_0x2c41f6(0xf6))][(_0x2c41f6(0x12a))]({'private':!![]});}['_addedHook'](){const _0xc72435={_0x579d54:0x10b,_0xed23ec:0xf9,_0x2fc661:0x13c},_0x1c873d=_0x165c22;this['_map']['addLayer'](this['_layer']),this['_container']=mars3d__namespace['DomUtil'][_0x1c873d(0x107)]('div',_0x1c873d(_0xc72435._0x579d54),this[_0x1c873d(_0xc72435._0xed23ec)]['container']),this['options']['positions']&&(this['positions']=this[_0x1c873d(0x10f)][_0x1c873d(_0xc72435._0x2fc661)]),this['options'][_0x1c873d(0x124)]&&this['flyToByAnimationEnd']();}[_0x165c22(0x139)](){const _0x16d555={_0x22d879:0x12d},_0x27e06a=_0x165c22;this[_0x27e06a(_0x16d555._0x22d879)]&&(mars3d__namespace['DomUtil']['remove'](this['_container']),delete this['_container']),this['clear'](),this['_map']['removeLayer'](this['_layer']);}['addPosition'](_0xc96b60,_0x1c0bfb){const _0x3e47b9=_0x165c22;this['_positions']=this['_positions']||[],this['_positions'][_0x3e47b9(0x113)](_0xc96b60),this['_updatePositionsHook'](_0x1c0bfb);}['setPositions'](_0x5f21a9,_0x3c140d){const _0x3ec2ec=_0x165c22;this['_positions']=_0x5f21a9,this[_0x3ec2ec(0x102)](_0x3c140d);}['clear'](){const _0x1345ba={_0x460894:0x13d},_0x5e5e5d=_0x165c22;this['_graphic']&&(this['_layer']['removeGraphic'](this['_graphic'],!![]),delete this['_graphic']),this[_0x5e5e5d(_0x1345ba._0x460894)]&&(this['_layer']['removeGraphic'](this[_0x5e5e5d(0x13d)],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x1cf302){const _0x3a602f={_0x169588:0xf9,_0x106086:0xf1,_0x3cb737:0x101,_0x1ea5ec:0x12f},_0x4ec698=_0x165c22;if(!this['show']||!this[_0x4ec698(_0x3a602f._0x169588)]||!this['positions']||this['positions'][_0x4ec698(_0x3a602f._0x106086)]===0x0)return this;const _0x7183b1=this['_getHeatCanvas']();if(this[_0x4ec698(0x138)][_0x4ec698(0x11e)]===_0x4ec698(0x127))this['_layer']['setOptions']({'url':_0x7183b1['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style']['arc']?this['_graphic']&&_0x1cf302?(this[_0x4ec698(_0x3a602f._0x3cb737)]['uniforms']['image']=_0x7183b1,this[_0x4ec698(0x101)]['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x7183b1,this['_graphic2'][_0x4ec698(_0x3a602f._0x1ea5ec)][_0x4ec698(0x123)]=this[_0x4ec698(0x101)]['uniforms']['bumpMap'])):this['_createArcGraphic'](_0x7183b1):this['_graphic']&&_0x1cf302?this[_0x4ec698(0x101)]['uniforms']['image']=_0x7183b1:this['_createGraphic'](_0x7183b1);return this;}['_createGraphic'](_0xb8983e){const _0x27c70c={_0x5c3e52:0x11b,_0x2a65e2:0x135},_0x392b36=_0x165c22;this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x392b36(0xed)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium[(_0x392b36(_0x27c70c._0x5c3e52))]({'fabric':{'uniforms':{'image':_0xb8983e},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x392b36(_0x27c70c._0x2a65e2)]['addGraphic'](this['_graphic']);}['_createArcGraphic'](_0x14b969){const _0x19bdbb={_0x41bfc3:0x10c,_0x39c48:0x105,_0x515bc8:0x116,_0x19e676:0x138,_0x238dc6:0xed,_0x284d65:0x117,_0x48b7b9:0xf5,_0x5acf23:0x135,_0x5af661:0x112},_0x7f9028=_0x165c22;this[_0x7f9028(_0x19bdbb._0x41bfc3)]();const _0x465ab4=Cesium['RenderState'][_0x7f9028(0xfa)]({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium[_0x7f9028(0x10a)]['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation'][_0x7f9028(_0x19bdbb._0x39c48)]},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState'][_0x7f9028(0x109)]}),_0x172e76=Math['floor'](this[_0x7f9028(0x138)][_0x7f9028(_0x19bdbb._0x515bc8)]??this['_mBoundsMax']*0.02)+0.1;this[_0x7f9028(0x138)][_0x7f9028(_0x19bdbb._0x515bc8)]&&delete this[_0x7f9028(_0x19bdbb._0x19e676)]['diffHeight'];const _0x536f0f=(this['style']['splitNum'],0x64);let _0x48b459=Math[_0x7f9028(0x136)](this['_rectangle']['height'],this[_0x7f9028(_0x19bdbb._0x238dc6)]['width']);this[_0x7f9028(0x138)]['granularity']=_0x48b459/=_0x536f0f;const _0x23dbfd=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x14b969,'repeat':new Cesium[(_0x7f9028(_0x19bdbb._0x284d65))](0x1,0x1),'color':new Cesium[(_0x7f9028(_0x19bdbb._0x48b7b9))](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x2c7bd8=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace[(_0x7f9028(0xf3))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x465ab4,'material':_0x23dbfd,'vertexShaderSource':getVertexShaderSource(_0x172e76*_0x2c7bd8)})}),this[_0x7f9028(_0x19bdbb._0x5acf23)][_0x7f9028(0x110)](this['_graphic']),this[_0x7f9028(0x138)]['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace[(_0x7f9028(0xf3))][(_0x7f9028(_0x19bdbb._0x5af661))]({...this['options'],'rectangle':this[_0x7f9028(_0x19bdbb._0x238dc6)],'appearance':new Cesium[(_0x7f9028(0x13b))]({'flat':!![],'aboveGround':!![],'renderState':_0x465ab4,'material':_0x23dbfd,'vertexShaderSource':getVertexShaderSource(-_0x172e76)})}),this['_layer']['addGraphic'](this[_0x7f9028(0x13d)]));}['getRectangle'](_0x2fc7b2){const _0x22d1ad=_0x165c22;return _0x2fc7b2!==null&&_0x2fc7b2!==void 0x0&&_0x2fc7b2['isFormat']&&this['_rectangle']?mars3d__namespace[_0x22d1ad(0xec)][_0x22d1ad(0x114)](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x5b9c6d={_0xd79602:0x12e,_0x419d2c:0x137,_0x4e9d75:0xef,_0x2633ab:0xef,_0x2d1455:0x10f,_0x1cf865:0x137,_0x494a3c:0x115,_0x293b48:0x130,_0x177ed6:0x10d,_0x1258eb:0x136,_0x103a37:0xf4,_0x4ecac8:0x103,_0x269d4c:0x107,_0x5545cd:0x104},_0x6859c3={_0x5523d7:0x121,_0x1f7496:0x10d,_0x37f636:0x12e},_0x399606={_0x56dd71:0xf7,_0x5db745:0xee,_0x3bb5d7:0x119},_0x1926da=_0x165c22,_0x3791b9=this['_positions'],_0x2522bf=[];let _0x463f7d,_0x3f820c,_0x36d1c8,_0x39a7b7;_0x3791b9['forEach'](_0x203ce3=>{const _0x348e60=_0x18a4,_0x1a1ac4=mars3d__namespace['LngLatPoint']['parse'](_0x203ce3);if(!_0x1a1ac4)return;_0x1a1ac4['value']=_0x203ce3['value']||0x1,!this[_0x348e60(0x10f)][_0x348e60(0x122)]&&(_0x463f7d===undefined?(_0x463f7d=_0x1a1ac4['lng'],_0x3f820c=_0x1a1ac4[_0x348e60(_0x399606._0x56dd71)],_0x36d1c8=_0x1a1ac4['lat'],_0x39a7b7=_0x1a1ac4['lat']):(_0x463f7d=Math[_0x348e60(_0x399606._0x5db745)](_0x463f7d,_0x1a1ac4['lng']),_0x3f820c=Math['max'](_0x3f820c,_0x1a1ac4['lng']),_0x36d1c8=Math['min'](_0x36d1c8,_0x1a1ac4[_0x348e60(_0x399606._0x3bb5d7)]),_0x39a7b7=Math[_0x348e60(0x136)](_0x39a7b7,_0x1a1ac4['lat']))),_0x2522bf['push'](_0x1a1ac4);});_0x463f7d===_0x3f820c&&(_0x463f7d-=0.000001,_0x3f820c+=0.000001);_0x36d1c8===_0x39a7b7&&(_0x36d1c8-=0.000001,_0x39a7b7+=0.000001);let _0x35e7eb=this['options']['rectangle']||{'xmin':_0x463f7d,'xmax':_0x3f820c,'ymin':_0x36d1c8,'ymax':_0x39a7b7};const _0x1088e7=getMercatorBounds(_0x35e7eb),_0x3cbe07=Math['abs'](_0x1088e7['xmax']-_0x1088e7['xmin']),_0xb3ec38=Math['abs'](_0x1088e7[_0x1926da(_0x5b9c6d._0xd79602)]-_0x1088e7[_0x1926da(_0x5b9c6d._0x419d2c)]),_0x125891=Math['max'](_0x3cbe07,_0xb3ec38),_0x1348db=Math[_0x1926da(0xee)](_0x3cbe07,_0xb3ec38);this['_mBoundsMax']=_0x125891;let _0x39b3ab=0x1;if(_0x125891>this['options'][_0x1926da(_0x5b9c6d._0x4e9d75)])_0x39b3ab=_0x125891/this[_0x1926da(0x10f)][_0x1926da(_0x5b9c6d._0x2633ab)],_0x1348db/_0x39b3ab<this['options']['minCanvasSize']&&(_0x39b3ab=_0x1348db/this['options']['minCanvasSize']);else _0x1348db<this['options'][_0x1926da(0xfe)]&&(_0x39b3ab=_0x1348db/this[_0x1926da(_0x5b9c6d._0x2d1455)]['minCanvasSize'],_0x125891/_0x39b3ab>this[_0x1926da(_0x5b9c6d._0x2d1455)]['maxCanvasSize']&&(_0x39b3ab=_0x125891/this['options'][_0x1926da(0xef)]));const _0x443014=this['heatStyle']['radius']*1.5,_0xfa1143=_0x3cbe07/_0x39b3ab+_0x443014*0x2,_0x24e295=_0xb3ec38/_0x39b3ab+_0x443014*0x2,_0x4e326d=_0x443014*_0x39b3ab;_0x1088e7['xmin']-=_0x4e326d,_0x1088e7[_0x1926da(_0x5b9c6d._0x1cf865)]-=_0x4e326d,_0x1088e7['xmax']+=_0x4e326d,_0x1088e7['ymax']+=_0x4e326d,this[_0x1926da(_0x5b9c6d._0x494a3c)]=_0x39b3ab,_0x35e7eb=geLatLngBounds(_0x1088e7),this[_0x1926da(0xed)]=Cesium[_0x1926da(_0x5b9c6d._0x293b48)][_0x1926da(0x134)](_0x35e7eb[_0x1926da(_0x5b9c6d._0x177ed6)],_0x35e7eb['ymin'],_0x35e7eb['xmax'],_0x35e7eb['ymax']);let _0x253301=_0x2522bf[0x0][_0x1926da(0xfb)]??0x1,_0x1fbba6=_0x2522bf[0x0]['value']??0x0;const _0x3d201b=[];_0x2522bf['forEach'](_0x581cf0=>{const _0x299f70=_0x1926da,_0x4b622d=mars3d__namespace[_0x299f70(_0x6859c3._0x5523d7)]['lonlat2mercator']([_0x581cf0['lng'],_0x581cf0[_0x299f70(0x119)]]),_0x5ac0ed=_0x581cf0['value']||0x1,_0x59391d=Math['round']((_0x4b622d[0x0]-_0x1088e7[_0x299f70(_0x6859c3._0x1f7496)])/_0x39b3ab),_0x5bc216=Math['round']((_0x1088e7[_0x299f70(_0x6859c3._0x37f636)]-_0x4b622d[0x1])/_0x39b3ab);_0x253301=Math[_0x299f70(0x136)](_0x253301,_0x5ac0ed),_0x1fbba6=Math['min'](_0x1fbba6,_0x5ac0ed),_0x3d201b['push']({'x':_0x59391d,'y':_0x5bc216,'value':_0x5ac0ed});});const _0x2ffc0c={'min':this['options']['min']??_0x1fbba6,'max':this['options'][_0x1926da(_0x5b9c6d._0x1258eb)]??_0x253301,'data':_0x3d201b};this['_last_heatData']=_0x2ffc0c;if(!this['_last_mBounds']||_0x1088e7['xmin']!==this['_last_mBounds']['xmin']||_0x1088e7['ymin']!==this['_last_mBounds']['ymin']||_0x1088e7['xmax']!==this[_0x1926da(_0x5b9c6d._0x103a37)]['xmax']||_0x1088e7['ymax']!==this['_last_mBounds'][_0x1926da(0x12e)]){this['_last_mBounds']=_0x1088e7,this[_0x1926da(0x12d)]['style']['cssText']='width:'+_0xfa1143+'px;height:'+_0x24e295+'px;';const _0x388285={...this[_0x1926da(0x132)],'container':this['_container']};!this[_0x1926da(_0x5b9c6d._0x4ecac8)]?this['_heat']=h337__namespace[_0x1926da(_0x5b9c6d._0x269d4c)](_0x388285):this['_heat']['configure'](_0x388285);}this['_heat']['setData'](_0x2ffc0c);const _0xc631ee=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat'][_0x1926da(0x118)][_0x1926da(_0x5b9c6d._0x5545cd)]);return _0xc631ee;}[_0x165c22(0x131)](){const _0x18f72d={_0x3c154a:0x12c,_0x310138:0xfd},_0x288d73=_0x165c22;this[_0x288d73(0x103)]['configure']({'radius':this['heatStyle'][_0x288d73(_0x18f72d._0x3c154a)]*this['style']['arcRadiusScale'],'blur':this[_0x288d73(0x132)]['blur']*this['style']['arcBlurScale'],'gradient':this['heatStyle']['gradientArc']||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:_0x288d73(_0x18f72d._0x310138),0x1:'rgb(255,255,255)'}});const _0x50e63d=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return this['_heat']['configure'](this['options']['heatStyle']),_0x50e63d;}['getPointData'](_0x36eab8){const _0x10af99={_0x33023e:0x118},_0x369016=_0x165c22,_0x5aaad4=mars3d__namespace[_0x369016(0x133)]['parse'](_0x36eab8);if(!_0x5aaad4)return{};const _0x5e3b50=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5aaad4['lng'],_0x5aaad4['lat']]),_0x5a291b=this['_last_mBounds'],_0x5edec5=Math['round']((_0x5e3b50[0x0]-_0x5a291b[_0x369016(0x10d)])/this[_0x369016(0x115)]),_0x5076b7=Math['round']((_0x5a291b['ymax']-_0x5e3b50[0x1])/this['_scale']),_0x37712e=this['_heat']['getValueAt']({'x':_0x5edec5,'y':_0x5076b7}),_0x22b61a=this['_heat'][_0x369016(_0x10af99._0x33023e)]['ctx']['getImageData'](_0x5edec5-0x1,_0x5076b7-0x1,0x1,0x1)['data'];return{'x':_0x5edec5,'y':_0x5076b7,'value':_0x37712e,'color':'rgba('+_0x22b61a[0x0]+','+_0x22b61a[0x1]+','+_0x22b61a[0x2]+','+_0x22b61a[0x3]+')'};}}mars3d__namespace['LayerUtil']['register']('heat',HeatLayer),mars3d__namespace[_0x165c22(0xf6)]['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x5eef29){const _0x25cf70=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5eef29['xmin'],_0x5eef29['ymin']]),_0xc15b0f=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5eef29['xmax'],_0x5eef29['ymax']]);return{'xmin':_0x25cf70[0x0],'ymin':_0x25cf70[0x1],'xmax':_0xc15b0f[0x0],'ymax':_0xc15b0f[0x1]};}function _0x1841(){const _0x1acdf7=['Color','layer','lng','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','_map','fromCache','value','xmax','rgb(216,216,216)','minCanvasSize','6400331UWADax','clientWidth','_graphic','_updatePositionsHook','_heat','canvas','REPLACE','EPSG:3857','create','BaseLayer','ALPHA_BLEND','StencilOperation','mars3d-heatmap\x20mars3d-hideDiv','clear','xmin','green','options','addGraphic','18VoVhwO','RectanglePrimitive','push','formatRectangle','_scale','diffHeight','Cartesian2','_renderer','lat','14302970vGmWHb','Material','11UBCLCe','349540Easofk','type','VERTEX_FORMAT','get','PointTrans','rectangle','bumpMap','flyTo','8590ctCoLB','212082mzcTZY','image','6434768OmUvko','549ipkdin','GraphicLayer','toArray','radius','_container','ymax','uniforms','Rectangle','_getArcHeatCanvas','heatStyle','LngLatPoint','fromDegrees','_layer','max','ymin','style','_removedHook','HeatLayer','EllipsoidSurfaceAppearance','positions','_graphic2','keys','Util','Cesium','_mountedHook','PolyUtil','_rectangle','min','maxCanvasSize','193624gnULDJ','length','6720jkGyYS','graphic','_last_mBounds'];_0x1841=function(){return _0x1acdf7;};return _0x1841();}function geLatLngBounds(_0xeb7bf){const _0x38cf4a=_0x165c22,_0x9633a=mars3d__namespace['PointTrans']['mercator2lonlat']([_0xeb7bf['xmin'],_0xeb7bf['ymin']]),_0x43e90a=mars3d__namespace['PointTrans']['mercator2lonlat']([_0xeb7bf[_0x38cf4a(0xfc)],_0xeb7bf['ymax']]);return{'xmin':_0x9633a[0x0],'ymin':_0x9633a[0x1],'xmax':_0x43e90a[0x0],'ymax':_0x43e90a[0x1]};}function getVertexShaderSource(_0x2dfcb0){const _0x4d8e9f={_0x209c7d:0xf8},_0x3be015=_0x165c22;return _0x3be015(_0x4d8e9f._0x209c7d)+_0x2dfcb0+';\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[_0x165c22(0x13a)]=HeatLayer,Object['defineProperty'](exports,'__esModule',{'value':!![]});
14
+ 'use strict';const _0x408f7a=_0x19f0;(function(_0x504fcd,_0x59cdb3){const _0x2d90c4={_0x2ef496:0x1ec,_0x5449d0:0x1f9,_0x2858be:0x211,_0x29f2f5:0x1ef,_0x362e3e:0x220,_0x141d8f:0x1f4,_0x5408ab:0x20d},_0x4bee18=_0x19f0,_0x338f4b=_0x504fcd();while(!![]){try{const _0x176b93=parseInt(_0x4bee18(_0x2d90c4._0x2ef496))/0x1+parseInt(_0x4bee18(_0x2d90c4._0x5449d0))/0x2*(parseInt(_0x4bee18(_0x2d90c4._0x2858be))/0x3)+-parseInt(_0x4bee18(0x1eb))/0x4+-parseInt(_0x4bee18(_0x2d90c4._0x29f2f5))/0x5+-parseInt(_0x4bee18(_0x2d90c4._0x362e3e))/0x6*(-parseInt(_0x4bee18(_0x2d90c4._0x141d8f))/0x7)+-parseInt(_0x4bee18(0x225))/0x8*(-parseInt(_0x4bee18(0x1de))/0x9)+parseInt(_0x4bee18(_0x2d90c4._0x5408ab))/0xa*(-parseInt(_0x4bee18(0x20b))/0xb);if(_0x176b93===_0x59cdb3)break;else _0x338f4b['push'](_0x338f4b['shift']());}catch(_0x435761){_0x338f4b['push'](_0x338f4b['shift']());}}}(_0x2e67,0x48dd2));function _interopNamespace(_0x38e6d0){const _0x25cba9={_0xf155df:0x21f,_0x210995:0x235},_0x4ff2f3=_0x19f0;if(_0x38e6d0&&_0x38e6d0['__esModule'])return _0x38e6d0;var _0x191b21=Object[_0x4ff2f3(0x1fa)](null);return _0x38e6d0&&Object['keys'](_0x38e6d0)['forEach'](function(_0x58f22a){const _0x504cb6=_0x4ff2f3;if(_0x58f22a!==_0x504cb6(_0x25cba9._0xf155df)){var _0x38ca57=Object['getOwnPropertyDescriptor'](_0x38e6d0,_0x58f22a);Object['defineProperty'](_0x191b21,_0x58f22a,_0x38ca57[_0x504cb6(_0x25cba9._0x210995)]?_0x38ca57:{'enumerable':!![],'get':function(){return _0x38e6d0[_0x58f22a];}});}}),_0x191b21['default']=_0x38e6d0,_0x191b21;}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 _0x19f0(_0x46ee1e,_0x54eda5){const _0x2e678c=_0x2e67();return _0x19f0=function(_0x19f00e,_0xd21d16){_0x19f00e=_0x19f00e-0x1dd;let _0x4a9b58=_0x2e678c[_0x19f00e];return _0x4a9b58;},_0x19f0(_0x46ee1e,_0x54eda5);}if(!h337__namespace['create'])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x408f7a(0x230)]['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:_0x408f7a(0x1ed),0.6:'green',0.8:'yellow',0.9:_0x408f7a(0x1fb)}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance'][_0x408f7a(0x1e7)]};function _0x2e67(){const _0x39c709=['_rectangle','heatStyle','rgb(216,216,216)','px;','minCanvasSize','merge','ALPHA_BLEND','_last_heatData','canvas','splitNum','addGraphic','_getArcHeatCanvas','DomUtil','11edERMs','_last_mBounds','4478150CDLJTL','setData','flyToByAnimationEnd','addPosition','3bOGoKQ','LngLatPoint','KEEP','_graphic','forEach','lonlat2mercator','maxCanvasSize','arcRadiusScale','min','_createGraphic','xmin','xmax','removeGraphic','configure','default','129834iZmBIg','Util','_mBoundsMax','options','PointTrans','8jbFMfU','_graphic2','_layer','_map','_container','abs','floor','_scale','diffHeight','uniforms','remove','layer','lat','RenderState','max','graphic','get','image','clientWidth','5201559WXVLiQ','addLayer','_updatePositionsHook','clientHeight','_heat','div','image/png','getPointData','rgba(','VERTEX_FORMAT','lng','StencilOperation','_createArcGraphic','2024412Flsktr','130813OnwObm','blue','style','278870xNTKMY','round','defineProperty','RectanglePrimitive','clear','161vsLTCd','ymax','getValueAt','bumpMap','container','203362TNWUnT','create','red','positions','mercator2lonlat'];_0x2e67=function(){return _0x39c709;};return _0x2e67();}class HeatLayer extends BaseLayer{constructor(_0x46af8d={}){const _0x334eb6={_0x4ff37c:0x1dd,_0x15e56f:0x219,_0x507542:0x217,_0x29a0d5:0x1e1,_0x22c4e3:0x233,_0x1dd38a:0x1ee},_0x4c111d=_0x408f7a;super(_0x46af8d),this['options']['maxCanvasSize']=this['options']['maxCanvasSize']??document['body'][_0x4c111d(_0x334eb6._0x4ff37c)],this[_0x4c111d(0x223)][_0x4c111d(0x217)]=Math[_0x4c111d(_0x334eb6._0x15e56f)](this['options'][_0x4c111d(_0x334eb6._0x507542)],0x1388),this['options']['minCanvasSize']=this['options'][_0x4c111d(0x202)]??document['body'][_0x4c111d(_0x334eb6._0x29a0d5)],this['options']['minCanvasSize']=Math[_0x4c111d(_0x334eb6._0x22c4e3)](this['options']['minCanvasSize'],0x2bc),this[_0x4c111d(0x223)]['heatStyle']={...DEF_HEATSTYLE,...this['options']['heatStyle']},this[_0x4c111d(0x223)]['style']={...DEF_STYLE,...this[_0x4c111d(0x223)][_0x4c111d(_0x334eb6._0x1dd38a)]};}get['layer'](){return this['_layer'];}get['heatStyle'](){const _0x3e7cf7={_0x5a077c:0x1ff},_0x48f847=_0x408f7a;return this['options'][_0x48f847(_0x3e7cf7._0x5a077c)];}set['heatStyle'](_0x545ada){const _0x1471d1={_0xa54854:0x221,_0x2a8e1b:0x21e,_0x277628:0x1ff},_0x5cfd32=_0x408f7a;this['options']['heatStyle']=mars3d__namespace[_0x5cfd32(_0x1471d1._0xa54854)][_0x5cfd32(0x203)](this['options']['heatStyle'],_0x545ada),this['_heat']&&(this[_0x5cfd32(0x1e2)][_0x5cfd32(_0x1471d1._0x2a8e1b)](this[_0x5cfd32(0x223)][_0x5cfd32(_0x1471d1._0x277628)]),this[_0x5cfd32(0x1e0)](!![]));}get['style'](){const _0x2072a1=_0x408f7a;return this[_0x2072a1(0x223)]['style'];}set['style'](_0x2ad042){const _0x28d3da={_0x21103d:0x223},_0x67ec45=_0x408f7a;this[_0x67ec45(_0x28d3da._0x21103d)]['style']=mars3d__namespace[_0x67ec45(0x221)]['merge'](this['options']['style'],_0x2ad042);}get[_0x408f7a(0x1fc)](){return this['_positions'];}set['positions'](_0x5b62ab){this['setPositions'](_0x5b62ab);}get['coordinates'](){const _0x2633b5=_0x408f7a,_0x1d6efb=[];return this['points'][_0x2633b5(0x215)](_0x44b148=>{_0x1d6efb['push'](_0x44b148['toArray']());}),_0x1d6efb;}get['rectangle'](){const _0x3ef783=_0x408f7a;return this[_0x3ef783(0x1fe)];}['_setOptionsHook'](_0x56971b,_0x5e5856){_0x56971b['positions']&&(this['positions']=_0x56971b['positions']);}['_mountedHook'](){this['style']['type']==='image'?this['_layer']=new mars3d__namespace['layer']['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this['_layer']=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0x2d0dda={_0x3270c2:0x1df,_0x3e5c5b:0x1e3,_0x57c343:0x223,_0x3f2586:0x20f},_0x4b40e7=_0x408f7a;this[_0x4b40e7(0x228)][_0x4b40e7(_0x2d0dda._0x3270c2)](this['_layer']),this['_container']=mars3d__namespace['DomUtil']['create'](_0x4b40e7(_0x2d0dda._0x3e5c5b),'mars3d-heatmap\x20mars3d-hideDiv',this['_map'][_0x4b40e7(0x1f8)]),this[_0x4b40e7(0x223)][_0x4b40e7(0x1fc)]&&(this['positions']=this[_0x4b40e7(_0x2d0dda._0x57c343)]['positions']),this['options']['flyTo']&&this[_0x4b40e7(_0x2d0dda._0x3f2586)]();}['_removedHook'](){const _0x4373a0=_0x408f7a;this['_container']&&(mars3d__namespace[_0x4373a0(0x20a)][_0x4373a0(0x22f)](this['_container']),delete this[_0x4373a0(0x229)]),this['clear'](),this['_map']['removeLayer'](this['_layer']);}[_0x408f7a(0x210)](_0x1481a8,_0x187a82){const _0x277639=_0x408f7a;this['_positions']=this['_positions']||[],this['_positions']['push'](_0x1481a8),this[_0x277639(0x1e0)](_0x187a82);}['setPositions'](_0x3eff15,_0x2e872e){this['_positions']=_0x3eff15,this['_updatePositionsHook'](_0x2e872e);}['clear'](){const _0x25d90b={_0xa9c80b:0x21d,_0x2c9653:0x214},_0x4967cd=_0x408f7a;this['_graphic']&&(this['_layer'][_0x4967cd(_0x25d90b._0xa9c80b)](this['_graphic'],!![]),delete this[_0x4967cd(_0x25d90b._0x2c9653)]),this['_graphic2']&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x3ff713){const _0x5ba669={_0x253164:0x1fc,_0x30ac23:0x1ee,_0xe5dd2c:0x236,_0x59fa2b:0x1e4,_0x2fe18:0x1fe,_0x35f4ed:0x214,_0x3c2157:0x1f7,_0x451129:0x209,_0x45712e:0x22e,_0x5325ed:0x236,_0x4ec674:0x226,_0x11ce13:0x1f7,_0x14fbe4:0x1ea,_0x18a3d9:0x21a},_0x1a75db=_0x408f7a;if(!this['show']||!this[_0x1a75db(0x228)]||!this['positions']||this[_0x1a75db(_0x5ba669._0x253164)]['length']===0x0)return this;const _0x2b76b7=this['_getHeatCanvas']();if(this[_0x1a75db(_0x5ba669._0x30ac23)]['type']===_0x1a75db(_0x5ba669._0xe5dd2c))this['_layer']['setOptions']({'url':_0x2b76b7['toDataURL'](_0x1a75db(_0x5ba669._0x59fa2b)),'rectangle':this[_0x1a75db(_0x5ba669._0x2fe18)],'opacity':this['style']['opacity']});else this[_0x1a75db(_0x5ba669._0x30ac23)]['arc']?this['_graphic']&&_0x3ff713?(this[_0x1a75db(_0x5ba669._0x35f4ed)][_0x1a75db(0x22e)]['image']=_0x2b76b7,this['_graphic']['uniforms'][_0x1a75db(_0x5ba669._0x3c2157)]=this[_0x1a75db(_0x5ba669._0x451129)](),this['_graphic2']&&(this['_graphic2'][_0x1a75db(_0x5ba669._0x45712e)][_0x1a75db(_0x5ba669._0x5325ed)]=_0x2b76b7,this[_0x1a75db(_0x5ba669._0x4ec674)]['uniforms'][_0x1a75db(0x1f7)]=this['_graphic']['uniforms'][_0x1a75db(_0x5ba669._0x11ce13)])):this[_0x1a75db(_0x5ba669._0x14fbe4)](_0x2b76b7):this['_graphic']&&_0x3ff713?this['_graphic'][_0x1a75db(_0x5ba669._0x45712e)]['image']=_0x2b76b7:this[_0x1a75db(_0x5ba669._0x18a3d9)](_0x2b76b7);return this;}['_createGraphic'](_0x7ae8f9){const _0x48378f={_0x587372:0x1f3,_0x211ffb:0x1f2,_0x26e015:0x227,_0x5d7fd4:0x208},_0x50e7b4=_0x408f7a;this[_0x50e7b4(_0x48378f._0x587372)](),this[_0x50e7b4(0x214)]=new mars3d__namespace['graphic'][(_0x50e7b4(_0x48378f._0x211ffb))]({...this[_0x50e7b4(0x223)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x7ae8f9},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x50e7b4(_0x48378f._0x26e015)][_0x50e7b4(_0x48378f._0x5d7fd4)](this['_graphic']);}['_createArcGraphic'](_0x1e8bb6){const _0x32064d={_0x576963:0x1e9,_0x5ecbda:0x1e9,_0x3fbbd2:0x213,_0x237916:0x207,_0xcc12d6:0x1fe,_0x5281b2:0x1ee,_0x47f32e:0x1f2,_0x2a956b:0x223,_0x5b423d:0x234,_0x2ad71a:0x208},_0xc98fe9=_0x408f7a;this['clear']();const _0x56b0c0=Cesium[_0xc98fe9(0x232)]['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0xc98fe9(_0x32064d._0x576963)][_0xc98fe9(0x213)],'zPass':Cesium[_0xc98fe9(_0x32064d._0x5ecbda)]['REPLACE']},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0xc98fe9(_0x32064d._0x5ecbda)][_0xc98fe9(_0x32064d._0x3fbbd2)],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState'][_0xc98fe9(0x204)]}),_0x5d20a2=Math[_0xc98fe9(0x22b)](this['style']['diffHeight']??this[_0xc98fe9(0x222)]*0.02)+0.1;this['style'][_0xc98fe9(0x22d)]&&delete this['style']['diffHeight'];const _0x2ff8eb=(this['style'][_0xc98fe9(_0x32064d._0x237916)],0x64);let _0x556393=Math['max'](this['_rectangle']['height'],this[_0xc98fe9(_0x32064d._0xcc12d6)]['width']);this['style']['granularity']=_0x556393/=_0x2ff8eb;const _0x424ece=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x1e8bb6,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x20ec79=this[_0xc98fe9(_0x32064d._0x5281b2)]['arcDirection']||0x1;this['_graphic']=new mars3d__namespace['graphic'][(_0xc98fe9(_0x32064d._0x47f32e))]({...this[_0xc98fe9(_0x32064d._0x2a956b)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x56b0c0,'material':_0x424ece,'vertexShaderSource':getVertexShaderSource(_0x5d20a2*_0x20ec79)})}),this['_layer']['addGraphic'](this['_graphic']),this['style']['arcDirection']===0x0&&(this[_0xc98fe9(0x226)]=new mars3d__namespace[(_0xc98fe9(_0x32064d._0x5b423d))][(_0xc98fe9(0x1f2))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x56b0c0,'material':_0x424ece,'vertexShaderSource':getVertexShaderSource(-_0x5d20a2)})}),this['_layer'][_0xc98fe9(_0x32064d._0x2ad71a)](this['_graphic2']));}['getRectangle'](_0x3bbcdf){const _0xd7f740=_0x408f7a;return _0x3bbcdf!==null&&_0x3bbcdf!==void 0x0&&_0x3bbcdf['isFormat']&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this[_0xd7f740(0x1fe)]):this['_rectangle'];}['_getHeatCanvas'](){const _0x3aea41={_0x36b652:0x21c,_0x4a5671:0x22a,_0x2ce18c:0x202,_0x4c4062:0x1f5,_0xb1dd8f:0x223,_0x1d9d99:0x20c,_0x30d312:0x20e,_0x52cc63:0x20a,_0x4b2c5d:0x206},_0x245961={_0x3735a7:0x231,_0x55b8dc:0x1e8},_0x498d54=_0x408f7a,_0x1204f8=this['_positions'],_0x39bb24=[];let _0x3ba493,_0x1cea7e,_0x1baa86,_0x391452;_0x1204f8['forEach'](_0x48ef78=>{const _0x277512=_0x19f0,_0x132853=mars3d__namespace['LngLatPoint']['parse'](_0x48ef78);if(!_0x132853)return;_0x132853['value']=_0x48ef78['value']||0x1,!this['options']['rectangle']&&(_0x3ba493===undefined?(_0x3ba493=_0x132853[_0x277512(0x1e8)],_0x1cea7e=_0x132853['lng'],_0x1baa86=_0x132853['lat'],_0x391452=_0x132853[_0x277512(_0x245961._0x3735a7)]):(_0x3ba493=Math['min'](_0x3ba493,_0x132853['lng']),_0x1cea7e=Math['max'](_0x1cea7e,_0x132853[_0x277512(_0x245961._0x55b8dc)]),_0x1baa86=Math['min'](_0x1baa86,_0x132853['lat']),_0x391452=Math['max'](_0x391452,_0x132853['lat']))),_0x39bb24['push'](_0x132853);});_0x3ba493===_0x1cea7e&&(_0x3ba493-=0.000001,_0x1cea7e+=0.000001);_0x1baa86===_0x391452&&(_0x1baa86-=0.000001,_0x391452+=0.000001);let _0x26877e=this['options']['rectangle']||{'xmin':_0x3ba493,'xmax':_0x1cea7e,'ymin':_0x1baa86,'ymax':_0x391452};const _0x321ae4=getMercatorBounds(_0x26877e),_0x414d49=Math['abs'](_0x321ae4[_0x498d54(_0x3aea41._0x36b652)]-_0x321ae4['xmin']),_0x3cc7d9=Math[_0x498d54(_0x3aea41._0x4a5671)](_0x321ae4['ymax']-_0x321ae4['ymin']),_0x133c0a=Math['max'](_0x414d49,_0x3cc7d9),_0xb3b5db=Math['min'](_0x414d49,_0x3cc7d9);this['_mBoundsMax']=_0x133c0a;let _0x45687c=0x1;if(_0x133c0a>this['options']['maxCanvasSize'])_0x45687c=_0x133c0a/this['options'][_0x498d54(0x217)],_0xb3b5db/_0x45687c<this['options'][_0x498d54(_0x3aea41._0x2ce18c)]&&(_0x45687c=_0xb3b5db/this[_0x498d54(0x223)][_0x498d54(_0x3aea41._0x2ce18c)]);else _0xb3b5db<this['options']['minCanvasSize']&&(_0x45687c=_0xb3b5db/this['options'][_0x498d54(0x202)],_0x133c0a/_0x45687c>this[_0x498d54(0x223)]['maxCanvasSize']&&(_0x45687c=_0x133c0a/this['options']['maxCanvasSize']));const _0x4f0475=this['heatStyle']['radius']*1.5,_0x12c817=_0x414d49/_0x45687c+_0x4f0475*0x2,_0x93aa8d=_0x3cc7d9/_0x45687c+_0x4f0475*0x2,_0x58f4fc=_0x4f0475*_0x45687c;_0x321ae4['xmin']-=_0x58f4fc,_0x321ae4['ymin']-=_0x58f4fc,_0x321ae4['xmax']+=_0x58f4fc,_0x321ae4['ymax']+=_0x58f4fc,this['_scale']=_0x45687c,_0x26877e=geLatLngBounds(_0x321ae4),this['_rectangle']=Cesium['Rectangle']['fromDegrees'](_0x26877e['xmin'],_0x26877e['ymin'],_0x26877e[_0x498d54(_0x3aea41._0x36b652)],_0x26877e[_0x498d54(_0x3aea41._0x4c4062)]);let _0x8c78bc=_0x39bb24[0x0]['value']??0x1,_0x521ad6=_0x39bb24[0x0]['value']??0x0;const _0x339fe5=[];_0x39bb24['forEach'](_0x56f916=>{const _0x6a9bcf=_0x498d54,_0x484f85=mars3d__namespace['PointTrans'][_0x6a9bcf(0x216)]([_0x56f916[_0x6a9bcf(0x1e8)],_0x56f916['lat']]),_0x1800dc=_0x56f916['value']||0x1,_0x4de0e6=Math['round']((_0x484f85[0x0]-_0x321ae4['xmin'])/_0x45687c),_0x4f0171=Math['round']((_0x321ae4['ymax']-_0x484f85[0x1])/_0x45687c);_0x8c78bc=Math['max'](_0x8c78bc,_0x1800dc),_0x521ad6=Math['min'](_0x521ad6,_0x1800dc),_0x339fe5['push']({'x':_0x4de0e6,'y':_0x4f0171,'value':_0x1800dc});});const _0x200810={'min':this['options']['min']??_0x521ad6,'max':this[_0x498d54(_0x3aea41._0xb1dd8f)]['max']??_0x8c78bc,'data':_0x339fe5};this[_0x498d54(0x205)]=_0x200810;if(!this['_last_mBounds']||_0x321ae4[_0x498d54(0x21b)]!==this['_last_mBounds']['xmin']||_0x321ae4['ymin']!==this[_0x498d54(_0x3aea41._0x1d9d99)]['ymin']||_0x321ae4['xmax']!==this['_last_mBounds']['xmax']||_0x321ae4[_0x498d54(_0x3aea41._0x4c4062)]!==this[_0x498d54(0x20c)][_0x498d54(0x1f5)]){this['_last_mBounds']=_0x321ae4,this['_container']['style']['cssText']='width:'+_0x12c817+'px;height:'+_0x93aa8d+_0x498d54(0x201);const _0x1e626b={...this['heatStyle'],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace['create'](_0x1e626b):this['_heat']['configure'](_0x1e626b);}this['_heat'][_0x498d54(_0x3aea41._0x30d312)](_0x200810);const _0x5aa956=mars3d__namespace[_0x498d54(_0x3aea41._0x52cc63)]['copyCanvas'](this['_heat']['_renderer'][_0x498d54(_0x3aea41._0x4b2c5d)]);return _0x5aa956;}['_getArcHeatCanvas'](){const _0x104f96={_0x1cd483:0x1ff,_0x13da98:0x200},_0x35f39c=_0x408f7a;this['_heat']['configure']({'radius':this[_0x35f39c(0x1ff)]['radius']*this['style'][_0x35f39c(0x218)],'blur':this[_0x35f39c(_0x104f96._0x1cd483)]['blur']*this['style']['arcBlurScale'],'gradient':this[_0x35f39c(_0x104f96._0x1cd483)]['gradientArc']||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:_0x35f39c(_0x104f96._0x13da98),0x1:'rgb(255,255,255)'}});const _0x4b4611=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return this['_heat']['configure'](this['options']['heatStyle']),_0x4b4611;}[_0x408f7a(0x1e5)](_0xeac10a){const _0x823c58={_0xb36348:0x212,_0x479948:0x216,_0x5ab204:0x21b,_0x39d394:0x22c,_0x44140a:0x1f6,_0x403ace:0x1e6},_0x3e031a=_0x408f7a,_0x53008b=mars3d__namespace[_0x3e031a(_0x823c58._0xb36348)]['parse'](_0xeac10a);if(!_0x53008b)return{};const _0x234d4a=mars3d__namespace[_0x3e031a(0x224)][_0x3e031a(_0x823c58._0x479948)]([_0x53008b['lng'],_0x53008b['lat']]),_0x2e51ed=this['_last_mBounds'],_0x1172c0=Math[_0x3e031a(0x1f0)]((_0x234d4a[0x0]-_0x2e51ed[_0x3e031a(_0x823c58._0x5ab204)])/this[_0x3e031a(0x22c)]),_0x2234ee=Math['round']((_0x2e51ed['ymax']-_0x234d4a[0x1])/this[_0x3e031a(_0x823c58._0x39d394)]),_0x25cdf0=this['_heat'][_0x3e031a(_0x823c58._0x44140a)]({'x':_0x1172c0,'y':_0x2234ee}),_0x451a81=this[_0x3e031a(0x1e2)]['_renderer']['ctx']['getImageData'](_0x1172c0-0x1,_0x2234ee-0x1,0x1,0x1)['data'];return{'x':_0x1172c0,'y':_0x2234ee,'value':_0x25cdf0,'color':_0x3e031a(_0x823c58._0x403ace)+_0x451a81[0x0]+','+_0x451a81[0x1]+','+_0x451a81[0x2]+','+_0x451a81[0x3]+')'};}}mars3d__namespace['LayerUtil']['register']('heat',HeatLayer),mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x131962){const _0x4a53c6={_0x1ad629:0x224,_0x2b35b7:0x1f5},_0x5011a7=_0x408f7a,_0x36ceac=mars3d__namespace[_0x5011a7(_0x4a53c6._0x1ad629)]['lonlat2mercator']([_0x131962['xmin'],_0x131962['ymin']]),_0x5fb019=mars3d__namespace['PointTrans'][_0x5011a7(0x216)]([_0x131962['xmax'],_0x131962[_0x5011a7(_0x4a53c6._0x2b35b7)]]);return{'xmin':_0x36ceac[0x0],'ymin':_0x36ceac[0x1],'xmax':_0x5fb019[0x0],'ymax':_0x5fb019[0x1]};}function geLatLngBounds(_0x2e54a7){const _0x16d362={_0x392ede:0x1fd,_0x289cb9:0x21b},_0x14de05=_0x408f7a,_0x3a63ca=mars3d__namespace['PointTrans'][_0x14de05(_0x16d362._0x392ede)]([_0x2e54a7[_0x14de05(_0x16d362._0x289cb9)],_0x2e54a7['ymin']]),_0x27641d=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x2e54a7['xmax'],_0x2e54a7['ymax']]);return{'xmin':_0x3a63ca[0x0],'ymin':_0x3a63ca[0x1],'xmax':_0x27641d[0x0],'ymax':_0x27641d[0x1]};}function getVertexShaderSource(_0x38546b){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'+_0x38546b+';\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[_0x408f7a(0x1f1)](exports,'__esModule',{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-heatmap",
3
- "version": "3.6.14",
3
+ "version": "3.6.16",
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.7"
11
11
  },
12
12
  "devDependencies": {
13
- "mars3d": "~3.6.14"
13
+ "mars3d": "~3.6.16"
14
14
  },
15
15
  "scripts": {
16
16
  "lint": "eslint ./src/**/*.{js,ts} --fix"