mars3d-heatmap 3.5.11 → 3.5.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.5.11
5
- * 编译日期:2023-06-12 21:55:10
4
+ * 版本信息:v3.5.12
5
+ * 编译日期:2023-06-19 18:25:59
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 _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':!![]});
14
+ 'use strict';const _0x52b6c5=_0x102e;(function(_0x234ecd,_0x1ed489){const _0x1108fa={_0x1f9b92:0x10e,_0x20d067:0x104,_0x380ee6:0xd3,_0x742ba2:0x100,_0x43f670:0x10b},_0x2d7089=_0x102e,_0x5062c4=_0x234ecd();while(!![]){try{const _0x42fa90=parseInt(_0x2d7089(0xd0))/0x1+-parseInt(_0x2d7089(_0x1108fa._0x1f9b92))/0x2*(parseInt(_0x2d7089(_0x1108fa._0x20d067))/0x3)+parseInt(_0x2d7089(0xea))/0x4*(parseInt(_0x2d7089(_0x1108fa._0x380ee6))/0x5)+parseInt(_0x2d7089(0x110))/0x6+parseInt(_0x2d7089(_0x1108fa._0x742ba2))/0x7+parseInt(_0x2d7089(0x11a))/0x8+-parseInt(_0x2d7089(_0x1108fa._0x43f670))/0x9;if(_0x42fa90===_0x1ed489)break;else _0x5062c4['push'](_0x5062c4['shift']());}catch(_0x2cf3c5){_0x5062c4['push'](_0x5062c4['shift']());}}}(_0x800b,0xcff4b));function _interopNamespace(_0x571a50){const _0x1aee9b={_0x2ed7a7:0x103},_0x24407={_0x141189:0xe3},_0x5bbcfe=_0x102e;if(_0x571a50&&_0x571a50[_0x5bbcfe(_0x1aee9b._0x2ed7a7)])return _0x571a50;var _0x12ab75=Object[_0x5bbcfe(0xd5)](null);return _0x571a50&&Object['keys'](_0x571a50)[_0x5bbcfe(0x109)](function(_0x3456f8){const _0xdf6b6e=_0x5bbcfe;if(_0x3456f8!==_0xdf6b6e(_0x24407._0x141189)){var _0x42f2a5=Object[_0xdf6b6e(0xd6)](_0x571a50,_0x3456f8);Object[_0xdf6b6e(0x10d)](_0x12ab75,_0x3456f8,_0x42f2a5[_0xdf6b6e(0xf9)]?_0x42f2a5:{'enumerable':!![],'get':function(){return _0x571a50[_0x3456f8];}});}}),_0x12ab75['default']=_0x571a50,_0x12ab75;}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[_0x52b6c5(0xd5)])throw new Error('请引入\x20heatmap.js\x20库\x20');function _0x800b(){const _0x2d2f3d=['isFormat','default','remove','lonlat2mercator','xmax','radius','_container','Cartesian2','4908588HnyrEf','options','lng','parse','h337','granularity','green','setPositions','VERTEX_FORMAT','arcBlurScale','container','mercator2lonlat','_updatePositionsHook','_scale','removeLayer','get','_map','removeGraphic','image/png','heatStyle','abs','canvas','5791296rtxjVw','KEEP','_graphic','__esModule','609xTdbPy','mars3d-heatmap\x20mars3d-hideDiv','diffHeight','uniforms','EllipsoidSurfaceAppearance','forEach','push','39703113DxhUcK','setData','defineProperty','1186xbUHAz',';\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','2074662tjbfZG','_graphic2','RectanglePrimitive','_getArcHeatCanvas','PointTrans','layer','positions','getPointData','HeatLayer','graphic','11520232YRjaCP','StencilOperation','rgb(140,140,140)','fromDegrees','_createGraphic','floor','px;','clear','min','style','minCanvasSize','1543342vlFfzj','ymax','copyCanvas','5LZnVew','maxCanvasSize','create','getOwnPropertyDescriptor','formatRectangle','Util','_last_mBounds','_heat','DomUtil','_rectangle','ymin','_addedHook','rgba(','xmin','_layer'];_0x800b=function(){return _0x2d2f3d;};return _0x800b();}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer']['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:'blue',0.6:_0x52b6c5(0xf0),0.8:'yellow',0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance'][_0x52b6c5(0xf2)]};class HeatLayer extends BaseLayer{constructor(_0x147ed8={}){const _0x116cd0={_0x23cc80:0xeb,_0xa4dbd6:0xeb},_0xab780=_0x52b6c5;super(_0x147ed8),this['options']['maxCanvasSize']=this['options']['maxCanvasSize']??document['body']['clientWidth'],this[_0xab780(0xeb)]['maxCanvasSize']=Math['min'](this['options']['maxCanvasSize'],0x1388),this['options']['minCanvasSize']=this['options']['minCanvasSize']??document['body']['clientHeight'],this[_0xab780(0xeb)][_0xab780(0xcf)]=Math['max'](this[_0xab780(_0x116cd0._0x23cc80)]['minCanvasSize'],0x2bc),this['options']['heatStyle']={...DEF_HEATSTYLE,...this[_0xab780(_0x116cd0._0xa4dbd6)]['heatStyle']||{}},this['options']['style']={...DEF_STYLE,...this['options']['style']||{}};}get['layer'](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set[_0x52b6c5(0xfd)](_0x6ef19c){const _0x51ec43={_0x14fc49:0xd8},_0x245b7e=_0x52b6c5;this['options'][_0x245b7e(0xfd)]=mars3d__namespace[_0x245b7e(_0x51ec43._0x14fc49)]['merge'](this[_0x245b7e(0xeb)]['heatStyle'],_0x6ef19c),this['_heat']&&(this['_heat']['configure'](this['options']['heatStyle']),this['_updatePositionsHook'](!![]));}get['style'](){return this['options']['style'];}set[_0x52b6c5(0xce)](_0x399a1e){this['options']['style']=mars3d__namespace['Util']['merge'](this['options']['style'],_0x399a1e);}get['positions'](){return this['_positions'];}set['positions'](_0x4b4fe3){const _0x51a107=_0x52b6c5;this[_0x51a107(0xf1)](_0x4b4fe3);}get['coordinates'](){const _0x429167={_0x41731c:0x10a},_0x512243=[];return this['points']['forEach'](_0x111cb3=>{const _0x47517e=_0x102e;_0x512243[_0x47517e(_0x429167._0x41731c)](_0x111cb3['toArray']());}),_0x512243;}get['rectangle'](){return this['_rectangle'];}['_setOptionsHook'](_0x5946b2,_0x19469c){const _0x571b05={_0x3bafd9:0x116},_0xb1c07b=_0x52b6c5;_0x5946b2[_0xb1c07b(_0x571b05._0x3bafd9)]&&(this['positions']=_0x5946b2['positions']);}['_mountedHook'](){const _0x97ef8d={_0x3a74a8:0xce,_0x342599:0xe1,_0x1bdd89:0xe1},_0x2595ac=_0x52b6c5;this[_0x2595ac(_0x97ef8d._0x3a74a8)]['type']==='image'?this[_0x2595ac(_0x97ef8d._0x342599)]=new mars3d__namespace[(_0x2595ac(0x115))]['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this[_0x2595ac(_0x97ef8d._0x1bdd89)]=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}[_0x52b6c5(0xde)](){const _0x259003={_0x1e2fa4:0xe1,_0x183e0b:0xdb,_0x2b4dad:0x105,_0x24d1a8:0xfa,_0x11147b:0x116},_0x410388=_0x52b6c5;this['_map']['addLayer'](this[_0x410388(_0x259003._0x1e2fa4)]),this[_0x410388(0xe8)]=mars3d__namespace[_0x410388(_0x259003._0x183e0b)]['create']('div',_0x410388(_0x259003._0x2b4dad),this[_0x410388(_0x259003._0x24d1a8)][_0x410388(0xf4)]),this[_0x410388(0xeb)]['positions']&&(this[_0x410388(_0x259003._0x11147b)]=this['options']['positions']),this['options']['flyTo']&&this['flyToByAnimationEnd']();}['_removedHook'](){const _0x3582ad={_0x1040ac:0xdb,_0x1e2fd3:0xf8},_0x2e8068=_0x52b6c5;this['_container']&&(mars3d__namespace[_0x2e8068(_0x3582ad._0x1040ac)][_0x2e8068(0xe4)](this['_container']),delete this['_container']),this['clear'](),this['_map'][_0x2e8068(_0x3582ad._0x1e2fd3)](this['_layer']);}['addPosition'](_0x4860dc,_0x3ba749){const _0x1fa6f7={_0x39b790:0xf6},_0x2e2029=_0x52b6c5;this['_positions']=this['_positions']||[],this['_positions']['push'](_0x4860dc),this[_0x2e2029(_0x1fa6f7._0x39b790)](_0x3ba749);}['setPositions'](_0x2bda0c,_0x270bb2){this['_positions']=_0x2bda0c,this['_updatePositionsHook'](_0x270bb2);}['clear'](){const _0x2ca863={_0x53ba7d:0x102,_0x28c79b:0x111},_0x12548f=_0x52b6c5;this['_graphic']&&(this['_layer'][_0x12548f(0xfb)](this[_0x12548f(_0x2ca863._0x53ba7d)],!![]),delete this[_0x12548f(0x102)]),this['_graphic2']&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this[_0x12548f(_0x2ca863._0x28c79b)]);}['_updatePositionsHook'](_0x2436aa){const _0xec5584={_0x1048ef:0xfa,_0x1afa93:0x116,_0x59cff2:0xfc,_0x57321e:0xdc,_0xf700d6:0x107,_0x5ee511:0x111,_0x38f818:0x102,_0x4b09a4:0x102},_0x41ffa7=_0x52b6c5;if(!this['show']||!this[_0x41ffa7(_0xec5584._0x1048ef)]||!this[_0x41ffa7(_0xec5584._0x1afa93)]||this['positions']['length']===0x0)return this;const _0x5d5331=this['_getHeatCanvas']();if(this['style']['type']==='image')this['_layer']['setOptions']({'url':_0x5d5331['toDataURL'](_0x41ffa7(_0xec5584._0x59cff2)),'rectangle':this[_0x41ffa7(_0xec5584._0x57321e)],'opacity':this[_0x41ffa7(0xce)]['opacity']});else this['style']['arc']?this[_0x41ffa7(0x102)]&&_0x2436aa?(this['_graphic'][_0x41ffa7(_0xec5584._0xf700d6)]['image']=_0x5d5331,this['_graphic']['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x5d5331,this[_0x41ffa7(_0xec5584._0x5ee511)]['uniforms']['bumpMap']=this['_graphic']['uniforms']['bumpMap'])):this['_createArcGraphic'](_0x5d5331):this[_0x41ffa7(_0xec5584._0x38f818)]&&_0x2436aa?this[_0x41ffa7(_0xec5584._0x4b09a4)]['uniforms']['image']=_0x5d5331:this['_createGraphic'](_0x5d5331);return this;}[_0x52b6c5(0x11e)](_0x40ac9d){const _0x411e24={_0x14b6e6:0x119,_0x488cd0:0xe1},_0x34302f=_0x52b6c5;this['clear'](),this['_graphic']=new mars3d__namespace[(_0x34302f(_0x411e24._0x14b6e6))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x40ac9d},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x34302f(_0x411e24._0x488cd0)]['addGraphic'](this[_0x34302f(0x102)]);}['_createArcGraphic'](_0xd50db2){const _0x1284b4={_0x33566b:0x121,_0x4adc7a:0x101,_0x27eef6:0x101,_0x3c334b:0xef,_0x10e4c8:0xdc,_0x8e9d14:0x108},_0x38b5c9=_0x52b6c5;this[_0x38b5c9(_0x1284b4._0x33566b)]();const _0x58544f=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium[_0x38b5c9(0x11b)][_0x38b5c9(0x101)],'zFail':Cesium['StencilOperation'][_0x38b5c9(_0x1284b4._0x4adc7a)],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation'][_0x38b5c9(_0x1284b4._0x27eef6)],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x162bc9=Math[_0x38b5c9(0x11f)](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style'][_0x38b5c9(0x106)]&&delete this['style']['diffHeight'];const _0x5794ae=(this['style']['splitNum'],0x64);let _0x13b18f=Math['max'](this[_0x38b5c9(0xdc)]['height'],this['_rectangle']['width']);this['style'][_0x38b5c9(_0x1284b4._0x3c334b)]=_0x13b18f/=_0x5794ae;const _0x211ef4=new Cesium['Material']({'fabric':{'uniforms':{'image':_0xd50db2,'repeat':new Cesium[(_0x38b5c9(0xe9))](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this[_0x38b5c9(0x113)]()},'source':HeatMaterial},'translucent':!![]}),_0x24edb3=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace['graphic'][(_0x38b5c9(0x112))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x58544f,'material':_0x211ef4,'vertexShaderSource':getVertexShaderSource(_0x162bc9*_0x24edb3)})}),this[_0x38b5c9(0xe1)]['addGraphic'](this['_graphic']),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x38b5c9(_0x1284b4._0x10e4c8)],'appearance':new Cesium[(_0x38b5c9(_0x1284b4._0x8e9d14))]({'flat':!![],'aboveGround':!![],'renderState':_0x58544f,'material':_0x211ef4,'vertexShaderSource':getVertexShaderSource(-_0x162bc9)})}),this['_layer']['addGraphic'](this[_0x38b5c9(0x111)]));}['getRectangle'](_0x1ecdc7){const _0x453ce9={_0xec7e35:0xd7},_0x3e0b01=_0x52b6c5;return _0x1ecdc7!==null&&_0x1ecdc7!==void 0x0&&_0x1ecdc7[_0x3e0b01(0xe2)]&&this[_0x3e0b01(0xdc)]?mars3d__namespace['PolyUtil'][_0x3e0b01(_0x453ce9._0xec7e35)](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x395fb5={_0xc1bca5:0xfe,_0x4a9573:0xd1,_0x30d4fe:0xeb,_0x36edba:0xe6,_0x334195:0x120,_0x4115ba:0xfd,_0x572081:0xe8,_0x1efff8:0xda,_0x3bf95b:0xff},_0x14c7a4={_0x4f57d9:0xcd},_0x691d93={_0x543ce3:0xcd},_0xe4bb8a=_0x52b6c5,_0x38ebc2=this['_positions'],_0x4d9603=[];let _0x349405,_0x333b9d,_0x5e0fd2,_0x35ed54;_0x38ebc2[_0xe4bb8a(0x109)](_0x26dd90=>{const _0x2785ab=_0xe4bb8a,_0xe478e6=mars3d__namespace['LngLatPoint'][_0x2785ab(0xed)](_0x26dd90);if(!_0xe478e6)return;_0xe478e6['value']=_0x26dd90['value']||0x1,!this['options']['rectangle']&&(_0x349405===undefined?(_0x349405=_0xe478e6['lng'],_0x333b9d=_0xe478e6[_0x2785ab(0xec)],_0x5e0fd2=_0xe478e6['lat'],_0x35ed54=_0xe478e6['lat']):(_0x349405=Math['min'](_0x349405,_0xe478e6[_0x2785ab(0xec)]),_0x333b9d=Math['max'](_0x333b9d,_0xe478e6['lng']),_0x5e0fd2=Math[_0x2785ab(_0x691d93._0x543ce3)](_0x5e0fd2,_0xe478e6['lat']),_0x35ed54=Math['max'](_0x35ed54,_0xe478e6['lat']))),_0x4d9603[_0x2785ab(0x10a)](_0xe478e6);});_0x349405===_0x333b9d&&(_0x349405-=0.000001,_0x333b9d+=0.000001);_0x5e0fd2===_0x35ed54&&(_0x5e0fd2-=0.000001,_0x35ed54+=0.000001);let _0xe4dda8=this['options']['rectangle']||{'xmin':_0x349405,'xmax':_0x333b9d,'ymin':_0x5e0fd2,'ymax':_0x35ed54};const _0x5ac463=getMercatorBounds(_0xe4dda8),_0x2589bd=Math[_0xe4bb8a(_0x395fb5._0xc1bca5)](_0x5ac463['xmax']-_0x5ac463['xmin']),_0x3dd38d=Math[_0xe4bb8a(0xfe)](_0x5ac463[_0xe4bb8a(_0x395fb5._0x4a9573)]-_0x5ac463['ymin']),_0x139337=Math['max'](_0x2589bd,_0x3dd38d),_0x56533b=Math['min'](_0x2589bd,_0x3dd38d);this['_mBoundsMax']=_0x139337;let _0x59ddf8=0x1;if(_0x139337>this['options']['maxCanvasSize'])_0x59ddf8=_0x139337/this['options']['maxCanvasSize'],_0x56533b/_0x59ddf8<this[_0xe4bb8a(0xeb)]['minCanvasSize']&&(_0x59ddf8=_0x56533b/this[_0xe4bb8a(0xeb)]['minCanvasSize']);else _0x56533b<this['options']['minCanvasSize']&&(_0x59ddf8=_0x56533b/this['options']['minCanvasSize'],_0x139337/_0x59ddf8>this[_0xe4bb8a(_0x395fb5._0x30d4fe)]['maxCanvasSize']&&(_0x59ddf8=_0x139337/this['options'][_0xe4bb8a(0xd4)]));const _0x514178=this['heatStyle'][_0xe4bb8a(0xe7)]*1.5,_0x421f8e=_0x2589bd/_0x59ddf8+_0x514178*0x2,_0x4a0e32=_0x3dd38d/_0x59ddf8+_0x514178*0x2,_0x37fe91=_0x514178*_0x59ddf8;_0x5ac463['xmin']-=_0x37fe91,_0x5ac463['ymin']-=_0x37fe91,_0x5ac463['xmax']+=_0x37fe91,_0x5ac463['ymax']+=_0x37fe91,this['_scale']=_0x59ddf8,_0xe4dda8=geLatLngBounds(_0x5ac463),this['_rectangle']=Cesium['Rectangle'][_0xe4bb8a(0x11d)](_0xe4dda8['xmin'],_0xe4dda8['ymin'],_0xe4dda8[_0xe4bb8a(_0x395fb5._0x36edba)],_0xe4dda8['ymax']);let _0x28331c=_0x4d9603[0x0]['value']??0x1,_0x374d51=_0x4d9603[0x0]['value']??0x0;const _0x20bfff=[];_0x4d9603['forEach'](_0x24d152=>{const _0x2f3719=_0xe4bb8a,_0xfc4fa2=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x24d152['lng'],_0x24d152['lat']]),_0x459b01=_0x24d152['value']||0x1,_0x26c41f=Math['round']((_0xfc4fa2[0x0]-_0x5ac463[_0x2f3719(0xe0)])/_0x59ddf8),_0x50312c=Math['round']((_0x5ac463['ymax']-_0xfc4fa2[0x1])/_0x59ddf8);_0x28331c=Math['max'](_0x28331c,_0x459b01),_0x374d51=Math[_0x2f3719(_0x14c7a4._0x4f57d9)](_0x374d51,_0x459b01),_0x20bfff[_0x2f3719(0x10a)]({'x':_0x26c41f,'y':_0x50312c,'value':_0x459b01});});const _0x30f6d0={'min':this['options']['min']??_0x374d51,'max':this['options']['max']??_0x28331c,'data':_0x20bfff};this['_last_heatData']=_0x30f6d0;if(!this['_last_mBounds']||_0x5ac463['xmin']!==this[_0xe4bb8a(0xd9)]['xmin']||_0x5ac463[_0xe4bb8a(0xdd)]!==this['_last_mBounds']['ymin']||_0x5ac463[_0xe4bb8a(0xe6)]!==this[_0xe4bb8a(0xd9)]['xmax']||_0x5ac463[_0xe4bb8a(0xd1)]!==this['_last_mBounds']['ymax']){this[_0xe4bb8a(0xd9)]=_0x5ac463,this['_container']['style']['cssText']='width:'+_0x421f8e+'px;height:'+_0x4a0e32+_0xe4bb8a(_0x395fb5._0x334195);const _0x55db97={...this[_0xe4bb8a(_0x395fb5._0x4115ba)],'container':this[_0xe4bb8a(_0x395fb5._0x572081)]};!this[_0xe4bb8a(0xda)]?this[_0xe4bb8a(0xda)]=h337__namespace[_0xe4bb8a(0xd5)](_0x55db97):this['_heat']['configure'](_0x55db97);}this[_0xe4bb8a(0xda)][_0xe4bb8a(0x10c)](_0x30f6d0);const _0x4f69b6=mars3d__namespace['DomUtil'][_0xe4bb8a(0xd2)](this[_0xe4bb8a(_0x395fb5._0x1efff8)]['_renderer'][_0xe4bb8a(_0x395fb5._0x3bf95b)]);return _0x4f69b6;}['_getArcHeatCanvas'](){const _0xe92ce7={_0x4f351d:0xfd,_0x36a1c9:0xda},_0xc9f01c=_0x52b6c5;this['_heat']['configure']({'radius':this['heatStyle'][_0xc9f01c(0xe7)]*this['style']['arcRadiusScale'],'blur':this['heatStyle']['blur']*this['style'][_0xc9f01c(0xf3)],'gradient':this[_0xc9f01c(_0xe92ce7._0x4f351d)]['gradientArc']||{0.25:'rgb(0,0,0)',0.55:_0xc9f01c(0x11c),0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x48109c=mars3d__namespace[_0xc9f01c(0xdb)]['copyCanvas'](this[_0xc9f01c(_0xe92ce7._0x36a1c9)]['_renderer']['canvas']);return this['_heat']['configure'](this['options']['heatStyle']),_0x48109c;}[_0x52b6c5(0x117)](_0x15e71e){const _0x45d82f={_0x4266b6:0xe5,_0x6ff2c0:0xec,_0x14d2d3:0xf7,_0x250336:0xd1,_0x2d7a0f:0xdf},_0x4ce400=_0x52b6c5,_0x412a1f=mars3d__namespace['LngLatPoint']['parse'](_0x15e71e);if(!_0x412a1f)return{};const _0x103b6c=mars3d__namespace['PointTrans'][_0x4ce400(_0x45d82f._0x4266b6)]([_0x412a1f[_0x4ce400(_0x45d82f._0x6ff2c0)],_0x412a1f['lat']]),_0x3c3641=this[_0x4ce400(0xd9)],_0x45f558=Math['round']((_0x103b6c[0x0]-_0x3c3641['xmin'])/this[_0x4ce400(_0x45d82f._0x14d2d3)]),_0x264b46=Math['round']((_0x3c3641[_0x4ce400(_0x45d82f._0x250336)]-_0x103b6c[0x1])/this['_scale']),_0x2493d9=this['_heat']['getValueAt']({'x':_0x45f558,'y':_0x264b46}),_0x529463=this[_0x4ce400(0xda)]['_renderer']['ctx']['getImageData'](_0x45f558-0x1,_0x264b46-0x1,0x1,0x1)['data'];return{'x':_0x45f558,'y':_0x264b46,'value':_0x2493d9,'color':_0x4ce400(_0x45d82f._0x2d7a0f)+_0x529463[0x0]+','+_0x529463[0x1]+','+_0x529463[0x2]+','+_0x529463[0x3]+')'};}}mars3d__namespace['LayerUtil']['register']('heat',HeatLayer),mars3d__namespace[_0x52b6c5(0x115)]['HeatLayer']=HeatLayer,mars3d__namespace[_0x52b6c5(0xee)]=h337__namespace;function getMercatorBounds(_0x56346b){const _0xcf108d={_0x53d059:0x114},_0x335d6a=_0x52b6c5,_0x30502f=mars3d__namespace[_0x335d6a(_0xcf108d._0x53d059)]['lonlat2mercator']([_0x56346b['xmin'],_0x56346b['ymin']]),_0x31e42f=mars3d__namespace[_0x335d6a(0x114)][_0x335d6a(0xe5)]([_0x56346b[_0x335d6a(0xe6)],_0x56346b['ymax']]);return{'xmin':_0x30502f[0x0],'ymin':_0x30502f[0x1],'xmax':_0x31e42f[0x0],'ymax':_0x31e42f[0x1]};}function _0x102e(_0x410b4f,_0x720d09){const _0x800b68=_0x800b();return _0x102e=function(_0x102e2d,_0x2e7371){_0x102e2d=_0x102e2d-0xcd;let _0x3b0c92=_0x800b68[_0x102e2d];return _0x3b0c92;},_0x102e(_0x410b4f,_0x720d09);}function geLatLngBounds(_0x441331){const _0x19226f={_0x2d7123:0xe0,_0x35486f:0xe6},_0xb1680b=_0x52b6c5,_0x1ecf7f=mars3d__namespace[_0xb1680b(0x114)]['mercator2lonlat']([_0x441331[_0xb1680b(_0x19226f._0x2d7123)],_0x441331['ymin']]),_0x2ce7dd=mars3d__namespace['PointTrans'][_0xb1680b(0xf5)]([_0x441331[_0xb1680b(_0x19226f._0x35486f)],_0x441331['ymax']]);return{'xmin':_0x1ecf7f[0x0],'ymin':_0x1ecf7f[0x1],'xmax':_0x2ce7dd[0x0],'ymax':_0x2ce7dd[0x1]};}function getVertexShaderSource(_0x4d694){const _0x58908b={_0x508602:0x10f},_0xf666a4=_0x52b6c5;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'+_0x4d694+_0xf666a4(_0x58908b._0x508602);}exports[_0x52b6c5(0x118)]=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.11",
3
+ "version": "3.5.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.6"
11
11
  },
12
12
  "devDependencies": {
13
- "mars3d": "~3.5.11"
13
+ "mars3d": "~3.5.12"
14
14
  },
15
15
  "scripts": {
16
16
  "lint": "eslint ./src/**/*.{js,ts} --fix"