mars3d-heatmap 3.6.10 → 3.6.12

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.10
5
- * 编译日期:2023-10-23 17:21:40
4
+ * 版本信息:v3.6.12
5
+ * 编译日期:2023-11-13 20:56:14
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';function _0x25ec(_0x538c3b,_0x1379ce){const _0x35529f=_0x3552();return _0x25ec=function(_0x25ec58,_0x508415){_0x25ec58=_0x25ec58-0xa6;let _0x3c7547=_0x35529f[_0x25ec58];return _0x3c7547;},_0x25ec(_0x538c3b,_0x1379ce);}const _0x2a77dd=_0x25ec;function _0x3552(){const _0x3d70c0=['show','positions','arcRadiusScale','parse','mercator2lonlat','heatStyle','xmin','__esModule','px;','flyToByAnimationEnd','bumpMap','1795326rSkTiy','2104356aIkwPE','blue','layer','register','BaseLayer','_container','options','_setOptionsHook','_getArcHeatCanvas','Color','_map','rectangle','image','round','defineProperty','_layer','lonlat2mercator','keys','Material','ymin','diffHeight','getPointData','style','15075264nELkIn','min','forEach','rgb(0,0,0)','DomUtil','clientHeight','maxCanvasSize','2941984eUvjmM','RectanglePrimitive','xmax','_positions','REPLACE','_graphic2','lat','data','merge','请引入\x20heatmap.js\x20库\x20','abs','15LEmSwH','_rectangle','addGraphic','EllipsoidSurfaceAppearance','fromDegrees','clientWidth','setPositions','KEEP','_scale','value','13266225bIFREH','lng','_heat','image/png','addLayer','PointTrans','ymax','max','_getHeatCanvas','width','235385DphkHF','setData','EPSG:3857','copyCanvas','5443683XqXoCJ','height','_last_mBounds','_graphic','rgb(216,216,216)','StencilFunction','uniforms','push','GraphicLayer','blur','ImageLayer'];_0x3552=function(){return _0x3d70c0;};return _0x3552();}(function(_0x598df6,_0x1bdef2){const _0x42451f={_0x2ceb5d:0xc2,_0x5a9758:0xd8,_0x12b5ca:0xb4},_0x49d8da=_0x25ec,_0x2d8db6=_0x598df6();while(!![]){try{const _0x19555d=parseInt(_0x49d8da(0xbe))/0x1+-parseInt(_0x49d8da(0xd9))/0x2+-parseInt(_0x49d8da(_0x42451f._0x2ceb5d))/0x3+parseInt(_0x49d8da(0xf7))/0x4+parseInt(_0x49d8da(0xaa))/0x5*(-parseInt(_0x49d8da(_0x42451f._0x5a9758))/0x6)+parseInt(_0x49d8da(_0x42451f._0x12b5ca))/0x7+parseInt(_0x49d8da(0xf0))/0x8;if(_0x19555d===_0x1bdef2)break;else _0x2d8db6['push'](_0x2d8db6['shift']());}catch(_0xfab88e){_0x2d8db6['push'](_0x2d8db6['shift']());}}}(_0x3552,0xf0bce));function _interopNamespace(_0x624b25){const _0x3de690={_0x33f7ab:0xd4},_0x78d072=_0x25ec;if(_0x624b25&&_0x624b25[_0x78d072(_0x3de690._0x33f7ab)])return _0x624b25;var _0x228503=Object['create'](null);return _0x624b25&&Object[_0x78d072(0xea)](_0x624b25)['forEach'](function(_0x4b7099){if(_0x4b7099!=='default'){var _0xa1722e=Object['getOwnPropertyDescriptor'](_0x624b25,_0x4b7099);Object['defineProperty'](_0x228503,_0x4b7099,_0xa1722e['get']?_0xa1722e:{'enumerable':!![],'get':function(){return _0x624b25[_0x4b7099];}});}}),_0x228503['default']=_0x624b25,_0x228503;}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(_0x2a77dd(0xa8));const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x2a77dd(0xdb)][_0x2a77dd(0xdd)],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:_0x2a77dd(0xda),0.6:'green',0.8:'yellow',0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium[_0x2a77dd(0xad)]['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x1d78f9={}){const _0x1cce93={_0x338094:0xf6,_0x2f4150:0xaf,_0x4ea03a:0xf1,_0x332c2b:0xdf},_0x26637a=_0x2a77dd;super(_0x1d78f9),this['options']['maxCanvasSize']=this['options'][_0x26637a(_0x1cce93._0x338094)]??document['body'][_0x26637a(_0x1cce93._0x2f4150)],this[_0x26637a(0xdf)]['maxCanvasSize']=Math[_0x26637a(_0x1cce93._0x4ea03a)](this['options'][_0x26637a(_0x1cce93._0x338094)],0x1388),this[_0x26637a(_0x1cce93._0x332c2b)]['minCanvasSize']=this['options']['minCanvasSize']??document['body'][_0x26637a(0xf5)],this['options']['minCanvasSize']=Math[_0x26637a(0xbb)](this['options']['minCanvasSize'],0x2bc),this[_0x26637a(0xdf)]['heatStyle']={...DEF_HEATSTYLE,...this['options']['heatStyle']},this['options']['style']={...DEF_STYLE,...this[_0x26637a(0xdf)]['style']};}get['layer'](){const _0x51b3db=_0x2a77dd;return this[_0x51b3db(0xe8)];}get[_0x2a77dd(0xd2)](){const _0x4d0a69=_0x2a77dd;return this['options'][_0x4d0a69(0xd2)];}set[_0x2a77dd(0xd2)](_0x6aba71){const _0x118820={_0x1e5c1a:0xdf,_0x4996e8:0xa7},_0x54794a=_0x2a77dd;this[_0x54794a(_0x118820._0x1e5c1a)]['heatStyle']=mars3d__namespace['Util'][_0x54794a(_0x118820._0x4996e8)](this[_0x54794a(0xdf)]['heatStyle'],_0x6aba71),this['_heat']&&(this['_heat']['configure'](this[_0x54794a(_0x118820._0x1e5c1a)]['heatStyle']),this['_updatePositionsHook'](!![]));}get['style'](){const _0x4aa7b7=_0x2a77dd;return this[_0x4aa7b7(0xdf)][_0x4aa7b7(0xef)];}set['style'](_0xa28651){const _0x78a43e=_0x2a77dd;this['options'][_0x78a43e(0xef)]=mars3d__namespace['Util']['merge'](this['options']['style'],_0xa28651);}get['positions'](){return this['_positions'];}set['positions'](_0x5d8f43){const _0x511635=_0x2a77dd;this[_0x511635(0xb0)](_0x5d8f43);}get['coordinates'](){const _0x56d515=[];return this['points']['forEach'](_0x4ccea0=>{_0x56d515['push'](_0x4ccea0['toArray']());}),_0x56d515;}get['rectangle'](){const _0x1a9a42=_0x2a77dd;return this[_0x1a9a42(0xab)];}[_0x2a77dd(0xe0)](_0x2a0aa0,_0x4ca4d5){const _0x18fa3c={_0xcea523:0xce},_0x2a66f7=_0x2a77dd;_0x2a0aa0['positions']&&(this[_0x2a66f7(_0x18fa3c._0xcea523)]=_0x2a0aa0['positions']);}['_mountedHook'](){const _0x5eb61a={_0x4cc1f2:0xef,_0x3b8f7c:0xcc,_0xf709b0:0xc0},_0x5daedd=_0x2a77dd;this[_0x5daedd(_0x5eb61a._0x4cc1f2)]['type']==='image'?this['_layer']=new mars3d__namespace['layer'][(_0x5daedd(_0x5eb61a._0x3b8f7c))]({'crs':_0x5daedd(_0x5eb61a._0xf709b0),'private':!![]}):this['_layer']=new mars3d__namespace[(_0x5daedd(0xdb))][(_0x5daedd(0xca))]({'private':!![]});}['_addedHook'](){const _0x55a97b={_0x200d90:0xe3,_0x460d13:0xdf,_0x1c1ac6:0xce},_0xc555f6=_0x2a77dd;this['_map'][_0xc555f6(0xb8)](this['_layer']),this['_container']=mars3d__namespace['DomUtil']['create']('div','mars3d-heatmap\x20mars3d-hideDiv',this[_0xc555f6(_0x55a97b._0x200d90)]['container']),this[_0xc555f6(_0x55a97b._0x460d13)][_0xc555f6(_0x55a97b._0x1c1ac6)]&&(this[_0xc555f6(0xce)]=this[_0xc555f6(0xdf)]['positions']),this[_0xc555f6(0xdf)]['flyTo']&&this[_0xc555f6(0xd6)]();}['_removedHook'](){const _0x1271f3={_0x40d9bc:0xf4},_0x55f6ce=_0x2a77dd;this['_container']&&(mars3d__namespace[_0x55f6ce(_0x1271f3._0x40d9bc)]['remove'](this['_container']),delete this['_container']),this['clear'](),this[_0x55f6ce(0xe3)]['removeLayer'](this[_0x55f6ce(0xe8)]);}['addPosition'](_0x39147f,_0x4bb839){const _0x3cdb44={_0x4bc551:0xfa},_0x1a28ab=_0x2a77dd;this[_0x1a28ab(_0x3cdb44._0x4bc551)]=this['_positions']||[],this['_positions']['push'](_0x39147f),this['_updatePositionsHook'](_0x4bb839);}[_0x2a77dd(0xb0)](_0xdc751c,_0x2bcffd){const _0x43d5b2=_0x2a77dd;this[_0x43d5b2(0xfa)]=_0xdc751c,this['_updatePositionsHook'](_0x2bcffd);}['clear'](){const _0x335147={_0x5418b4:0xc5,_0x7d2f1f:0xfc,_0x488f07:0xfc},_0x51ce8e=_0x2a77dd;this['_graphic']&&(this['_layer']['removeGraphic'](this[_0x51ce8e(_0x335147._0x5418b4)],!![]),delete this[_0x51ce8e(0xc5)]),this[_0x51ce8e(_0x335147._0x7d2f1f)]&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this[_0x51ce8e(_0x335147._0x488f07)]);}['_updatePositionsHook'](_0x21d60b){const _0x1067a0={_0xf7e4fb:0xcd,_0x551029:0xbc,_0xb85c54:0xb7,_0xe0a8af:0xef,_0x4f38e6:0xc5,_0x45f89d:0xfc},_0x11a54e=_0x2a77dd;if(!this[_0x11a54e(_0x1067a0._0xf7e4fb)]||!this['_map']||!this['positions']||this['positions']['length']===0x0)return this;const _0x5f375f=this[_0x11a54e(_0x1067a0._0x551029)]();if(this[_0x11a54e(0xef)]['type']==='image')this['_layer']['setOptions']({'url':_0x5f375f['toDataURL'](_0x11a54e(_0x1067a0._0xb85c54)),'rectangle':this['_rectangle'],'opacity':this[_0x11a54e(0xef)]['opacity']});else this[_0x11a54e(_0x1067a0._0xe0a8af)]['arc']?this['_graphic']&&_0x21d60b?(this[_0x11a54e(_0x1067a0._0x4f38e6)]['uniforms'][_0x11a54e(0xe5)]=_0x5f375f,this['_graphic'][_0x11a54e(0xc8)][_0x11a54e(0xd7)]=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2'][_0x11a54e(0xc8)][_0x11a54e(0xe5)]=_0x5f375f,this[_0x11a54e(_0x1067a0._0x45f89d)]['uniforms']['bumpMap']=this['_graphic']['uniforms']['bumpMap'])):this['_createArcGraphic'](_0x5f375f):this['_graphic']&&_0x21d60b?this['_graphic']['uniforms']['image']=_0x5f375f:this['_createGraphic'](_0x5f375f);return this;}['_createGraphic'](_0xccb61d){const _0x495474={_0x44b6ed:0xc5,_0x9317b7:0xeb,_0x396bd0:0xe8},_0x2eee12=_0x2a77dd;this['clear'](),this[_0x2eee12(_0x495474._0x44b6ed)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0x2eee12(0xdf)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium[(_0x2eee12(_0x495474._0x9317b7))]({'fabric':{'uniforms':{'image':_0xccb61d},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x2eee12(_0x495474._0x396bd0)][_0x2eee12(0xac)](this['_graphic']);}['_createArcGraphic'](_0xad4b5){const _0x113ba3={_0x6e22e5:0xc7,_0x3e6c15:0xfb,_0x398281:0xb1,_0x4b25dc:0xed,_0x49b59e:0xc3,_0x2902e9:0xbd,_0x5db116:0xef,_0x310035:0xe2,_0x6b0efb:0xe1,_0x46839d:0xf8,_0x26afc0:0xfc},_0x2b23ea=_0x2a77dd;this['clear']();const _0x4c275a=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium[_0x2b23ea(_0x113ba3._0x6e22e5)]['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation'][_0x2b23ea(0xb1)],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation'][_0x2b23ea(_0x113ba3._0x3e6c15)]},'backFunction':Cesium[_0x2b23ea(_0x113ba3._0x6e22e5)]['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation'][_0x2b23ea(_0x113ba3._0x398281)],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x3315e4=Math['floor'](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style'][_0x2b23ea(_0x113ba3._0x4b25dc)]&&delete this['style']['diffHeight'];const _0x322412=(this['style']['splitNum'],0x64);let _0x1e23ff=Math['max'](this['_rectangle'][_0x2b23ea(_0x113ba3._0x49b59e)],this['_rectangle'][_0x2b23ea(_0x113ba3._0x2902e9)]);this[_0x2b23ea(_0x113ba3._0x5db116)]['granularity']=_0x1e23ff/=_0x322412;const _0x12f6c8=new Cesium[(_0x2b23ea(0xeb))]({'fabric':{'uniforms':{'image':_0xad4b5,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium[(_0x2b23ea(_0x113ba3._0x310035))](0x1,0x1,0x1,0x0),'bumpMap':this[_0x2b23ea(_0x113ba3._0x6b0efb)]()},'source':HeatMaterial},'translucent':!![]}),_0x317114=this['style']['arcDirection']||0x1;this[_0x2b23ea(0xc5)]=new mars3d__namespace['graphic'][(_0x2b23ea(_0x113ba3._0x46839d))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x4c275a,'material':_0x12f6c8,'vertexShaderSource':getVertexShaderSource(_0x3315e4*_0x317114)})}),this['_layer']['addGraphic'](this['_graphic']),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace['graphic'][(_0x2b23ea(_0x113ba3._0x46839d))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x4c275a,'material':_0x12f6c8,'vertexShaderSource':getVertexShaderSource(-_0x3315e4)})}),this['_layer'][_0x2b23ea(0xac)](this[_0x2b23ea(_0x113ba3._0x26afc0)]));}['getRectangle'](_0x38d6d3){return _0x38d6d3!==null&&_0x38d6d3!==void 0x0&&_0x38d6d3['isFormat']&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x2f6bed={_0x3d7118:0xe4,_0x4d9db4:0xa9,_0x5dd385:0xbb,_0x468194:0xdf,_0x4af4f8:0xb3,_0x10fe5a:0xdf,_0x26a173:0xc4,_0x5272f6:0xde,_0x2750a1:0xd5,_0x510ce8:0xb6,_0x3c04b4:0xbf},_0xb4800f={_0x44217d:0xe6},_0x2ba663={_0x3fbf14:0xfd},_0x24963d=_0x2a77dd,_0x30c6d0=this['_positions'],_0x57b191=[];let _0x477356,_0x39349c,_0x3ffb22,_0x3def39;_0x30c6d0[_0x24963d(0xf2)](_0x575e8d=>{const _0x1d9816=_0x24963d,_0x13ab86=mars3d__namespace['LngLatPoint'][_0x1d9816(0xd0)](_0x575e8d);if(!_0x13ab86)return;_0x13ab86['value']=_0x575e8d['value']||0x1,!this[_0x1d9816(0xdf)]['rectangle']&&(_0x477356===undefined?(_0x477356=_0x13ab86['lng'],_0x39349c=_0x13ab86['lng'],_0x3ffb22=_0x13ab86['lat'],_0x3def39=_0x13ab86[_0x1d9816(_0x2ba663._0x3fbf14)]):(_0x477356=Math['min'](_0x477356,_0x13ab86['lng']),_0x39349c=Math['max'](_0x39349c,_0x13ab86['lng']),_0x3ffb22=Math['min'](_0x3ffb22,_0x13ab86[_0x1d9816(0xfd)]),_0x3def39=Math['max'](_0x3def39,_0x13ab86[_0x1d9816(0xfd)]))),_0x57b191['push'](_0x13ab86);});_0x477356===_0x39349c&&(_0x477356-=0.000001,_0x39349c+=0.000001);_0x3ffb22===_0x3def39&&(_0x3ffb22-=0.000001,_0x3def39+=0.000001);let _0x4d750e=this['options'][_0x24963d(_0x2f6bed._0x3d7118)]||{'xmin':_0x477356,'xmax':_0x39349c,'ymin':_0x3ffb22,'ymax':_0x3def39};const _0xea5988=getMercatorBounds(_0x4d750e),_0x47ee08=Math[_0x24963d(_0x2f6bed._0x4d9db4)](_0xea5988['xmax']-_0xea5988['xmin']),_0x2231e2=Math[_0x24963d(0xa9)](_0xea5988['ymax']-_0xea5988[_0x24963d(0xec)]),_0x18e833=Math[_0x24963d(_0x2f6bed._0x5dd385)](_0x47ee08,_0x2231e2),_0x4056f2=Math[_0x24963d(0xf1)](_0x47ee08,_0x2231e2);this['_mBoundsMax']=_0x18e833;let _0x2c6bcf=0x1;if(_0x18e833>this['options'][_0x24963d(0xf6)])_0x2c6bcf=_0x18e833/this[_0x24963d(_0x2f6bed._0x468194)][_0x24963d(0xf6)],_0x4056f2/_0x2c6bcf<this['options']['minCanvasSize']&&(_0x2c6bcf=_0x4056f2/this['options']['minCanvasSize']);else _0x4056f2<this['options']['minCanvasSize']&&(_0x2c6bcf=_0x4056f2/this['options']['minCanvasSize'],_0x18e833/_0x2c6bcf>this['options']['maxCanvasSize']&&(_0x2c6bcf=_0x18e833/this['options']['maxCanvasSize']));const _0x1262a1=this['heatStyle']['radius']*1.5,_0x14554e=_0x47ee08/_0x2c6bcf+_0x1262a1*0x2,_0x18caa4=_0x2231e2/_0x2c6bcf+_0x1262a1*0x2,_0x4fcc6c=_0x1262a1*_0x2c6bcf;_0xea5988[_0x24963d(0xd3)]-=_0x4fcc6c,_0xea5988[_0x24963d(0xec)]-=_0x4fcc6c,_0xea5988[_0x24963d(0xf9)]+=_0x4fcc6c,_0xea5988['ymax']+=_0x4fcc6c,this[_0x24963d(0xb2)]=_0x2c6bcf,_0x4d750e=geLatLngBounds(_0xea5988),this[_0x24963d(0xab)]=Cesium['Rectangle'][_0x24963d(0xae)](_0x4d750e[_0x24963d(0xd3)],_0x4d750e[_0x24963d(0xec)],_0x4d750e['xmax'],_0x4d750e['ymax']);let _0x599484=_0x57b191[0x0]['value']??0x1,_0x565045=_0x57b191[0x0][_0x24963d(_0x2f6bed._0x4af4f8)]??0x0;const _0x35be47=[];_0x57b191[_0x24963d(0xf2)](_0x217da3=>{const _0x62c80c=_0x24963d,_0x449ce3=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x217da3['lng'],_0x217da3['lat']]),_0x4f1ee0=_0x217da3['value']||0x1,_0x51513c=Math[_0x62c80c(_0xb4800f._0x44217d)]((_0x449ce3[0x0]-_0xea5988['xmin'])/_0x2c6bcf),_0x4369ed=Math['round']((_0xea5988['ymax']-_0x449ce3[0x1])/_0x2c6bcf);_0x599484=Math['max'](_0x599484,_0x4f1ee0),_0x565045=Math['min'](_0x565045,_0x4f1ee0),_0x35be47[_0x62c80c(0xc9)]({'x':_0x51513c,'y':_0x4369ed,'value':_0x4f1ee0});});const _0x1ee54d={'min':this[_0x24963d(_0x2f6bed._0x10fe5a)]['min']??_0x565045,'max':this['options']['max']??_0x599484,'data':_0x35be47};this['_last_heatData']=_0x1ee54d;if(!this[_0x24963d(_0x2f6bed._0x26a173)]||_0xea5988['xmin']!==this['_last_mBounds']['xmin']||_0xea5988['ymin']!==this['_last_mBounds']['ymin']||_0xea5988['xmax']!==this['_last_mBounds']['xmax']||_0xea5988[_0x24963d(0xba)]!==this['_last_mBounds']['ymax']){this['_last_mBounds']=_0xea5988,this[_0x24963d(_0x2f6bed._0x5272f6)][_0x24963d(0xef)]['cssText']='width:'+_0x14554e+'px;height:'+_0x18caa4+_0x24963d(_0x2f6bed._0x2750a1);const _0x3e33fc={...this[_0x24963d(0xd2)],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace['create'](_0x3e33fc):this['_heat']['configure'](_0x3e33fc);}this[_0x24963d(_0x2f6bed._0x510ce8)][_0x24963d(_0x2f6bed._0x3c04b4)](_0x1ee54d);const _0x1afe35=mars3d__namespace['DomUtil'][_0x24963d(0xc1)](this['_heat']['_renderer']['canvas']);return _0x1afe35;}[_0x2a77dd(0xe1)](){const _0x4a6e91={_0x5dd3f9:0xcf,_0x2be023:0xf3},_0x2d0631=_0x2a77dd;this['_heat']['configure']({'radius':this['heatStyle']['radius']*this['style'][_0x2d0631(_0x4a6e91._0x5dd3f9)],'blur':this['heatStyle'][_0x2d0631(0xcb)]*this['style']['arcBlurScale'],'gradient':this['heatStyle']['gradientArc']||{0.25:_0x2d0631(_0x4a6e91._0x2be023),0.55:'rgb(140,140,140)',0.85:_0x2d0631(0xc6),0x1:'rgb(255,255,255)'}});const _0x36437a=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return this['_heat']['configure'](this['options']['heatStyle']),_0x36437a;}[_0x2a77dd(0xee)](_0x550574){const _0x5bb781={_0x4628ec:0xb5,_0x56223d:0xc4,_0x4540ab:0xb2,_0x43317e:0xa6},_0x482b10=_0x2a77dd,_0x6f9388=mars3d__namespace['LngLatPoint']['parse'](_0x550574);if(!_0x6f9388)return{};const _0x1778a6=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x6f9388[_0x482b10(_0x5bb781._0x4628ec)],_0x6f9388['lat']]),_0x5aedcf=this[_0x482b10(_0x5bb781._0x56223d)],_0x4d8471=Math['round']((_0x1778a6[0x0]-_0x5aedcf['xmin'])/this['_scale']),_0x5e652c=Math['round']((_0x5aedcf['ymax']-_0x1778a6[0x1])/this[_0x482b10(_0x5bb781._0x4540ab)]),_0x350587=this['_heat']['getValueAt']({'x':_0x4d8471,'y':_0x5e652c}),_0x31f7c2=this['_heat']['_renderer']['ctx']['getImageData'](_0x4d8471-0x1,_0x5e652c-0x1,0x1,0x1)[_0x482b10(_0x5bb781._0x43317e)];return{'x':_0x4d8471,'y':_0x5e652c,'value':_0x350587,'color':'rgba('+_0x31f7c2[0x0]+','+_0x31f7c2[0x1]+','+_0x31f7c2[0x2]+','+_0x31f7c2[0x3]+')'};}}mars3d__namespace['LayerUtil'][_0x2a77dd(0xdc)]('heat',HeatLayer),mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x5dd173){const _0x3fbfc1={_0x2f3a13:0xd3,_0x251a05:0xec},_0x2fea50=_0x2a77dd,_0x318a68=mars3d__namespace[_0x2fea50(0xb9)][_0x2fea50(0xe9)]([_0x5dd173[_0x2fea50(_0x3fbfc1._0x2f3a13)],_0x5dd173[_0x2fea50(_0x3fbfc1._0x251a05)]]),_0x75de43=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5dd173['xmax'],_0x5dd173['ymax']]);return{'xmin':_0x318a68[0x0],'ymin':_0x318a68[0x1],'xmax':_0x75de43[0x0],'ymax':_0x75de43[0x1]};}function geLatLngBounds(_0x225b72){const _0x3b614d={_0x5772ab:0xb9},_0x396b8c=_0x2a77dd,_0x335ecf=mars3d__namespace[_0x396b8c(_0x3b614d._0x5772ab)]['mercator2lonlat']([_0x225b72['xmin'],_0x225b72['ymin']]),_0x42b9a3=mars3d__namespace['PointTrans'][_0x396b8c(0xd1)]([_0x225b72['xmax'],_0x225b72['ymax']]);return{'xmin':_0x335ecf[0x0],'ymin':_0x335ecf[0x1],'xmax':_0x42b9a3[0x0],'ymax':_0x42b9a3[0x1]};}function getVertexShaderSource(_0x1423da){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'+_0x1423da+';\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[_0x2a77dd(0xe7)](exports,_0x2a77dd(0xd4),{'value':!![]});
14
+ 'use strict';const _0x1192e4=_0x598f;function _0x598f(_0x347781,_0x3f68f2){const _0x586dc9=_0x586d();return _0x598f=function(_0x598fc6,_0x301f7c){_0x598fc6=_0x598fc6-0x7f;let _0x29d602=_0x586dc9[_0x598fc6];return _0x29d602;},_0x598f(_0x347781,_0x3f68f2);}(function(_0x3aa60c,_0x1a1bb7){const _0x471506={_0x33d535:0xc5,_0x403dcb:0x90,_0x54531e:0xc8},_0x345be4=_0x598f,_0x47d359=_0x3aa60c();while(!![]){try{const _0x192192=parseInt(_0x345be4(_0x471506._0x33d535))/0x1*(parseInt(_0x345be4(0xb5))/0x2)+parseInt(_0x345be4(_0x471506._0x403dcb))/0x3+parseInt(_0x345be4(0xa5))/0x4*(-parseInt(_0x345be4(0xb9))/0x5)+parseInt(_0x345be4(0xb6))/0x6*(-parseInt(_0x345be4(0xd1))/0x7)+-parseInt(_0x345be4(0xa3))/0x8*(-parseInt(_0x345be4(0xdd))/0x9)+-parseInt(_0x345be4(0xd8))/0xa+-parseInt(_0x345be4(_0x471506._0x54531e))/0xb*(parseInt(_0x345be4(0xd4))/0xc);if(_0x192192===_0x1a1bb7)break;else _0x47d359['push'](_0x47d359['shift']());}catch(_0x12f478){_0x47d359['push'](_0x47d359['shift']());}}}(_0x586d,0xf38d2));function _0x586d(){const _0x324623=['create','options','lng','2macfAK','102132FDUnxc','StencilFunction','EllipsoidSurfaceAppearance','527210FASpLl','Util','defineProperty','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','gradientArc','arcRadiusScale','body','style','__esModule','_getArcHeatCanvas','LayerUtil','positions','1945549ilmRBb','Material','canvas','33BfjozF','Cartesian2','_addedHook','_graphic','ymax','setData','push','xmin','ImageLayer','112naVMoO','uniforms','PointTrans','8179836pNeLJj','BaseLayer','maxCanvasSize','arc','1213950veNcVy','default','flyToByAnimationEnd','heatStyle','_map','18MzTMyP','register','cssText','forEach','_positions','_mBoundsMax','xmax','ymin','arcDirection','length','StencilOperation','clientHeight','getPointData','removeGraphic','_createGraphic','clear','RectanglePrimitive','merge','value','getRectangle','floor','_layer','isFormat','1947435xHFqld','minCanvasSize','lat','show','HeatLayer','div','_createArcGraphic','_getHeatCanvas','getValueAt','parse','layer','min','removeLayer','rgba(','copyCanvas','_last_mBounds','_graphic2','image','_renderer','4209928RWzWdA','bumpMap','8atMSws','max','_scale','_container','keys','_heat','EPSG:3857','heat','width:','configure','coordinates','rectangle','getOwnPropertyDescriptor'];_0x586d=function(){return _0x324623;};return _0x586d();}function _interopNamespace(_0x5186bd){const _0x40c780={_0x54719d:0xc1,_0x5f0385:0xb2,_0x34758a:0xa9,_0x39d4b5:0xd9},_0x3575dd=_0x598f;if(_0x5186bd&&_0x5186bd[_0x3575dd(_0x40c780._0x54719d)])return _0x5186bd;var _0x3e3d8a=Object[_0x3575dd(_0x40c780._0x5f0385)](null);return _0x5186bd&&Object[_0x3575dd(_0x40c780._0x34758a)](_0x5186bd)[_0x3575dd(0xe0)](function(_0x1b1446){const _0x47c664=_0x3575dd;if(_0x1b1446!=='default'){var _0x347141=Object[_0x47c664(0xb1)](_0x5186bd,_0x1b1446);Object['defineProperty'](_0x3e3d8a,_0x1b1446,_0x347141['get']?_0x347141:{'enumerable':!![],'get':function(){return _0x5186bd[_0x1b1446];}});}}),_0x3e3d8a[_0x3575dd(_0x40c780._0x39d4b5)]=_0x5186bd,_0x3e3d8a;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial=_0x1192e4(0xbc);if(!h337__namespace['create'])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer'][_0x1192e4(0xd5)],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']['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x3b851b={}){const _0x372d1e={_0x4a6abf:0xd6,_0x518ea5:0xb3,_0x25f9f3:0x91,_0x4ee3f1:0xbf,_0x5e2b5b:0x84,_0x2f850e:0xb3,_0x159ace:0xa6,_0x4ddb15:0xc0},_0x25b04f=_0x1192e4;super(_0x3b851b),this['options'][_0x25b04f(_0x372d1e._0x4a6abf)]=this[_0x25b04f(_0x372d1e._0x518ea5)]['maxCanvasSize']??document['body']['clientWidth'],this['options'][_0x25b04f(0xd6)]=Math['min'](this['options']['maxCanvasSize'],0x1388),this[_0x25b04f(0xb3)]['minCanvasSize']=this[_0x25b04f(0xb3)][_0x25b04f(_0x372d1e._0x25f9f3)]??document[_0x25b04f(_0x372d1e._0x4ee3f1)][_0x25b04f(_0x372d1e._0x5e2b5b)],this[_0x25b04f(_0x372d1e._0x2f850e)][_0x25b04f(0x91)]=Math[_0x25b04f(_0x372d1e._0x159ace)](this['options']['minCanvasSize'],0x2bc),this['options']['heatStyle']={...DEF_HEATSTYLE,...this['options']['heatStyle']},this['options'][_0x25b04f(0xc0)]={...DEF_STYLE,...this['options'][_0x25b04f(_0x372d1e._0x4ddb15)]};}get['layer'](){const _0x2b692d={_0x11fa37:0x8e},_0x335dc3=_0x1192e4;return this[_0x335dc3(_0x2b692d._0x11fa37)];}get['heatStyle'](){const _0x1ffcb8={_0x5e2de9:0xb3,_0x582e05:0xdb},_0x2a62d5=_0x1192e4;return this[_0x2a62d5(_0x1ffcb8._0x5e2de9)][_0x2a62d5(_0x1ffcb8._0x582e05)];}set['heatStyle'](_0xcbabb0){const _0x1fd062={_0x19dbed:0xba},_0x4e57b8=_0x1192e4;this['options']['heatStyle']=mars3d__namespace[_0x4e57b8(_0x1fd062._0x19dbed)]['merge'](this['options']['heatStyle'],_0xcbabb0),this['_heat']&&(this['_heat']['configure'](this['options'][_0x4e57b8(0xdb)]),this['_updatePositionsHook'](!![]));}get['style'](){const _0x365141={_0x43f848:0xb3},_0x10fec1=_0x1192e4;return this[_0x10fec1(_0x365141._0x43f848)]['style'];}set['style'](_0x5e2708){const _0x480b12={_0x2e8b8f:0x8a,_0x6d27ee:0xb3},_0x26858d=_0x1192e4;this['options']['style']=mars3d__namespace[_0x26858d(0xba)][_0x26858d(_0x480b12._0x2e8b8f)](this[_0x26858d(_0x480b12._0x6d27ee)]['style'],_0x5e2708);}get['positions'](){return this['_positions'];}set['positions'](_0x22e1bb){this['setPositions'](_0x22e1bb);}get[_0x1192e4(0xaf)](){const _0x403d47=[];return this['points']['forEach'](_0x4d399=>{_0x403d47['push'](_0x4d399['toArray']());}),_0x403d47;}get[_0x1192e4(0xb0)](){return this['_rectangle'];}['_setOptionsHook'](_0xebbb04,_0x254e37){const _0x445e30={_0x2365ed:0xc4},_0x4c0919=_0x1192e4;_0xebbb04['positions']&&(this['positions']=_0xebbb04[_0x4c0919(_0x445e30._0x2365ed)]);}['_mountedHook'](){const _0x1ae980={_0xf4c139:0x8e,_0x12b122:0x9a},_0x1efcdf=_0x1192e4;this[_0x1efcdf(0xc0)]['type']==='image'?this[_0x1efcdf(_0x1ae980._0xf4c139)]=new mars3d__namespace['layer'][(_0x1efcdf(0xd0))]({'crs':_0x1efcdf(0xab),'private':!![]}):this[_0x1efcdf(0x8e)]=new mars3d__namespace[(_0x1efcdf(_0x1ae980._0x12b122))]['GraphicLayer']({'private':!![]});}[_0x1192e4(0xca)](){const _0x8fbde2={_0x19ef54:0x95,_0x2bb3cc:0xb3},_0x638271=_0x1192e4;this['_map']['addLayer'](this['_layer']),this[_0x638271(0xa8)]=mars3d__namespace['DomUtil']['create'](_0x638271(_0x8fbde2._0x19ef54),'mars3d-heatmap\x20mars3d-hideDiv',this['_map']['container']),this[_0x638271(0xb3)]['positions']&&(this['positions']=this['options'][_0x638271(0xc4)]),this[_0x638271(_0x8fbde2._0x2bb3cc)]['flyTo']&&this[_0x638271(0xda)]();}['_removedHook'](){const _0x2b4b9c=_0x1192e4;this['_container']&&(mars3d__namespace['DomUtil']['remove'](this['_container']),delete this[_0x2b4b9c(0xa8)]),this['clear'](),this['_map'][_0x2b4b9c(0x9c)](this['_layer']);}['addPosition'](_0x1262b1,_0x3362e0){const _0x24ec37=_0x1192e4;this[_0x24ec37(0xe1)]=this[_0x24ec37(0xe1)]||[],this['_positions'][_0x24ec37(0xce)](_0x1262b1),this['_updatePositionsHook'](_0x3362e0);}['setPositions'](_0x22c4e1,_0x142d25){const _0x36bc0f={_0x382a23:0xe1},_0x5f27aa=_0x1192e4;this[_0x5f27aa(_0x36bc0f._0x382a23)]=_0x22c4e1,this['_updatePositionsHook'](_0x142d25);}['clear'](){const _0x35a257={_0x25b1d1:0xcb,_0x4d554f:0x8e,_0x50c972:0x86},_0x172eff=_0x1192e4;this[_0x172eff(_0x35a257._0x25b1d1)]&&(this[_0x172eff(_0x35a257._0x4d554f)][_0x172eff(_0x35a257._0x50c972)](this[_0x172eff(0xcb)],!![]),delete this['_graphic']),this['_graphic2']&&(this[_0x172eff(0x8e)]['removeGraphic'](this['_graphic2'],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x13d176){const _0x24ac43={_0x14b1ab:0x93,_0x424bd9:0x8e,_0x2e9f2b:0xd7,_0x290f54:0xcb,_0x4edd94:0xc2,_0x5b724c:0xa0,_0x568ec1:0xa1,_0x871466:0x96,_0xd6a02f:0xd2},_0x4ba339=_0x1192e4;if(!this[_0x4ba339(_0x24ac43._0x14b1ab)]||!this[_0x4ba339(0xdc)]||!this['positions']||this['positions'][_0x4ba339(0x82)]===0x0)return this;const _0x5cfbea=this[_0x4ba339(0x97)]();if(this['style']['type']==='image')this[_0x4ba339(_0x24ac43._0x424bd9)]['setOptions']({'url':_0x5cfbea['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style'][_0x4ba339(_0x24ac43._0x2e9f2b)]?this['_graphic']&&_0x13d176?(this['_graphic']['uniforms']['image']=_0x5cfbea,this[_0x4ba339(_0x24ac43._0x290f54)]['uniforms']['bumpMap']=this[_0x4ba339(_0x24ac43._0x4edd94)](),this[_0x4ba339(_0x24ac43._0x5b724c)]&&(this['_graphic2'][_0x4ba339(0xd2)][_0x4ba339(_0x24ac43._0x568ec1)]=_0x5cfbea,this['_graphic2'][_0x4ba339(0xd2)]['bumpMap']=this['_graphic']['uniforms'][_0x4ba339(0xa4)])):this[_0x4ba339(_0x24ac43._0x871466)](_0x5cfbea):this['_graphic']&&_0x13d176?this['_graphic'][_0x4ba339(_0x24ac43._0xd6a02f)]['image']=_0x5cfbea:this[_0x4ba339(0x87)](_0x5cfbea);return this;}['_createGraphic'](_0x436649){const _0x422479={_0x3452e1:0x88,_0x5715b5:0xb3,_0x294898:0xb8,_0x3e28c5:0xc6,_0x507a8c:0x8e},_0xfe72c6=_0x1192e4;this[_0xfe72c6(_0x422479._0x3452e1)](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0xfe72c6(_0x422479._0x5715b5)],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0xfe72c6(_0x422479._0x294898))]({'material':new Cesium[(_0xfe72c6(_0x422479._0x3e28c5))]({'fabric':{'uniforms':{'image':_0x436649},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0xfe72c6(_0x422479._0x507a8c)]['addGraphic'](this['_graphic']);}['_createArcGraphic'](_0x30fa53){const _0x1b8be5={_0x18fbe4:0xb7,_0x4cd28d:0xc6,_0x2e9f9d:0xc9,_0x4399f2:0xc2,_0x58488b:0xc0,_0x2b5008:0xb8,_0x8e6fd:0xa0,_0xbfb7ca:0x89},_0x6ce040=_0x1192e4;this['clear']();const _0x3a0525=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium[_0x6ce040(_0x1b8be5._0x18fbe4)]['ALWAYS'],'backOperation':{'fail':Cesium[_0x6ce040(0x83)]['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium[_0x6ce040(0x83)]['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x27d1bf=Math[_0x6ce040(0x8d)](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style']['diffHeight']&&delete this['style']['diffHeight'];const _0x14a538=(this['style']['splitNum'],0x64);let _0x58670a=Math['max'](this['_rectangle']['height'],this['_rectangle']['width']);this['style']['granularity']=_0x58670a/=_0x14a538;const _0x43e49e=new Cesium[(_0x6ce040(_0x1b8be5._0x4cd28d))]({'fabric':{'uniforms':{'image':_0x30fa53,'repeat':new Cesium[(_0x6ce040(_0x1b8be5._0x2e9f9d))](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this[_0x6ce040(_0x1b8be5._0x4399f2)]()},'source':HeatMaterial},'translucent':!![]}),_0x377bd5=this[_0x6ce040(_0x1b8be5._0x58488b)]['arcDirection']||0x1;this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x6ce040(_0x1b8be5._0x2b5008))]({'flat':!![],'aboveGround':!![],'renderState':_0x3a0525,'material':_0x43e49e,'vertexShaderSource':getVertexShaderSource(_0x27d1bf*_0x377bd5)})}),this['_layer']['addGraphic'](this['_graphic']),this['style'][_0x6ce040(0x81)]===0x0&&(this[_0x6ce040(_0x1b8be5._0x8e6fd)]=new mars3d__namespace['graphic'][(_0x6ce040(_0x1b8be5._0xbfb7ca))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x3a0525,'material':_0x43e49e,'vertexShaderSource':getVertexShaderSource(-_0x27d1bf)})}),this['_layer']['addGraphic'](this['_graphic2']));}[_0x1192e4(0x8c)](_0x8d8e7f){const _0x2ffc9a={_0x2ac34f:0x8f},_0x23c09b=_0x1192e4;return _0x8d8e7f!==null&&_0x8d8e7f!==void 0x0&&_0x8d8e7f[_0x23c09b(_0x2ffc9a._0x2ac34f)]&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x486b04={_0x54c1ec:0x9b,_0x19f3bf:0xe2,_0x3ff190:0x80,_0x2c3a26:0xcf,_0x233d50:0x9f,_0x598c01:0xcc,_0x8a3079:0xa8,_0x3e7a44:0xad,_0x3f8df5:0xaa,_0x462f44:0xcd},_0x15cd21={_0xd2ae99:0xb4},_0x2488c4=_0x1192e4,_0x106491=this['_positions'],_0x40e652=[];let _0x572f1c,_0x219590,_0xd50aaf,_0x42134a;_0x106491['forEach'](_0x9a0b53=>{const _0x50e150=_0x598f,_0x212aaf=mars3d__namespace['LngLatPoint'][_0x50e150(0x99)](_0x9a0b53);if(!_0x212aaf)return;_0x212aaf[_0x50e150(0x8b)]=_0x9a0b53['value']||0x1,!this['options']['rectangle']&&(_0x572f1c===undefined?(_0x572f1c=_0x212aaf['lng'],_0x219590=_0x212aaf['lng'],_0xd50aaf=_0x212aaf['lat'],_0x42134a=_0x212aaf['lat']):(_0x572f1c=Math['min'](_0x572f1c,_0x212aaf['lng']),_0x219590=Math[_0x50e150(0xa6)](_0x219590,_0x212aaf['lng']),_0xd50aaf=Math['min'](_0xd50aaf,_0x212aaf[_0x50e150(0x92)]),_0x42134a=Math['max'](_0x42134a,_0x212aaf['lat']))),_0x40e652['push'](_0x212aaf);});_0x572f1c===_0x219590&&(_0x572f1c-=0.000001,_0x219590+=0.000001);_0xd50aaf===_0x42134a&&(_0xd50aaf-=0.000001,_0x42134a+=0.000001);let _0x5a69ae=this['options'][_0x2488c4(0xb0)]||{'xmin':_0x572f1c,'xmax':_0x219590,'ymin':_0xd50aaf,'ymax':_0x42134a};const _0x3914a8=getMercatorBounds(_0x5a69ae),_0x427d05=Math['abs'](_0x3914a8['xmax']-_0x3914a8['xmin']),_0x579baf=Math['abs'](_0x3914a8['ymax']-_0x3914a8['ymin']),_0x44ddf4=Math['max'](_0x427d05,_0x579baf),_0x2de1f6=Math[_0x2488c4(_0x486b04._0x54c1ec)](_0x427d05,_0x579baf);this[_0x2488c4(_0x486b04._0x19f3bf)]=_0x44ddf4;let _0x369b91=0x1;if(_0x44ddf4>this['options']['maxCanvasSize'])_0x369b91=_0x44ddf4/this['options']['maxCanvasSize'],_0x2de1f6/_0x369b91<this['options']['minCanvasSize']&&(_0x369b91=_0x2de1f6/this['options']['minCanvasSize']);else _0x2de1f6<this['options']['minCanvasSize']&&(_0x369b91=_0x2de1f6/this['options'][_0x2488c4(0x91)],_0x44ddf4/_0x369b91>this['options'][_0x2488c4(0xd6)]&&(_0x369b91=_0x44ddf4/this['options']['maxCanvasSize']));const _0x15da41=this['heatStyle']['radius']*1.5,_0x404faf=_0x427d05/_0x369b91+_0x15da41*0x2,_0x45bd21=_0x579baf/_0x369b91+_0x15da41*0x2,_0x96d06a=_0x15da41*_0x369b91;_0x3914a8['xmin']-=_0x96d06a,_0x3914a8[_0x2488c4(_0x486b04._0x3ff190)]-=_0x96d06a,_0x3914a8['xmax']+=_0x96d06a,_0x3914a8[_0x2488c4(0xcc)]+=_0x96d06a,this[_0x2488c4(0xa7)]=_0x369b91,_0x5a69ae=geLatLngBounds(_0x3914a8),this['_rectangle']=Cesium['Rectangle']['fromDegrees'](_0x5a69ae[_0x2488c4(_0x486b04._0x2c3a26)],_0x5a69ae['ymin'],_0x5a69ae['xmax'],_0x5a69ae['ymax']);let _0x5723bb=_0x40e652[0x0]['value']??0x1,_0x1e08b7=_0x40e652[0x0]['value']??0x0;const _0x3e6198=[];_0x40e652['forEach'](_0x458983=>{const _0x6e095=_0x2488c4,_0x390dfb=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x458983[_0x6e095(_0x15cd21._0xd2ae99)],_0x458983['lat']]),_0x669eb6=_0x458983['value']||0x1,_0x5d78b4=Math['round']((_0x390dfb[0x0]-_0x3914a8['xmin'])/_0x369b91),_0x1958fa=Math['round']((_0x3914a8['ymax']-_0x390dfb[0x1])/_0x369b91);_0x5723bb=Math['max'](_0x5723bb,_0x669eb6),_0x1e08b7=Math['min'](_0x1e08b7,_0x669eb6),_0x3e6198['push']({'x':_0x5d78b4,'y':_0x1958fa,'value':_0x669eb6});});const _0x2444e0={'min':this['options'][_0x2488c4(0x9b)]??_0x1e08b7,'max':this['options']['max']??_0x5723bb,'data':_0x3e6198};this['_last_heatData']=_0x2444e0;if(!this[_0x2488c4(0x9f)]||_0x3914a8['xmin']!==this[_0x2488c4(_0x486b04._0x233d50)]['xmin']||_0x3914a8['ymin']!==this['_last_mBounds']['ymin']||_0x3914a8['xmax']!==this['_last_mBounds']['xmax']||_0x3914a8[_0x2488c4(_0x486b04._0x598c01)]!==this['_last_mBounds']['ymax']){this['_last_mBounds']=_0x3914a8,this[_0x2488c4(_0x486b04._0x8a3079)]['style'][_0x2488c4(0xdf)]=_0x2488c4(_0x486b04._0x3e7a44)+_0x404faf+'px;height:'+_0x45bd21+'px;';const _0x5b853b={...this['heatStyle'],'container':this[_0x2488c4(_0x486b04._0x8a3079)]};!this[_0x2488c4(_0x486b04._0x3f8df5)]?this[_0x2488c4(0xaa)]=h337__namespace['create'](_0x5b853b):this[_0x2488c4(0xaa)]['configure'](_0x5b853b);}this['_heat'][_0x2488c4(_0x486b04._0x462f44)](_0x2444e0);const _0x398b47=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return _0x398b47;}[_0x1192e4(0xc2)](){const _0x1f9a4e={_0x262934:0xaa,_0x3704c4:0xbe,_0x183007:0xbd,_0x36ad82:0x9e,_0x1d86f7:0xc7},_0x400576=_0x1192e4;this[_0x400576(_0x1f9a4e._0x262934)]['configure']({'radius':this['heatStyle']['radius']*this['style'][_0x400576(_0x1f9a4e._0x3704c4)],'blur':this['heatStyle']['blur']*this['style']['arcBlurScale'],'gradient':this['heatStyle'][_0x400576(_0x1f9a4e._0x183007)]||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x26480f=mars3d__namespace['DomUtil'][_0x400576(_0x1f9a4e._0x36ad82)](this['_heat'][_0x400576(0xa2)][_0x400576(_0x1f9a4e._0x1d86f7)]);return this['_heat'][_0x400576(0xae)](this['options']['heatStyle']),_0x26480f;}[_0x1192e4(0x85)](_0x1c9f9c){const _0x36e194={_0x6126f3:0xb4,_0x29daf0:0xcf,_0x5c596e:0x98},_0x55cfef=_0x1192e4,_0xb9061d=mars3d__namespace['LngLatPoint']['parse'](_0x1c9f9c);if(!_0xb9061d)return{};const _0x22cf53=mars3d__namespace['PointTrans']['lonlat2mercator']([_0xb9061d[_0x55cfef(_0x36e194._0x6126f3)],_0xb9061d[_0x55cfef(0x92)]]),_0x25d6ab=this['_last_mBounds'],_0x970f36=Math['round']((_0x22cf53[0x0]-_0x25d6ab[_0x55cfef(_0x36e194._0x29daf0)])/this['_scale']),_0x3744e8=Math['round']((_0x25d6ab['ymax']-_0x22cf53[0x1])/this['_scale']),_0x4790b3=this['_heat'][_0x55cfef(_0x36e194._0x5c596e)]({'x':_0x970f36,'y':_0x3744e8}),_0x20bcc6=this['_heat']['_renderer']['ctx']['getImageData'](_0x970f36-0x1,_0x3744e8-0x1,0x1,0x1)['data'];return{'x':_0x970f36,'y':_0x3744e8,'value':_0x4790b3,'color':_0x55cfef(0x9d)+_0x20bcc6[0x0]+','+_0x20bcc6[0x1]+','+_0x20bcc6[0x2]+','+_0x20bcc6[0x3]+')'};}}mars3d__namespace[_0x1192e4(0xc3)][_0x1192e4(0xde)](_0x1192e4(0xac),HeatLayer),mars3d__namespace['layer'][_0x1192e4(0x94)]=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x46baa5){const _0x38f34c={_0x2adf97:0xd3,_0x56f2ea:0xd3},_0x5877d8=_0x1192e4,_0xa41642=mars3d__namespace[_0x5877d8(_0x38f34c._0x2adf97)]['lonlat2mercator']([_0x46baa5[_0x5877d8(0xcf)],_0x46baa5['ymin']]),_0xfd7a36=mars3d__namespace[_0x5877d8(_0x38f34c._0x56f2ea)]['lonlat2mercator']([_0x46baa5[_0x5877d8(0x7f)],_0x46baa5['ymax']]);return{'xmin':_0xa41642[0x0],'ymin':_0xa41642[0x1],'xmax':_0xfd7a36[0x0],'ymax':_0xfd7a36[0x1]};}function geLatLngBounds(_0x47125d){const _0x14ce35={_0x4850ff:0xd3,_0x59407e:0xcc},_0x425be7=_0x1192e4,_0x2e1a3c=mars3d__namespace[_0x425be7(_0x14ce35._0x4850ff)]['mercator2lonlat']([_0x47125d['xmin'],_0x47125d['ymin']]),_0x389bbf=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x47125d['xmax'],_0x47125d[_0x425be7(_0x14ce35._0x59407e)]]);return{'xmin':_0x2e1a3c[0x0],'ymin':_0x2e1a3c[0x1],'xmax':_0x389bbf[0x0],'ymax':_0x389bbf[0x1]};}function getVertexShaderSource(_0x5561aa){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'+_0x5561aa+';\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[_0x1192e4(0x94)]=HeatLayer,Object[_0x1192e4(0xbb)](exports,'__esModule',{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-heatmap",
3
- "version": "3.6.10",
3
+ "version": "3.6.12",
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.10"
13
+ "mars3d": "~3.6.12"
14
14
  },
15
15
  "scripts": {
16
16
  "lint": "eslint ./src/**/*.{js,ts} --fix"