mars3d-heatmap 3.5.14 → 3.5.15

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.14
5
- * 编译日期:2023-07-03 18:37:16
4
+ * 版本信息:v3.5.15
5
+ * 编译日期:2023-07-10 19:14:40
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 _0x3b3454=_0x3a29;(function(_0x4b99f9,_0x5b238d){const _0x1aadd2={_0xd9e444:0xb8,_0x36d8c1:0x84,_0x3c317a:0xb3,_0xe78ff2:0x9b,_0x5bb03c:0x82,_0x9249c5:0x86,_0x3fa03e:0xb4},_0x5d66c8=_0x3a29,_0x3c4bf2=_0x4b99f9();while(!![]){try{const _0x22ab68=-parseInt(_0x5d66c8(_0x1aadd2._0xd9e444))/0x1+-parseInt(_0x5d66c8(_0x1aadd2._0x36d8c1))/0x2+-parseInt(_0x5d66c8(_0x1aadd2._0x3c317a))/0x3+parseInt(_0x5d66c8(_0x1aadd2._0xe78ff2))/0x4+parseInt(_0x5d66c8(_0x1aadd2._0x5bb03c))/0x5+-parseInt(_0x5d66c8(_0x1aadd2._0x9249c5))/0x6+parseInt(_0x5d66c8(0xaa))/0x7*(parseInt(_0x5d66c8(_0x1aadd2._0x3fa03e))/0x8);if(_0x22ab68===_0x5b238d)break;else _0x3c4bf2['push'](_0x3c4bf2['shift']());}catch(_0x58d372){_0x3c4bf2['push'](_0x3c4bf2['shift']());}}}(_0x6d61,0x8b1f4));function _interopNamespace(_0x36a520){const _0x213985={_0x162d86:0x8b},_0x51782a=_0x3a29;if(_0x36a520&&_0x36a520[_0x51782a(_0x213985._0x162d86)])return _0x36a520;var _0x2cd207=Object['create'](null);return _0x36a520&&Object['keys'](_0x36a520)['forEach'](function(_0x1c2dd7){const _0x5d6886=_0x51782a;if(_0x1c2dd7!=='default'){var _0x1adf8a=Object[_0x5d6886(0xc0)](_0x36a520,_0x1c2dd7);Object[_0x5d6886(0x79)](_0x2cd207,_0x1c2dd7,_0x1adf8a['get']?_0x1adf8a:{'enumerable':!![],'get':function(){return _0x36a520[_0x1c2dd7];}});}}),_0x2cd207[_0x51782a(0xa7)]=_0x36a520,_0x2cd207;}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[_0x3b3454(0x9f)])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer'][_0x3b3454(0xb2)],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:_0x3b3454(0x72),0.6:'green',0.8:_0x3b3454(0xb6),0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium[_0x3b3454(0x88)]['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x136243={}){const _0xe8e477={_0x56de3d:0x76},_0x2a8dc4=_0x3b3454;super(_0x136243),this['options']['maxCanvasSize']=this[_0x2a8dc4(0x76)]['maxCanvasSize']??document['body'][_0x2a8dc4(0xad)],this['options']['maxCanvasSize']=Math['min'](this['options'][_0x2a8dc4(0x8c)],0x1388),this[_0x2a8dc4(0x76)][_0x2a8dc4(0xbb)]=this[_0x2a8dc4(0x76)]['minCanvasSize']??document['body'][_0x2a8dc4(0x94)],this[_0x2a8dc4(_0xe8e477._0x56de3d)]['minCanvasSize']=Math['max'](this['options']['minCanvasSize'],0x2bc),this['options']['heatStyle']={...DEF_HEATSTYLE,...this['options']['heatStyle']},this[_0x2a8dc4(0x76)]['style']={...DEF_STYLE,...this[_0x2a8dc4(_0xe8e477._0x56de3d)][_0x2a8dc4(0xc4)]};}get[_0x3b3454(0x77)](){return this['_layer'];}get[_0x3b3454(0x91)](){return this['options']['heatStyle'];}set[_0x3b3454(0x91)](_0xbfa739){const _0x4c9cab=_0x3b3454;this['options']['heatStyle']=mars3d__namespace['Util'][_0x4c9cab(0xab)](this['options']['heatStyle'],_0xbfa739),this['_heat']&&(this['_heat']['configure'](this['options'][_0x4c9cab(0x91)]),this['_updatePositionsHook'](!![]));}get['style'](){return this['options']['style'];}set[_0x3b3454(0xc4)](_0x47f8b0){const _0x2010d7=_0x3b3454;this['options'][_0x2010d7(0xc4)]=mars3d__namespace['Util']['merge'](this['options']['style'],_0x47f8b0);}get[_0x3b3454(0x7b)](){return this['_positions'];}set[_0x3b3454(0x7b)](_0x5f0884){const _0x2a87c9=_0x3b3454;this[_0x2a87c9(0xbc)](_0x5f0884);}get[_0x3b3454(0xba)](){const _0x348806={_0x5964f1:0x8e},_0x5ece89=[];return this['points']['forEach'](_0x425ed0=>{const _0x1ce65b=_0x3a29;_0x5ece89[_0x1ce65b(_0x348806._0x5964f1)](_0x425ed0['toArray']());}),_0x5ece89;}get['rectangle'](){const _0x288431={_0x1ad444:0x97},_0x333996=_0x3b3454;return this[_0x333996(_0x288431._0x1ad444)];}['_setOptionsHook'](_0x53b9a3,_0x1bddc9){_0x53b9a3['positions']&&(this['positions']=_0x53b9a3['positions']);}['_mountedHook'](){const _0xa0ce21={_0x36ba08:0x99,_0x44b234:0x80},_0x3cd5bd=_0x3b3454;this['style']['type']==='image'?this['_layer']=new mars3d__namespace['layer'][(_0x3cd5bd(_0xa0ce21._0x36ba08))]({'crs':_0x3cd5bd(_0xa0ce21._0x44b234),'private':!![]}):this[_0x3cd5bd(0xa9)]=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0x4ed2e1={_0x49801b:0x7c,_0x3acdd1:0x95},_0x4e3e3d=_0x3b3454;this['_map']['addLayer'](this['_layer']),this[_0x4e3e3d(_0x4ed2e1._0x49801b)]=mars3d__namespace['DomUtil']['create']('div','mars3d-heatmap\x20mars3d-hideDiv',this['_map'][_0x4e3e3d(_0x4ed2e1._0x3acdd1)]),this['options']['positions']&&(this[_0x4e3e3d(0x7b)]=this[_0x4e3e3d(0x76)]['positions']),this['options']['flyTo']&&this['flyToByAnimationEnd']();}[_0x3b3454(0x9a)](){const _0x59313c={_0x30f1b7:0x87,_0x2724cf:0xc3},_0x40d44d=_0x3b3454;this[_0x40d44d(0x7c)]&&(mars3d__namespace['DomUtil']['remove'](this['_container']),delete this['_container']),this[_0x40d44d(_0x59313c._0x30f1b7)](),this['_map'][_0x40d44d(_0x59313c._0x2724cf)](this['_layer']);}['addPosition'](_0x139fee,_0x41ac87){const _0x4304d5=_0x3b3454;this['_positions']=this[_0x4304d5(0xc6)]||[],this['_positions']['push'](_0x139fee),this['_updatePositionsHook'](_0x41ac87);}['setPositions'](_0x4bb958,_0x132f52){const _0x25c6f6={_0x2b1203:0xc6,_0xad950e:0xa4},_0x1f8578=_0x3b3454;this[_0x1f8578(_0x25c6f6._0x2b1203)]=_0x4bb958,this[_0x1f8578(_0x25c6f6._0xad950e)](_0x132f52);}['clear'](){const _0x4fae12={_0x4a714a:0x9d,_0x354936:0x8f},_0x46c6de=_0x3b3454;this[_0x46c6de(_0x4fae12._0x4a714a)]&&(this['_layer']['removeGraphic'](this['_graphic'],!![]),delete this[_0x46c6de(0x9d)]),this[_0x46c6de(_0x4fae12._0x354936)]&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this[_0x46c6de(0x8f)]);}['_updatePositionsHook'](_0x3fa630){const _0x31a5b1={_0x334297:0x98,_0x562e08:0xbe},_0x13cdee=_0x3b3454;if(!this[_0x13cdee(0x81)]||!this['_map']||!this['positions']||this['positions']['length']===0x0)return this;const _0xc37f38=this[_0x13cdee(0xbd)]();if(this['style']['type']===_0x13cdee(_0x31a5b1._0x334297))this['_layer']['setOptions']({'url':_0xc37f38['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this[_0x13cdee(0xc4)][_0x13cdee(_0x31a5b1._0x562e08)]?this['_graphic']&&_0x3fa630?(this['_graphic']['uniforms']['image']=_0xc37f38,this['_graphic']['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0xc37f38,this['_graphic2']['uniforms'][_0x13cdee(0xb5)]=this[_0x13cdee(0x9d)]['uniforms'][_0x13cdee(0xb5)])):this['_createArcGraphic'](_0xc37f38):this['_graphic']&&_0x3fa630?this['_graphic'][_0x13cdee(0x89)][_0x13cdee(0x98)]=_0xc37f38:this['_createGraphic'](_0xc37f38);return this;}[_0x3b3454(0x7f)](_0x4a7f99){const _0x2d3f9c={_0x2a036a:0x7a},_0x31d59f=_0x3b3454;this['clear'](),this['_graphic']=new mars3d__namespace[(_0x31d59f(_0x2d3f9c._0x2a036a))]['RectanglePrimitive']({...this[_0x31d59f(0x76)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x4a7f99},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x31d59f(0xa9)]['addGraphic'](this['_graphic']);}[_0x3b3454(0xae)](_0xe022e0){const _0x28869c={_0xa16f88:0xaf,_0x423844:0x85,_0x39fce7:0x8a,_0x249fbb:0xb0,_0x5d8584:0xc1,_0x55ece3:0xb0,_0x16fb70:0x83,_0x4e94cf:0x97,_0xdf3b3a:0xb1,_0x163074:0xa9,_0x489019:0x93},_0x45f6c9=_0x3b3454;this['clear']();const _0x47cdb5=Cesium['RenderState'][_0x45f6c9(_0x28869c._0xa16f88)]({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium[_0x45f6c9(_0x28869c._0x423844)][_0x45f6c9(_0x28869c._0x39fce7)],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation'][_0x45f6c9(_0x28869c._0x249fbb)],'zPass':Cesium['StencilOperation'][_0x45f6c9(_0x28869c._0x5d8584)]},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation'][_0x45f6c9(_0x28869c._0x55ece3)],'zFail':Cesium[_0x45f6c9(0x9c)]['KEEP'],'zPass':Cesium[_0x45f6c9(0x9c)]['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x329245=Math[_0x45f6c9(_0x28869c._0x16fb70)](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style']['diffHeight']&&delete this['style']['diffHeight'];const _0x2cb063=(this['style']['splitNum'],0x64);let _0x3bb6b6=Math['max'](this['_rectangle']['height'],this[_0x45f6c9(_0x28869c._0x4e94cf)]['width']);this[_0x45f6c9(0xc4)]['granularity']=_0x3bb6b6/=_0x2cb063;const _0x5e53fc=new Cesium['Material']({'fabric':{'uniforms':{'image':_0xe022e0,'repeat':new Cesium[(_0x45f6c9(_0x28869c._0xdf3b3a))](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x3c5494=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace[(_0x45f6c9(0x7a))][(_0x45f6c9(0x93))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x47cdb5,'material':_0x5e53fc,'vertexShaderSource':getVertexShaderSource(_0x329245*_0x3c5494)})}),this[_0x45f6c9(_0x28869c._0x163074)]['addGraphic'](this['_graphic']),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace['graphic'][(_0x45f6c9(_0x28869c._0x489019))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x47cdb5,'material':_0x5e53fc,'vertexShaderSource':getVertexShaderSource(-_0x329245)})}),this[_0x45f6c9(0xa9)]['addGraphic'](this[_0x45f6c9(0x8f)]));}['getRectangle'](_0x2fbee6){const _0x2bf57e=_0x3b3454;return _0x2fbee6!==null&&_0x2fbee6!==void 0x0&&_0x2fbee6['isFormat']&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this['_rectangle']):this[_0x2bf57e(0x97)];}['_getHeatCanvas'](){const _0x10c6d7={_0x1b3fdd:0xc6,_0x28d1ba:0xc9,_0x5d7726:0x8d,_0x6a67e:0x76,_0x5b38:0xbb,_0x34f510:0x91,_0x27afd8:0xc9,_0x320766:0xca,_0xb4a8d3:0x92,_0x137f4f:0xb7,_0x3a486e:0xc8,_0x27b6dd:0x92,_0x1ff1dd:0x78,_0x5ee4be:0xbf},_0x31534d={_0x4db3c8:0xa2,_0x41661c:0xb9},_0x198d5c={_0x52a544:0xc2,_0x32a889:0xa8},_0x381445=_0x3b3454,_0x46e2ef=this[_0x381445(_0x10c6d7._0x1b3fdd)],_0x1881de=[];let _0x52d1b4,_0xf3ba42,_0x2fa048,_0x899d26;_0x46e2ef['forEach'](_0x55fba5=>{const _0x30469d=_0x381445,_0x2a0810=mars3d__namespace['LngLatPoint'][_0x30469d(0x90)](_0x55fba5);if(!_0x2a0810)return;_0x2a0810['value']=_0x55fba5[_0x30469d(0xb9)]||0x1,!this['options']['rectangle']&&(_0x52d1b4===undefined?(_0x52d1b4=_0x2a0810['lng'],_0xf3ba42=_0x2a0810['lng'],_0x2fa048=_0x2a0810[_0x30469d(_0x198d5c._0x52a544)],_0x899d26=_0x2a0810['lat']):(_0x52d1b4=Math['min'](_0x52d1b4,_0x2a0810['lng']),_0xf3ba42=Math['max'](_0xf3ba42,_0x2a0810[_0x30469d(_0x198d5c._0x32a889)]),_0x2fa048=Math['min'](_0x2fa048,_0x2a0810[_0x30469d(0xc2)]),_0x899d26=Math[_0x30469d(0xb7)](_0x899d26,_0x2a0810['lat']))),_0x1881de['push'](_0x2a0810);});_0x52d1b4===_0xf3ba42&&(_0x52d1b4-=0.000001,_0xf3ba42+=0.000001);_0x2fa048===_0x899d26&&(_0x2fa048-=0.000001,_0x899d26+=0.000001);let _0x43c964=this[_0x381445(0x76)]['rectangle']||{'xmin':_0x52d1b4,'xmax':_0xf3ba42,'ymin':_0x2fa048,'ymax':_0x899d26};const _0x84986=getMercatorBounds(_0x43c964),_0x1fea45=Math['abs'](_0x84986[_0x381445(_0x10c6d7._0x28d1ba)]-_0x84986['xmin']),_0xf8363b=Math['abs'](_0x84986[_0x381445(_0x10c6d7._0x5d7726)]-_0x84986['ymin']),_0x5f46a6=Math['max'](_0x1fea45,_0xf8363b),_0x1ab60f=Math['min'](_0x1fea45,_0xf8363b);this['_mBoundsMax']=_0x5f46a6;let _0x5eb0f=0x1;if(_0x5f46a6>this[_0x381445(0x76)]['maxCanvasSize'])_0x5eb0f=_0x5f46a6/this['options']['maxCanvasSize'],_0x1ab60f/_0x5eb0f<this['options']['minCanvasSize']&&(_0x5eb0f=_0x1ab60f/this[_0x381445(_0x10c6d7._0x6a67e)]['minCanvasSize']);else _0x1ab60f<this['options'][_0x381445(_0x10c6d7._0x5b38)]&&(_0x5eb0f=_0x1ab60f/this['options']['minCanvasSize'],_0x5f46a6/_0x5eb0f>this['options']['maxCanvasSize']&&(_0x5eb0f=_0x5f46a6/this['options']['maxCanvasSize']));const _0x404632=this[_0x381445(_0x10c6d7._0x34f510)][_0x381445(0xc7)]*1.5,_0x121f4a=_0x1fea45/_0x5eb0f+_0x404632*0x2,_0x1479e4=_0xf8363b/_0x5eb0f+_0x404632*0x2,_0x1fe7ae=_0x404632*_0x5eb0f;_0x84986[_0x381445(0xca)]-=_0x1fe7ae,_0x84986[_0x381445(0x92)]-=_0x1fe7ae,_0x84986[_0x381445(_0x10c6d7._0x27afd8)]+=_0x1fe7ae,_0x84986['ymax']+=_0x1fe7ae,this['_scale']=_0x5eb0f,_0x43c964=geLatLngBounds(_0x84986),this['_rectangle']=Cesium['Rectangle']['fromDegrees'](_0x43c964[_0x381445(_0x10c6d7._0x320766)],_0x43c964[_0x381445(_0x10c6d7._0xb4a8d3)],_0x43c964['xmax'],_0x43c964['ymax']);let _0x1de720=_0x1881de[0x0]['value']??0x1,_0x58d671=_0x1881de[0x0]['value']??0x0;const _0xd88ceb=[];_0x1881de['forEach'](_0x10ebfa=>{const _0x4be473=_0x381445,_0x3a36fe=mars3d__namespace[_0x4be473(_0x31534d._0x4db3c8)][_0x4be473(0x96)]([_0x10ebfa[_0x4be473(0xa8)],_0x10ebfa[_0x4be473(0xc2)]]),_0x357114=_0x10ebfa[_0x4be473(_0x31534d._0x41661c)]||0x1,_0x5ae9db=Math['round']((_0x3a36fe[0x0]-_0x84986['xmin'])/_0x5eb0f),_0x157f18=Math['round']((_0x84986['ymax']-_0x3a36fe[0x1])/_0x5eb0f);_0x1de720=Math['max'](_0x1de720,_0x357114),_0x58d671=Math['min'](_0x58d671,_0x357114),_0xd88ceb['push']({'x':_0x5ae9db,'y':_0x157f18,'value':_0x357114});});const _0x1a6aa4={'min':this[_0x381445(0x76)][_0x381445(0xa3)]??_0x58d671,'max':this['options'][_0x381445(_0x10c6d7._0x137f4f)]??_0x1de720,'data':_0xd88ceb};this['_last_heatData']=_0x1a6aa4;if(!this[_0x381445(_0x10c6d7._0x3a486e)]||_0x84986['xmin']!==this['_last_mBounds'][_0x381445(0xca)]||_0x84986['ymin']!==this['_last_mBounds'][_0x381445(_0x10c6d7._0x27b6dd)]||_0x84986[_0x381445(0xc9)]!==this['_last_mBounds']['xmax']||_0x84986['ymax']!==this['_last_mBounds']['ymax']){this[_0x381445(0xc8)]=_0x84986,this['_container']['style']['cssText']='width:'+_0x121f4a+_0x381445(_0x10c6d7._0x1ff1dd)+_0x1479e4+'px;';const _0x1b5006={...this['heatStyle'],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace['create'](_0x1b5006):this[_0x381445(_0x10c6d7._0x5ee4be)]['configure'](_0x1b5006);}this['_heat']['setData'](_0x1a6aa4);const _0x19f794=mars3d__namespace[_0x381445(0x7d)]['copyCanvas'](this[_0x381445(_0x10c6d7._0x5ee4be)]['_renderer'][_0x381445(0x9e)]);return _0x19f794;}[_0x3b3454(0xc5)](){const _0x15e0fc={_0x3cfc1a:0xbf,_0x4c32bd:0xc4,_0x93e81d:0xac},_0x3dc204=_0x3b3454;this[_0x3dc204(_0x15e0fc._0x3cfc1a)]['configure']({'radius':this['heatStyle']['radius']*this[_0x3dc204(_0x15e0fc._0x4c32bd)]['arcRadiusScale'],'blur':this['heatStyle'][_0x3dc204(0x73)]*this[_0x3dc204(_0x15e0fc._0x4c32bd)][_0x3dc204(0x75)],'gradient':this['heatStyle'][_0x3dc204(_0x15e0fc._0x93e81d)]||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x4832c0=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return this[_0x3dc204(_0x15e0fc._0x3cfc1a)]['configure'](this['options']['heatStyle']),_0x4832c0;}[_0x3b3454(0xa0)](_0x19dcc1){const _0x2a8ec5={_0x1bd95c:0x96,_0x291e0a:0xc8,_0x238b91:0xbf,_0x1907e4:0xa1},_0x49cde8=_0x3b3454,_0x5d62f5=mars3d__namespace['LngLatPoint'][_0x49cde8(0x90)](_0x19dcc1);if(!_0x5d62f5)return{};const _0x59bc17=mars3d__namespace['PointTrans'][_0x49cde8(_0x2a8ec5._0x1bd95c)]([_0x5d62f5['lng'],_0x5d62f5['lat']]),_0x6967d9=this[_0x49cde8(_0x2a8ec5._0x291e0a)],_0x4905a6=Math['round']((_0x59bc17[0x0]-_0x6967d9[_0x49cde8(0xca)])/this['_scale']),_0x128c25=Math['round']((_0x6967d9['ymax']-_0x59bc17[0x1])/this['_scale']),_0x1cc7da=this[_0x49cde8(_0x2a8ec5._0x238b91)]['getValueAt']({'x':_0x4905a6,'y':_0x128c25}),_0x187f18=this['_heat'][_0x49cde8(0x74)]['ctx'][_0x49cde8(0xa5)](_0x4905a6-0x1,_0x128c25-0x1,0x1,0x1)['data'];return{'x':_0x4905a6,'y':_0x128c25,'value':_0x1cc7da,'color':_0x49cde8(_0x2a8ec5._0x1907e4)+_0x187f18[0x0]+','+_0x187f18[0x1]+','+_0x187f18[0x2]+','+_0x187f18[0x3]+')'};}}mars3d__namespace['LayerUtil'][_0x3b3454(0xa6)]('heat',HeatLayer),mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function _0x3a29(_0x96ed54,_0x3aea55){const _0x6d618=_0x6d61();return _0x3a29=function(_0x3a29b9,_0x2402c9){_0x3a29b9=_0x3a29b9-0x72;let _0x51a7d1=_0x6d618[_0x3a29b9];return _0x51a7d1;},_0x3a29(_0x96ed54,_0x3aea55);}function getMercatorBounds(_0x2e613e){const _0x153c2d={_0x5e7591:0xca,_0x1d02cf:0xc9},_0x410575=_0x3b3454,_0x110bc5=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x2e613e[_0x410575(_0x153c2d._0x5e7591)],_0x2e613e[_0x410575(0x92)]]),_0x13c88b=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x2e613e[_0x410575(_0x153c2d._0x1d02cf)],_0x2e613e['ymax']]);return{'xmin':_0x110bc5[0x0],'ymin':_0x110bc5[0x1],'xmax':_0x13c88b[0x0],'ymax':_0x13c88b[0x1]};}function geLatLngBounds(_0x5df521){const _0x3f852e={_0x334ef6:0xca,_0x2ecefb:0xa2,_0x37a64a:0xc9,_0x4c520e:0x8d},_0x2ddcf0=_0x3b3454,_0x97c1c9=mars3d__namespace[_0x2ddcf0(0xa2)][_0x2ddcf0(0x7e)]([_0x5df521[_0x2ddcf0(_0x3f852e._0x334ef6)],_0x5df521['ymin']]),_0xbccb4d=mars3d__namespace[_0x2ddcf0(_0x3f852e._0x2ecefb)]['mercator2lonlat']([_0x5df521[_0x2ddcf0(_0x3f852e._0x37a64a)],_0x5df521[_0x2ddcf0(_0x3f852e._0x4c520e)]]);return{'xmin':_0x97c1c9[0x0],'ymin':_0x97c1c9[0x1],'xmax':_0xbccb4d[0x0],'ymax':_0xbccb4d[0x1]};}function getVertexShaderSource(_0x1f0438){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'+_0x1f0438+';\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['defineProperty'](exports,'__esModule',{'value':!![]});function _0x6d61(){const _0x3500e5=['px;height:','defineProperty','graphic','positions','_container','DomUtil','mercator2lonlat','_createGraphic','EPSG:3857','show','5144080MnAUXd','floor','1440754ZDOwdR','StencilFunction','6508464YippGE','clear','EllipsoidSurfaceAppearance','uniforms','ALWAYS','__esModule','maxCanvasSize','ymax','push','_graphic2','parse','heatStyle','ymin','RectanglePrimitive','clientHeight','container','lonlat2mercator','_rectangle','image','ImageLayer','_removedHook','3931544riFdQs','StencilOperation','_graphic','canvas','create','getPointData','rgba(','PointTrans','min','_updatePositionsHook','getImageData','register','default','lng','_layer','7mmtwwY','merge','gradientArc','clientWidth','_createArcGraphic','fromCache','KEEP','Cartesian2','BaseLayer','1076388lMUvVJ','8374464DNsEHA','bumpMap','yellow','max','324749kfMpEY','value','coordinates','minCanvasSize','setPositions','_getHeatCanvas','arc','_heat','getOwnPropertyDescriptor','REPLACE','lat','removeLayer','style','_getArcHeatCanvas','_positions','radius','_last_mBounds','xmax','xmin','blue','blur','_renderer','arcBlurScale','options','layer'];_0x6d61=function(){return _0x3500e5;};return _0x6d61();}
14
+ 'use strict';const _0x47f96c=_0x1f53;(function(_0x17c85d,_0x97dc7c){const _0xed129c={_0x25c300:0xd1,_0x2e7c24:0xe3,_0x37396:0xf6},_0x288344=_0x1f53,_0x1e06bf=_0x17c85d();while(!![]){try{const _0x291729=-parseInt(_0x288344(_0xed129c._0x25c300))/0x1*(parseInt(_0x288344(_0xed129c._0x2e7c24))/0x2)+parseInt(_0x288344(0xfc))/0x3+parseInt(_0x288344(_0xed129c._0x37396))/0x4+-parseInt(_0x288344(0xc3))/0x5*(-parseInt(_0x288344(0xe1))/0x6)+-parseInt(_0x288344(0xdc))/0x7*(parseInt(_0x288344(0xd5))/0x8)+parseInt(_0x288344(0xef))/0x9+-parseInt(_0x288344(0x105))/0xa;if(_0x291729===_0x97dc7c)break;else _0x1e06bf['push'](_0x1e06bf['shift']());}catch(_0x592cc0){_0x1e06bf['push'](_0x1e06bf['shift']());}}}(_0x278f,0x868b4));function _interopNamespace(_0x3e95b1){const _0xfddcc7={_0x1543b9:0xf9},_0x48ea7d={_0x2f109b:0xee},_0x2ecf8b=_0x1f53;if(_0x3e95b1&&_0x3e95b1['__esModule'])return _0x3e95b1;var _0x3fbc18=Object['create'](null);return _0x3e95b1&&Object[_0x2ecf8b(0xc6)](_0x3e95b1)['forEach'](function(_0x17d45b){const _0x7aba75=_0x2ecf8b;if(_0x17d45b!=='default'){var _0x2855ba=Object['getOwnPropertyDescriptor'](_0x3e95b1,_0x17d45b);Object[_0x7aba75(0xcf)](_0x3fbc18,_0x17d45b,_0x2855ba[_0x7aba75(_0x48ea7d._0x2f109b)]?_0x2855ba:{'enumerable':!![],'get':function(){return _0x3e95b1[_0x17d45b];}});}}),_0x3fbc18[_0x2ecf8b(_0xfddcc7._0x1543b9)]=_0x3e95b1,_0x3fbc18;}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');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:'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(_0xd94831={}){const _0x24ebe3={_0x25ba93:0xf5,_0x9c1012:0x108,_0x1c5a25:0x107},_0x11b31f=_0x1f53;super(_0xd94831),this['options']['maxCanvasSize']=this['options']['maxCanvasSize']??document['body']['clientWidth'],this['options']['maxCanvasSize']=Math[_0x11b31f(_0x24ebe3._0x25ba93)](this['options']['maxCanvasSize'],0x1388),this['options']['minCanvasSize']=this['options'][_0x11b31f(0xfa)]??document['body']['clientHeight'],this[_0x11b31f(_0x24ebe3._0x9c1012)]['minCanvasSize']=Math[_0x11b31f(0x102)](this['options']['minCanvasSize'],0x2bc),this[_0x11b31f(0x108)]['heatStyle']={...DEF_HEATSTYLE,...this[_0x11b31f(_0x24ebe3._0x9c1012)]['heatStyle']},this['options']['style']={...DEF_STYLE,...this['options'][_0x11b31f(_0x24ebe3._0x1c5a25)]};}get[_0x47f96c(0xea)](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set['heatStyle'](_0x980075){const _0x2717fb={_0x297fe5:0x10c,_0x3faa36:0xc9},_0x10e644=_0x47f96c;this['options'][_0x10e644(0xc9)]=mars3d__namespace[_0x10e644(0xe9)][_0x10e644(_0x2717fb._0x297fe5)](this[_0x10e644(0x108)][_0x10e644(_0x2717fb._0x3faa36)],_0x980075),this['_heat']&&(this['_heat']['configure'](this['options']['heatStyle']),this['_updatePositionsHook'](!![]));}get['style'](){const _0x34f78c={_0x5b13f2:0x107},_0x304050=_0x47f96c;return this['options'][_0x304050(_0x34f78c._0x5b13f2)];}set['style'](_0xf2e28a){this['options']['style']=mars3d__namespace['Util']['merge'](this['options']['style'],_0xf2e28a);}get['positions'](){return this['_positions'];}set['positions'](_0x490b80){this['setPositions'](_0x490b80);}get['coordinates'](){const _0x16c733={_0x5a9051:0xe0},_0x4385d5=_0x47f96c,_0x1004e8=[];return this[_0x4385d5(_0x16c733._0x5a9051)]['forEach'](_0x56836b=>{_0x1004e8['push'](_0x56836b['toArray']());}),_0x1004e8;}get[_0x47f96c(0xe6)](){const _0x29959d=_0x47f96c;return this[_0x29959d(0xd7)];}['_setOptionsHook'](_0x1306b4,_0x284bfc){const _0x4027f1={_0x498b0a:0xce},_0x5bdf35=_0x47f96c;_0x1306b4['positions']&&(this[_0x5bdf35(_0x4027f1._0x498b0a)]=_0x1306b4['positions']);}['_mountedHook'](){const _0x50e38f={_0xe5e0d7:0x106},_0x2da190=_0x47f96c;this['style'][_0x2da190(0x101)]==='image'?this['_layer']=new mars3d__namespace['layer']['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this[_0x2da190(_0x50e38f._0xe5e0d7)]=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}[_0x47f96c(0xc7)](){const _0x230d68={_0x5799e5:0x106,_0x506d52:0xe5,_0x3daf66:0xce,_0x28b253:0x109,_0x480aed:0x104},_0x545f38=_0x47f96c;this[_0x545f38(0xdf)]['addLayer'](this[_0x545f38(_0x230d68._0x5799e5)]),this['_container']=mars3d__namespace['DomUtil'][_0x545f38(0x103)]('div','mars3d-heatmap\x20mars3d-hideDiv',this[_0x545f38(0xdf)][_0x545f38(_0x230d68._0x506d52)]),this['options'][_0x545f38(_0x230d68._0x3daf66)]&&(this[_0x545f38(_0x230d68._0x3daf66)]=this[_0x545f38(0x108)]['positions']),this['options'][_0x545f38(_0x230d68._0x28b253)]&&this[_0x545f38(_0x230d68._0x480aed)]();}['_removedHook'](){const _0x27ecaa=_0x47f96c;this[_0x27ecaa(0xd4)]&&(mars3d__namespace['DomUtil']['remove'](this['_container']),delete this[_0x27ecaa(0xd4)]),this['clear'](),this['_map']['removeLayer'](this['_layer']);}['addPosition'](_0x37a920,_0x55adc0){const _0x1c8221=_0x47f96c;this[_0x1c8221(0xd0)]=this['_positions']||[],this['_positions']['push'](_0x37a920),this['_updatePositionsHook'](_0x55adc0);}['setPositions'](_0x8e1165,_0xdd3287){const _0xa173c5={_0x1e7397:0xd9},_0x1ed166=_0x47f96c;this['_positions']=_0x8e1165,this[_0x1ed166(_0xa173c5._0x1e7397)](_0xdd3287);}['clear'](){const _0x15929d={_0x21451a:0x106,_0x4af07d:0xf8,_0x26a4b5:0xbf},_0x4ce1d0=_0x47f96c;this['_graphic']&&(this[_0x4ce1d0(_0x15929d._0x21451a)]['removeGraphic'](this[_0x4ce1d0(0xf8)],!![]),delete this[_0x4ce1d0(_0x15929d._0x4af07d)]),this['_graphic2']&&(this['_layer']['removeGraphic'](this[_0x4ce1d0(_0x15929d._0x26a4b5)],!![]),delete this['_graphic2']);}[_0x47f96c(0xd9)](_0x460140){const _0x37586d={_0x68eb16:0xdf,_0x2eaef3:0xc1,_0x25c3c7:0xfe,_0x53b328:0xda,_0x39e7a3:0xfe},_0x22f860=_0x47f96c;if(!this['show']||!this[_0x22f860(_0x37586d._0x68eb16)]||!this[_0x22f860(0xce)]||this['positions']['length']===0x0)return this;const _0x5797b2=this['_getHeatCanvas']();if(this['style']['type']==='image')this[_0x22f860(0x106)]['setOptions']({'url':_0x5797b2['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style'][_0x22f860(_0x37586d._0x2eaef3)]?this['_graphic']&&_0x460140?(this['_graphic']['uniforms']['image']=_0x5797b2,this['_graphic'][_0x22f860(_0x37586d._0x25c3c7)][_0x22f860(0x100)]=this[_0x22f860(_0x37586d._0x53b328)](),this['_graphic2']&&(this['_graphic2'][_0x22f860(_0x37586d._0x25c3c7)][_0x22f860(0xc8)]=_0x5797b2,this[_0x22f860(0xbf)]['uniforms']['bumpMap']=this[_0x22f860(0xf8)][_0x22f860(_0x37586d._0x39e7a3)]['bumpMap'])):this['_createArcGraphic'](_0x5797b2):this['_graphic']&&_0x460140?this['_graphic']['uniforms']['image']=_0x5797b2:this['_createGraphic'](_0x5797b2);return this;}['_createGraphic'](_0x22ceda){const _0x55b1a2={_0x103ca6:0xf8},_0x571f07=_0x47f96c;this[_0x571f07(0xc0)](),this[_0x571f07(0xf8)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0x571f07(0x108)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x22ceda},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x571f07(0x106)]['addGraphic'](this[_0x571f07(_0x55b1a2._0x103ca6)]);}[_0x47f96c(0x10b)](_0x2ead3d){const _0x10f19c={_0x272707:0xc0,_0x3d906a:0xe2,_0x1ac7de:0xe7,_0x5ca090:0xe7,_0x451542:0xe4,_0x5a82b5:0xd6,_0x56c585:0xf0,_0x21a4f1:0xfb,_0x8f94f7:0xbf,_0x9a63a9:0xd7},_0x10c6b8=_0x47f96c;this[_0x10c6b8(_0x10f19c._0x272707)]();const _0x57a45b=Cesium[_0x10c6b8(_0x10f19c._0x3d906a)]['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction'][_0x10c6b8(_0x10f19c._0x1ac7de)],'frontOperation':{'fail':Cesium[_0x10c6b8(0xe4)]['KEEP'],'zFail':Cesium['StencilOperation'][_0x10c6b8(0xc4)],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium['StencilFunction'][_0x10c6b8(_0x10f19c._0x5ca090)],'backOperation':{'fail':Cesium[_0x10c6b8(_0x10f19c._0x451542)]['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium[_0x10c6b8(_0x10f19c._0x451542)]['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x220729=Math['floor'](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style']['diffHeight']&&delete this[_0x10c6b8(0x107)][_0x10c6b8(_0x10f19c._0x5a82b5)];const _0x451d30=(this['style']['splitNum'],0x64);let _0x4f3e28=Math['max'](this['_rectangle']['height'],this['_rectangle']['width']);this['style']['granularity']=_0x4f3e28/=_0x451d30;const _0x5deb48=new Cesium[(_0x10c6b8(_0x10f19c._0x56c585))]({'fabric':{'uniforms':{'image':_0x2ead3d,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x51e62c=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x57a45b,'material':_0x5deb48,'vertexShaderSource':getVertexShaderSource(_0x220729*_0x51e62c)})}),this[_0x10c6b8(0x106)]['addGraphic'](this['_graphic']),this['style'][_0x10c6b8(_0x10f19c._0x21a4f1)]===0x0&&(this[_0x10c6b8(_0x10f19c._0x8f94f7)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x10c6b8(_0x10f19c._0x9a63a9)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x57a45b,'material':_0x5deb48,'vertexShaderSource':getVertexShaderSource(-_0x220729)})}),this['_layer']['addGraphic'](this['_graphic2']));}['getRectangle'](_0x27523e){const _0x5e91e9=_0x47f96c;return _0x27523e!==null&&_0x27523e!==void 0x0&&_0x27523e[_0x5e91e9(0xd2)]&&this['_rectangle']?mars3d__namespace[_0x5e91e9(0xcb)]['formatRectangle'](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x5bd582={_0x13af5c:0x108,_0x133a86:0xc5,_0x132d93:0x108,_0x2fe834:0x108,_0x28173d:0xf4,_0x25854b:0x10d,_0x35635a:0x10a},_0xc7c3c7={_0x4d7d6e:0xcc,_0x5892a4:0xf2},_0xa3c03d={_0x494d6e:0xf5},_0x2248f0=_0x47f96c,_0x2f2bbe=this[_0x2248f0(0xd0)],_0x28c556=[];let _0x62d2b9,_0x41020e,_0xd4fd49,_0x462b11;_0x2f2bbe['forEach'](_0x2f6782=>{const _0x498242=_0x2248f0,_0x34b2fc=mars3d__namespace[_0x498242(0xde)]['parse'](_0x2f6782);if(!_0x34b2fc)return;_0x34b2fc['value']=_0x2f6782['value']||0x1,!this['options']['rectangle']&&(_0x62d2b9===undefined?(_0x62d2b9=_0x34b2fc['lng'],_0x41020e=_0x34b2fc[_0x498242(0xf2)],_0xd4fd49=_0x34b2fc['lat'],_0x462b11=_0x34b2fc['lat']):(_0x62d2b9=Math['min'](_0x62d2b9,_0x34b2fc['lng']),_0x41020e=Math['max'](_0x41020e,_0x34b2fc['lng']),_0xd4fd49=Math[_0x498242(_0xa3c03d._0x494d6e)](_0xd4fd49,_0x34b2fc['lat']),_0x462b11=Math[_0x498242(0x102)](_0x462b11,_0x34b2fc['lat']))),_0x28c556['push'](_0x34b2fc);});_0x62d2b9===_0x41020e&&(_0x62d2b9-=0.000001,_0x41020e+=0.000001);_0xd4fd49===_0x462b11&&(_0xd4fd49-=0.000001,_0x462b11+=0.000001);let _0x2d4b5f=this['options'][_0x2248f0(0xe6)]||{'xmin':_0x62d2b9,'xmax':_0x41020e,'ymin':_0xd4fd49,'ymax':_0x462b11};const _0x4ef9ca=getMercatorBounds(_0x2d4b5f),_0x33de9f=Math['abs'](_0x4ef9ca[_0x2248f0(0x10d)]-_0x4ef9ca['xmin']),_0x16418c=Math['abs'](_0x4ef9ca['ymax']-_0x4ef9ca['ymin']),_0x1c3e0c=Math['max'](_0x33de9f,_0x16418c),_0xa50f1b=Math['min'](_0x33de9f,_0x16418c);this['_mBoundsMax']=_0x1c3e0c;let _0x134be6=0x1;if(_0x1c3e0c>this[_0x2248f0(_0x5bd582._0x13af5c)]['maxCanvasSize'])_0x134be6=_0x1c3e0c/this['options'][_0x2248f0(_0x5bd582._0x133a86)],_0xa50f1b/_0x134be6<this['options']['minCanvasSize']&&(_0x134be6=_0xa50f1b/this[_0x2248f0(_0x5bd582._0x132d93)]['minCanvasSize']);else _0xa50f1b<this['options']['minCanvasSize']&&(_0x134be6=_0xa50f1b/this['options'][_0x2248f0(0xfa)],_0x1c3e0c/_0x134be6>this[_0x2248f0(_0x5bd582._0x2fe834)]['maxCanvasSize']&&(_0x134be6=_0x1c3e0c/this['options']['maxCanvasSize']));const _0x2fee01=this['heatStyle']['radius']*1.5,_0x594923=_0x33de9f/_0x134be6+_0x2fee01*0x2,_0x5e9361=_0x16418c/_0x134be6+_0x2fee01*0x2,_0x7e375a=_0x2fee01*_0x134be6;_0x4ef9ca['xmin']-=_0x7e375a,_0x4ef9ca[_0x2248f0(0xec)]-=_0x7e375a,_0x4ef9ca['xmax']+=_0x7e375a,_0x4ef9ca['ymax']+=_0x7e375a,this[_0x2248f0(0xd8)]=_0x134be6,_0x2d4b5f=geLatLngBounds(_0x4ef9ca),this['_rectangle']=Cesium['Rectangle']['fromDegrees'](_0x2d4b5f['xmin'],_0x2d4b5f['ymin'],_0x2d4b5f['xmax'],_0x2d4b5f['ymax']);let _0x3d4518=_0x28c556[0x0]['value']??0x1,_0x2dbfdc=_0x28c556[0x0][_0x2248f0(0xdb)]??0x0;const _0x1448ac=[];_0x28c556['forEach'](_0xfe0f0c=>{const _0x1ac7b1=_0x2248f0,_0x563cf3=mars3d__namespace[_0x1ac7b1(_0xc7c3c7._0x4d7d6e)]['lonlat2mercator']([_0xfe0f0c[_0x1ac7b1(_0xc7c3c7._0x5892a4)],_0xfe0f0c['lat']]),_0x3c449c=_0xfe0f0c['value']||0x1,_0x266eb2=Math['round']((_0x563cf3[0x0]-_0x4ef9ca['xmin'])/_0x134be6),_0x1fd507=Math['round']((_0x4ef9ca['ymax']-_0x563cf3[0x1])/_0x134be6);_0x3d4518=Math[_0x1ac7b1(0x102)](_0x3d4518,_0x3c449c),_0x2dbfdc=Math['min'](_0x2dbfdc,_0x3c449c),_0x1448ac['push']({'x':_0x266eb2,'y':_0x1fd507,'value':_0x3c449c});});const _0x4fce8a={'min':this['options'][_0x2248f0(0xf5)]??_0x2dbfdc,'max':this['options']['max']??_0x3d4518,'data':_0x1448ac};this['_last_heatData']=_0x4fce8a;if(!this[_0x2248f0(_0x5bd582._0x28173d)]||_0x4ef9ca['xmin']!==this[_0x2248f0(_0x5bd582._0x28173d)]['xmin']||_0x4ef9ca['ymin']!==this['_last_mBounds']['ymin']||_0x4ef9ca[_0x2248f0(_0x5bd582._0x25854b)]!==this['_last_mBounds'][_0x2248f0(_0x5bd582._0x25854b)]||_0x4ef9ca[_0x2248f0(0xbe)]!==this['_last_mBounds'][_0x2248f0(0xbe)]){this[_0x2248f0(_0x5bd582._0x28173d)]=_0x4ef9ca,this['_container']['style']['cssText']=_0x2248f0(0x10e)+_0x594923+'px;height:'+_0x5e9361+'px;';const _0x4600fc={...this['heatStyle'],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace['create'](_0x4600fc):this['_heat']['configure'](_0x4600fc);}this[_0x2248f0(0xe8)]['setData'](_0x4fce8a);const _0x32c975=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer'][_0x2248f0(_0x5bd582._0x35635a)]);return _0x32c975;}['_getArcHeatCanvas'](){const _0x115fa2={_0x11ddca:0xd3,_0x32e030:0xc9,_0x31f4ac:0xf7,_0x34726e:0xf3,_0x1c0d19:0xc2,_0x4eec81:0xca,_0xcce346:0xe8},_0x3c7caa=_0x47f96c;this['_heat'][_0x3c7caa(_0x115fa2._0x11ddca)]({'radius':this[_0x3c7caa(_0x115fa2._0x32e030)][_0x3c7caa(0xeb)]*this['style']['arcRadiusScale'],'blur':this['heatStyle']['blur']*this[_0x3c7caa(0x107)][_0x3c7caa(_0x115fa2._0x31f4ac)],'gradient':this['heatStyle']['gradientArc']||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:_0x3c7caa(_0x115fa2._0x34726e),0x1:_0x3c7caa(0xcd)}});const _0x2f48de=mars3d__namespace[_0x3c7caa(_0x115fa2._0x1c0d19)]['copyCanvas'](this['_heat'][_0x3c7caa(_0x115fa2._0x4eec81)]['canvas']);return this[_0x3c7caa(_0x115fa2._0xcce346)]['configure'](this['options'][_0x3c7caa(_0x115fa2._0x32e030)]),_0x2f48de;}['getPointData'](_0x5444c8){const _0x15866b=_0x47f96c,_0x1c6e53=mars3d__namespace[_0x15866b(0xde)]['parse'](_0x5444c8);if(!_0x1c6e53)return{};const _0x21e930=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x1c6e53['lng'],_0x1c6e53['lat']]),_0x42d520=this['_last_mBounds'],_0x2cd0ff=Math[_0x15866b(0xdd)]((_0x21e930[0x0]-_0x42d520['xmin'])/this[_0x15866b(0xd8)]),_0x3b8ea3=Math['round']((_0x42d520['ymax']-_0x21e930[0x1])/this['_scale']),_0x2f2c97=this['_heat']['getValueAt']({'x':_0x2cd0ff,'y':_0x3b8ea3}),_0x2001d3=this['_heat']['_renderer']['ctx'][_0x15866b(0xfd)](_0x2cd0ff-0x1,_0x3b8ea3-0x1,0x1,0x1)['data'];return{'x':_0x2cd0ff,'y':_0x3b8ea3,'value':_0x2f2c97,'color':'rgba('+_0x2001d3[0x0]+','+_0x2001d3[0x1]+','+_0x2001d3[0x2]+','+_0x2001d3[0x3]+')'};}}mars3d__namespace['LayerUtil']['register'](_0x47f96c(0xf1),HeatLayer),mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function _0x1f53(_0xb8a9a8,_0x2fd500){const _0x278fb8=_0x278f();return _0x1f53=function(_0x1f536e,_0x32e427){_0x1f536e=_0x1f536e-0xbe;let _0x2a19c8=_0x278fb8[_0x1f536e];return _0x2a19c8;},_0x1f53(_0xb8a9a8,_0x2fd500);}function getMercatorBounds(_0x2791fc){const _0x209d81={_0xd39683:0xff},_0x51b565=_0x47f96c,_0x46dc5b=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x2791fc['xmin'],_0x2791fc['ymin']]),_0x155aaf=mars3d__namespace['PointTrans'][_0x51b565(_0x209d81._0xd39683)]([_0x2791fc['xmax'],_0x2791fc['ymax']]);return{'xmin':_0x46dc5b[0x0],'ymin':_0x46dc5b[0x1],'xmax':_0x155aaf[0x0],'ymax':_0x155aaf[0x1]};}function geLatLngBounds(_0x1589e0){const _0x5b3d4f={_0x18c30e:0xed},_0x1c92c3=_0x47f96c,_0x1ce878=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x1589e0['xmin'],_0x1589e0[_0x1c92c3(0xec)]]),_0x38213b=mars3d__namespace['PointTrans'][_0x1c92c3(_0x5b3d4f._0x18c30e)]([_0x1589e0['xmax'],_0x1589e0['ymax']]);return{'xmin':_0x1ce878[0x0],'ymin':_0x1ce878[0x1],'xmax':_0x38213b[0x0],'ymax':_0x38213b[0x1]};}function getVertexShaderSource(_0x3e3a62){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'+_0x3e3a62+';\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';}function _0x278f(){const _0x293acf=['1355690NmFbBl','_layer','style','options','flyTo','canvas','_createArcGraphic','merge','xmax','width:','ymax','_graphic2','clear','arc','DomUtil','20REAfnC','KEEP','maxCanvasSize','keys','_addedHook','image','heatStyle','_renderer','PolyUtil','PointTrans','rgb(255,255,255)','positions','defineProperty','_positions','12482MMSMOf','isFormat','configure','_container','504OTDJcc','diffHeight','_rectangle','_scale','_updatePositionsHook','_getArcHeatCanvas','value','104573XlQrkW','round','LngLatPoint','_map','points','806334ZJhAgQ','RenderState','92CGLpMg','StencilOperation','container','rectangle','ALWAYS','_heat','Util','layer','radius','ymin','mercator2lonlat','get','5075667RZOhGw','Material','heat','lng','rgb(216,216,216)','_last_mBounds','min','4192876cLIhTF','arcBlurScale','_graphic','default','minCanvasSize','arcDirection','156756AwFYfL','getImageData','uniforms','lonlat2mercator','bumpMap','type','max','create','flyToByAnimationEnd'];_0x278f=function(){return _0x293acf;};return _0x278f();}exports['HeatLayer']=HeatLayer,Object[_0x47f96c(0xcf)](exports,'__esModule',{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-heatmap",
3
- "version": "3.5.14",
3
+ "version": "3.5.15",
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.14"
13
+ "mars3d": "~3.5.15"
14
14
  },
15
15
  "scripts": {
16
16
  "lint": "eslint ./src/**/*.{js,ts} --fix"