mars3d-heatmap 3.6.11 → 3.6.13

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.11
5
- * 编译日期:2023-11-03 23:59:37
4
+ * 版本信息:v3.6.13
5
+ * 编译日期:2023-11-21 09:41:55
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 _0x5acdcc=_0x5ab8;(function(_0x555c07,_0x58d06e){const _0x957a28={_0x17b9f7:0xe9,_0x5bce81:0xf0,_0x477954:0xa9,_0x568613:0xd4,_0x562537:0xe2},_0x3d2250=_0x5ab8,_0x1fd207=_0x555c07();while(!![]){try{const _0x41d883=-parseInt(_0x3d2250(_0x957a28._0x17b9f7))/0x1*(parseInt(_0x3d2250(_0x957a28._0x5bce81))/0x2)+-parseInt(_0x3d2250(0xc7))/0x3+parseInt(_0x3d2250(_0x957a28._0x477954))/0x4+parseInt(_0x3d2250(0xdc))/0x5*(parseInt(_0x3d2250(0xc1))/0x6)+-parseInt(_0x3d2250(0xaf))/0x7*(parseInt(_0x3d2250(0xd7))/0x8)+-parseInt(_0x3d2250(_0x957a28._0x568613))/0x9*(parseInt(_0x3d2250(0xb8))/0xa)+parseInt(_0x3d2250(_0x957a28._0x562537))/0xb*(parseInt(_0x3d2250(0xf1))/0xc);if(_0x41d883===_0x58d06e)break;else _0x1fd207['push'](_0x1fd207['shift']());}catch(_0x4f457f){_0x1fd207['push'](_0x1fd207['shift']());}}}(_0x1ce9,0x38a1c));function _interopNamespace(_0x22a45b){if(_0x22a45b&&_0x22a45b['__esModule'])return _0x22a45b;var _0x6a8f1f=Object['create'](null);return _0x22a45b&&Object['keys'](_0x22a45b)['forEach'](function(_0xdf84c5){const _0x2a1c56=_0x5ab8;if(_0xdf84c5!==_0x2a1c56(0xd1)){var _0x312465=Object['getOwnPropertyDescriptor'](_0x22a45b,_0xdf84c5);Object['defineProperty'](_0x6a8f1f,_0xdf84c5,_0x312465[_0x2a1c56(0xc5)]?_0x312465:{'enumerable':!![],'get':function(){return _0x22a45b[_0xdf84c5];}});}}),_0x6a8f1f['default']=_0x22a45b,_0x6a8f1f;}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(_0x5acdcc(0xac));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:_0x5acdcc(0xf3),0.6:'green',0.8:'yellow',0.9:_0x5acdcc(0xd0)}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance'][_0x5acdcc(0xbe)]};function _0x1ce9(){const _0x4308d4=['111RkFwaH','options','layer','bumpMap','ALWAYS','_getArcHeatCanvas','cssText','7152SHnhxH','138564fOilZA','lonlat2mercator','blue','EPSG:3857','heatStyle','_container','clear','maxCanvasSize','arcDirection','lng','164140iNfiSA','PointTrans','_graphic','请引入\x20heatmap.js\x20库\x20','px;height:','coordinates','33383hkrvQo','heat','__esModule','_map','uniforms','_renderer','_updatePositionsHook','_layer','ymin','10VBgIuw','setPositions','min','rgb(140,140,140)','_positions','xmax','VERTEX_FORMAT','setData','positions','12UkGGph','flyToByAnimationEnd','_rectangle','configure','get','mercator2lonlat','833490LBCJwD','max','isFormat','rectangle','StencilOperation','opacity','KEEP','mars3d-heatmap\x20mars3d-hideDiv','RectanglePrimitive','red','default','lat','xmin','3222063peJxVT','ymax','forEach','24sJQWnw','px;','BlendingState','_last_mBounds','style','1045430YbNzaO','diffHeight','radius','_graphic2','floor','_heat','781lplhSV','Util','StencilFunction','create','LngLatPoint','minCanvasSize','gradientArc'];_0x1ce9=function(){return _0x4308d4;};return _0x1ce9();}class HeatLayer extends BaseLayer{constructor(_0xad05bb={}){const _0x140ecf={_0x13c612:0xf8,_0x3110fa:0xea,_0x30f36a:0xea,_0x12e492:0xc8,_0x394f4d:0xf5,_0x349e21:0xdb},_0x155f47=_0x5acdcc;super(_0xad05bb),this['options']['maxCanvasSize']=this[_0x155f47(0xea)][_0x155f47(_0x140ecf._0x13c612)]??document['body']['clientWidth'],this['options']['maxCanvasSize']=Math['min'](this['options']['maxCanvasSize'],0x1388),this[_0x155f47(_0x140ecf._0x3110fa)]['minCanvasSize']=this[_0x155f47(_0x140ecf._0x30f36a)]['minCanvasSize']??document['body']['clientHeight'],this['options']['minCanvasSize']=Math[_0x155f47(_0x140ecf._0x12e492)](this['options']['minCanvasSize'],0x2bc),this[_0x155f47(0xea)]['heatStyle']={...DEF_HEATSTYLE,...this[_0x155f47(_0x140ecf._0x3110fa)][_0x155f47(_0x140ecf._0x394f4d)]},this[_0x155f47(0xea)]['style']={...DEF_STYLE,...this['options'][_0x155f47(_0x140ecf._0x349e21)]};}get['layer'](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set['heatStyle'](_0x33302f){const _0x179aa5={_0x154149:0xea,_0x5d16e1:0xf5},_0x5b99be=_0x5acdcc;this['options']['heatStyle']=mars3d__namespace['Util']['merge'](this[_0x5b99be(_0x179aa5._0x154149)][_0x5b99be(_0x179aa5._0x5d16e1)],_0x33302f),this['_heat']&&(this['_heat'][_0x5b99be(0xc4)](this['options']['heatStyle']),this['_updatePositionsHook'](!![]));}get[_0x5acdcc(0xdb)](){const _0x550865=_0x5acdcc;return this['options'][_0x550865(0xdb)];}set[_0x5acdcc(0xdb)](_0x45a8ea){const _0x3d5106={_0x30ed27:0xe3,_0x3a599:0xea},_0x868094=_0x5acdcc;this['options']['style']=mars3d__namespace[_0x868094(_0x3d5106._0x30ed27)]['merge'](this[_0x868094(_0x3d5106._0x3a599)]['style'],_0x45a8ea);}get[_0x5acdcc(0xc0)](){const _0x5c1ec1={_0x219758:0xbc},_0x412230=_0x5acdcc;return this[_0x412230(_0x5c1ec1._0x219758)];}set['positions'](_0x51ee0a){const _0x44feb5=_0x5acdcc;this[_0x44feb5(0xb9)](_0x51ee0a);}get[_0x5acdcc(0xae)](){const _0xe51ec7=[];return this['points']['forEach'](_0x415143=>{_0xe51ec7['push'](_0x415143['toArray']());}),_0xe51ec7;}get[_0x5acdcc(0xca)](){return this['_rectangle'];}['_setOptionsHook'](_0x55deca,_0x4a8203){_0x55deca['positions']&&(this['positions']=_0x55deca['positions']);}['_mountedHook'](){const _0x3f29d9={_0x26eb3d:0xdb,_0x1d65c9:0xb6,_0x494fdc:0xf4},_0x250f3f=_0x5acdcc;this[_0x250f3f(_0x3f29d9._0x26eb3d)]['type']==='image'?this[_0x250f3f(_0x3f29d9._0x1d65c9)]=new mars3d__namespace['layer']['ImageLayer']({'crs':_0x250f3f(_0x3f29d9._0x494fdc),'private':!![]}):this['_layer']=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0x2070d6={_0x4fe9f2:0xb2,_0x16d25c:0xce,_0x402e4d:0xc0,_0x324281:0xc2},_0x4ef2e1=_0x5acdcc;this[_0x4ef2e1(_0x2070d6._0x4fe9f2)]['addLayer'](this['_layer']),this['_container']=mars3d__namespace['DomUtil']['create']('div',_0x4ef2e1(_0x2070d6._0x16d25c),this[_0x4ef2e1(0xb2)]['container']),this[_0x4ef2e1(0xea)][_0x4ef2e1(_0x2070d6._0x402e4d)]&&(this[_0x4ef2e1(0xc0)]=this[_0x4ef2e1(0xea)]['positions']),this[_0x4ef2e1(0xea)]['flyTo']&&this[_0x4ef2e1(_0x2070d6._0x324281)]();}['_removedHook'](){const _0x3a2f16={_0x1bac92:0xf6,_0x2666e5:0xf6},_0x5da8ff=_0x5acdcc;this[_0x5da8ff(_0x3a2f16._0x1bac92)]&&(mars3d__namespace['DomUtil']['remove'](this['_container']),delete this[_0x5da8ff(_0x3a2f16._0x2666e5)]),this['clear'](),this['_map']['removeLayer'](this['_layer']);}['addPosition'](_0x311b1f,_0x57e5e6){const _0xce0c79={_0x2c6a66:0xbc},_0x3928e3=_0x5acdcc;this['_positions']=this[_0x3928e3(_0xce0c79._0x2c6a66)]||[],this['_positions']['push'](_0x311b1f),this['_updatePositionsHook'](_0x57e5e6);}[_0x5acdcc(0xb9)](_0x46f6a6,_0x2cd217){this['_positions']=_0x46f6a6,this['_updatePositionsHook'](_0x2cd217);}['clear'](){const _0x27195f=_0x5acdcc;this[_0x27195f(0xab)]&&(this['_layer']['removeGraphic'](this['_graphic'],!![]),delete this['_graphic']),this[_0x27195f(0xdf)]&&(this['_layer']['removeGraphic'](this[_0x27195f(0xdf)],!![]),delete this['_graphic2']);}[_0x5acdcc(0xb5)](_0x2e6f19){const _0x41c2f4={_0x2aded6:0xdb,_0x5c4afe:0xab,_0x2ea547:0xb3},_0x57684f=_0x5acdcc;if(!this['show']||!this['_map']||!this[_0x57684f(0xc0)]||this['positions']['length']===0x0)return this;const _0x2c0156=this['_getHeatCanvas']();if(this[_0x57684f(_0x41c2f4._0x2aded6)]['type']==='image')this['_layer']['setOptions']({'url':_0x2c0156['toDataURL']('image/png'),'rectangle':this[_0x57684f(0xc3)],'opacity':this['style'][_0x57684f(0xcc)]});else this['style']['arc']?this[_0x57684f(_0x41c2f4._0x5c4afe)]&&_0x2e6f19?(this[_0x57684f(0xab)]['uniforms']['image']=_0x2c0156,this[_0x57684f(0xab)]['uniforms'][_0x57684f(0xec)]=this[_0x57684f(0xee)](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x2c0156,this['_graphic2']['uniforms']['bumpMap']=this['_graphic'][_0x57684f(_0x41c2f4._0x2ea547)]['bumpMap'])):this['_createArcGraphic'](_0x2c0156):this[_0x57684f(0xab)]&&_0x2e6f19?this[_0x57684f(_0x41c2f4._0x5c4afe)]['uniforms']['image']=_0x2c0156:this['_createGraphic'](_0x2c0156);return this;}['_createGraphic'](_0x228049){const _0x4e9338=_0x5acdcc;this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0x4e9338(0xea)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x228049},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this['_layer']['addGraphic'](this[_0x4e9338(0xab)]);}['_createArcGraphic'](_0x501998){const _0x3fe352={_0x47a8dc:0xcd,_0x561588:0xe4,_0x23b4de:0xd9,_0x11a48a:0xe0,_0x5c77b4:0xdd,_0x30c6b9:0xc3,_0x11de76:0xc3,_0x4d259d:0xee,_0x354bd2:0xdb,_0x29bf35:0xf9,_0x384c25:0xdb,_0x1e48c7:0xcf},_0x32dd48=_0x5acdcc;this[_0x32dd48(0xf7)]();const _0xb1086f=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0x32dd48(0xcb)][_0x32dd48(_0x3fe352._0x47a8dc)],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium[_0x32dd48(_0x3fe352._0x561588)][_0x32dd48(0xed)],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0x32dd48(0xcb)]['KEEP'],'zPass':Cesium[_0x32dd48(0xcb)]['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium[_0x32dd48(_0x3fe352._0x23b4de)]['ALPHA_BLEND']}),_0x33d404=Math[_0x32dd48(_0x3fe352._0x11a48a)](this[_0x32dd48(0xdb)]['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style'][_0x32dd48(_0x3fe352._0x5c77b4)]&&delete this['style']['diffHeight'];const _0x37d64b=(this[_0x32dd48(0xdb)]['splitNum'],0x64);let _0x531316=Math['max'](this[_0x32dd48(_0x3fe352._0x30c6b9)]['height'],this[_0x32dd48(_0x3fe352._0x11de76)]['width']);this['style']['granularity']=_0x531316/=_0x37d64b;const _0x2cf4d8=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x501998,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this[_0x32dd48(_0x3fe352._0x4d259d)]()},'source':HeatMaterial},'translucent':!![]}),_0x4894e0=this[_0x32dd48(_0x3fe352._0x354bd2)][_0x32dd48(_0x3fe352._0x29bf35)]||0x1;this[_0x32dd48(0xab)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0xb1086f,'material':_0x2cf4d8,'vertexShaderSource':getVertexShaderSource(_0x33d404*_0x4894e0)})}),this['_layer']['addGraphic'](this[_0x32dd48(0xab)]),this[_0x32dd48(_0x3fe352._0x384c25)]['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace['graphic'][(_0x32dd48(_0x3fe352._0x1e48c7))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0xb1086f,'material':_0x2cf4d8,'vertexShaderSource':getVertexShaderSource(-_0x33d404)})}),this['_layer']['addGraphic'](this['_graphic2']));}['getRectangle'](_0x1e5e49){const _0x3c1191=_0x5acdcc;return _0x1e5e49!==null&&_0x1e5e49!==void 0x0&&_0x1e5e49[_0x3c1191(0xc9)]&&this[_0x3c1191(0xc3)]?mars3d__namespace['PolyUtil']['formatRectangle'](this[_0x3c1191(0xc3)]):this['_rectangle'];}['_getHeatCanvas'](){const _0x17378b={_0x4d8129:0xf8,_0x4cc62b:0xe7,_0x2d3758:0xe7,_0x554a51:0xea,_0x560c58:0xda,_0x1d277c:0xd5,_0x7b317f:0xad,_0x4902b9:0xd8,_0xf670fd:0xe1},_0x3ed152={_0x4da5df:0xd3},_0x3b358b={_0x4ea86a:0xd2,_0x7d3c19:0xba},_0x2a5f66=_0x5acdcc,_0x543bc1=this['_positions'],_0x7f11e8=[];let _0x27ce06,_0x299505,_0x5cd11c,_0x5da7c1;_0x543bc1['forEach'](_0x1c3c12=>{const _0x2db890=_0x5ab8,_0x53266e=mars3d__namespace[_0x2db890(0xe6)]['parse'](_0x1c3c12);if(!_0x53266e)return;_0x53266e['value']=_0x1c3c12['value']||0x1,!this['options'][_0x2db890(0xca)]&&(_0x27ce06===undefined?(_0x27ce06=_0x53266e['lng'],_0x299505=_0x53266e['lng'],_0x5cd11c=_0x53266e['lat'],_0x5da7c1=_0x53266e[_0x2db890(_0x3b358b._0x4ea86a)]):(_0x27ce06=Math[_0x2db890(_0x3b358b._0x7d3c19)](_0x27ce06,_0x53266e['lng']),_0x299505=Math['max'](_0x299505,_0x53266e[_0x2db890(0xfa)]),_0x5cd11c=Math[_0x2db890(0xba)](_0x5cd11c,_0x53266e['lat']),_0x5da7c1=Math['max'](_0x5da7c1,_0x53266e['lat']))),_0x7f11e8['push'](_0x53266e);});_0x27ce06===_0x299505&&(_0x27ce06-=0.000001,_0x299505+=0.000001);_0x5cd11c===_0x5da7c1&&(_0x5cd11c-=0.000001,_0x5da7c1+=0.000001);let _0x3da97c=this['options']['rectangle']||{'xmin':_0x27ce06,'xmax':_0x299505,'ymin':_0x5cd11c,'ymax':_0x5da7c1};const _0x4744e9=getMercatorBounds(_0x3da97c),_0x15fcbc=Math['abs'](_0x4744e9['xmax']-_0x4744e9['xmin']),_0x17639a=Math['abs'](_0x4744e9[_0x2a5f66(0xd5)]-_0x4744e9[_0x2a5f66(0xb7)]),_0x223e53=Math[_0x2a5f66(0xc8)](_0x15fcbc,_0x17639a),_0x5653d2=Math['min'](_0x15fcbc,_0x17639a);this['_mBoundsMax']=_0x223e53;let _0x1815ae=0x1;if(_0x223e53>this[_0x2a5f66(0xea)]['maxCanvasSize'])_0x1815ae=_0x223e53/this['options'][_0x2a5f66(_0x17378b._0x4d8129)],_0x5653d2/_0x1815ae<this[_0x2a5f66(0xea)]['minCanvasSize']&&(_0x1815ae=_0x5653d2/this['options']['minCanvasSize']);else _0x5653d2<this['options'][_0x2a5f66(_0x17378b._0x4cc62b)]&&(_0x1815ae=_0x5653d2/this[_0x2a5f66(0xea)][_0x2a5f66(_0x17378b._0x2d3758)],_0x223e53/_0x1815ae>this[_0x2a5f66(_0x17378b._0x554a51)]['maxCanvasSize']&&(_0x1815ae=_0x223e53/this['options']['maxCanvasSize']));const _0xea2891=this['heatStyle'][_0x2a5f66(0xde)]*1.5,_0x4bfe81=_0x15fcbc/_0x1815ae+_0xea2891*0x2,_0xd53b2=_0x17639a/_0x1815ae+_0xea2891*0x2,_0x30bb4c=_0xea2891*_0x1815ae;_0x4744e9['xmin']-=_0x30bb4c,_0x4744e9['ymin']-=_0x30bb4c,_0x4744e9['xmax']+=_0x30bb4c,_0x4744e9['ymax']+=_0x30bb4c,this['_scale']=_0x1815ae,_0x3da97c=geLatLngBounds(_0x4744e9),this['_rectangle']=Cesium['Rectangle']['fromDegrees'](_0x3da97c['xmin'],_0x3da97c['ymin'],_0x3da97c['xmax'],_0x3da97c['ymax']);let _0x2a78e0=_0x7f11e8[0x0]['value']??0x1,_0x2c832d=_0x7f11e8[0x0]['value']??0x0;const _0x4f45c9=[];_0x7f11e8[_0x2a5f66(0xd6)](_0x40cd6a=>{const _0x574c1c=_0x2a5f66,_0x80a999=mars3d__namespace['PointTrans'][_0x574c1c(0xf2)]([_0x40cd6a['lng'],_0x40cd6a['lat']]),_0xb660d5=_0x40cd6a['value']||0x1,_0x3aea14=Math['round']((_0x80a999[0x0]-_0x4744e9[_0x574c1c(_0x3ed152._0x4da5df)])/_0x1815ae),_0x20d86d=Math['round']((_0x4744e9[_0x574c1c(0xd5)]-_0x80a999[0x1])/_0x1815ae);_0x2a78e0=Math['max'](_0x2a78e0,_0xb660d5),_0x2c832d=Math['min'](_0x2c832d,_0xb660d5),_0x4f45c9['push']({'x':_0x3aea14,'y':_0x20d86d,'value':_0xb660d5});});const _0x43ab0f={'min':this['options']['min']??_0x2c832d,'max':this['options']['max']??_0x2a78e0,'data':_0x4f45c9};this['_last_heatData']=_0x43ab0f;if(!this[_0x2a5f66(0xda)]||_0x4744e9['xmin']!==this['_last_mBounds']['xmin']||_0x4744e9['ymin']!==this['_last_mBounds'][_0x2a5f66(0xb7)]||_0x4744e9['xmax']!==this['_last_mBounds']['xmax']||_0x4744e9['ymax']!==this[_0x2a5f66(_0x17378b._0x560c58)][_0x2a5f66(_0x17378b._0x1d277c)]){this['_last_mBounds']=_0x4744e9,this['_container'][_0x2a5f66(0xdb)][_0x2a5f66(0xef)]='width:'+_0x4bfe81+_0x2a5f66(_0x17378b._0x7b317f)+_0xd53b2+_0x2a5f66(_0x17378b._0x4902b9);const _0x382e1c={...this['heatStyle'],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace[_0x2a5f66(0xe5)](_0x382e1c):this[_0x2a5f66(_0x17378b._0xf670fd)][_0x2a5f66(0xc4)](_0x382e1c);}this[_0x2a5f66(0xe1)][_0x2a5f66(0xbf)](_0x43ab0f);const _0xbff9ce=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return _0xbff9ce;}[_0x5acdcc(0xee)](){const _0x2ee839={_0x1cefe0:0xe1,_0x58bfd9:0xe8,_0x55edb2:0xbb,_0x8db727:0xc4,_0x463012:0xea},_0x3e8f8a=_0x5acdcc;this[_0x3e8f8a(_0x2ee839._0x1cefe0)][_0x3e8f8a(0xc4)]({'radius':this[_0x3e8f8a(0xf5)]['radius']*this['style']['arcRadiusScale'],'blur':this['heatStyle']['blur']*this['style']['arcBlurScale'],'gradient':this['heatStyle'][_0x3e8f8a(_0x2ee839._0x58bfd9)]||{0.25:'rgb(0,0,0)',0.55:_0x3e8f8a(_0x2ee839._0x55edb2),0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x57d7e9=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return this['_heat'][_0x3e8f8a(_0x2ee839._0x8db727)](this[_0x3e8f8a(_0x2ee839._0x463012)]['heatStyle']),_0x57d7e9;}['getPointData'](_0xb5bb18){const _0x34c1e5={_0x168cd5:0xda,_0x2a009f:0xe1},_0x164e23=_0x5acdcc,_0x27e2c4=mars3d__namespace[_0x164e23(0xe6)]['parse'](_0xb5bb18);if(!_0x27e2c4)return{};const _0x1b0fe5=mars3d__namespace[_0x164e23(0xaa)]['lonlat2mercator']([_0x27e2c4['lng'],_0x27e2c4['lat']]),_0x524169=this[_0x164e23(_0x34c1e5._0x168cd5)],_0x502eab=Math['round']((_0x1b0fe5[0x0]-_0x524169['xmin'])/this['_scale']),_0x10dcf7=Math['round']((_0x524169['ymax']-_0x1b0fe5[0x1])/this['_scale']),_0x134705=this['_heat']['getValueAt']({'x':_0x502eab,'y':_0x10dcf7}),_0x1d999b=this[_0x164e23(_0x34c1e5._0x2a009f)][_0x164e23(0xb4)]['ctx']['getImageData'](_0x502eab-0x1,_0x10dcf7-0x1,0x1,0x1)['data'];return{'x':_0x502eab,'y':_0x10dcf7,'value':_0x134705,'color':'rgba('+_0x1d999b[0x0]+','+_0x1d999b[0x1]+','+_0x1d999b[0x2]+','+_0x1d999b[0x3]+')'};}}mars3d__namespace['LayerUtil']['register'](_0x5acdcc(0xb0),HeatLayer),mars3d__namespace[_0x5acdcc(0xeb)]['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function _0x5ab8(_0x126297,_0x21a316){const _0x1ce977=_0x1ce9();return _0x5ab8=function(_0x5ab8f9,_0xe9ab1){_0x5ab8f9=_0x5ab8f9-0xa9;let _0xfe5567=_0x1ce977[_0x5ab8f9];return _0xfe5567;},_0x5ab8(_0x126297,_0x21a316);}function getMercatorBounds(_0x2c0ffe){const _0x508d20={_0x505b0f:0xaa,_0x10775e:0xbd},_0x57f157=_0x5acdcc,_0x34b3df=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x2c0ffe[_0x57f157(0xd3)],_0x2c0ffe['ymin']]),_0x53ddc2=mars3d__namespace[_0x57f157(_0x508d20._0x505b0f)][_0x57f157(0xf2)]([_0x2c0ffe[_0x57f157(_0x508d20._0x10775e)],_0x2c0ffe['ymax']]);return{'xmin':_0x34b3df[0x0],'ymin':_0x34b3df[0x1],'xmax':_0x53ddc2[0x0],'ymax':_0x53ddc2[0x1]};}function geLatLngBounds(_0x38326d){const _0x16daaa={_0x51267c:0xaa,_0x347d2c:0xc6},_0x54b97a=_0x5acdcc,_0x384f02=mars3d__namespace[_0x54b97a(_0x16daaa._0x51267c)]['mercator2lonlat']([_0x38326d['xmin'],_0x38326d['ymin']]),_0x4540d7=mars3d__namespace['PointTrans'][_0x54b97a(_0x16daaa._0x347d2c)]([_0x38326d['xmax'],_0x38326d['ymax']]);return{'xmin':_0x384f02[0x0],'ymin':_0x384f02[0x1],'xmax':_0x4540d7[0x0],'ymax':_0x4540d7[0x1]};}function getVertexShaderSource(_0x20fffa){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'+_0x20fffa+';\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,_0x5acdcc(0xb1),{'value':!![]});
14
+ 'use strict';const _0x3f895f=_0x483a;(function(_0x4fc505,_0x30c950){const _0x271f25={_0x1f185a:0xe5,_0x1a1fdd:0xd2,_0x287c99:0xdc,_0x91dbd7:0xc3,_0x5f1273:0xe9},_0x18895e=_0x483a,_0x455b35=_0x4fc505();while(!![]){try{const _0xf53346=parseInt(_0x18895e(_0x271f25._0x1f185a))/0x1+parseInt(_0x18895e(0xc2))/0x2+-parseInt(_0x18895e(_0x271f25._0x1a1fdd))/0x3+-parseInt(_0x18895e(0xb6))/0x4*(-parseInt(_0x18895e(_0x271f25._0x287c99))/0x5)+-parseInt(_0x18895e(_0x271f25._0x91dbd7))/0x6+-parseInt(_0x18895e(0xa8))/0x7+-parseInt(_0x18895e(0x9d))/0x8*(-parseInt(_0x18895e(_0x271f25._0x5f1273))/0x9);if(_0xf53346===_0x30c950)break;else _0x455b35['push'](_0x455b35['shift']());}catch(_0x1227c3){_0x455b35['push'](_0x455b35['shift']());}}}(_0x2e0a,0xab847));function _0x483a(_0x5c43d3,_0x39ee2f){const _0x2e0a9f=_0x2e0a();return _0x483a=function(_0x483a1c,_0x505c87){_0x483a1c=_0x483a1c-0x9b;let _0x2ee07e=_0x2e0a9f[_0x483a1c];return _0x2ee07e;},_0x483a(_0x5c43d3,_0x39ee2f);}function _interopNamespace(_0x268931){const _0x1bf0a4=_0x483a;if(_0x268931&&_0x268931['__esModule'])return _0x268931;var _0x57519b=Object[_0x1bf0a4(0xc5)](null);return _0x268931&&Object[_0x1bf0a4(0xac)](_0x268931)['forEach'](function(_0x30ab6d){const _0x47bfbb=_0x1bf0a4;if(_0x30ab6d!==_0x47bfbb(0xcf)){var _0x2efc17=Object['getOwnPropertyDescriptor'](_0x268931,_0x30ab6d);Object['defineProperty'](_0x57519b,_0x30ab6d,_0x2efc17['get']?_0x2efc17:{'enumerable':!![],'get':function(){return _0x268931[_0x30ab6d];}});}}),_0x57519b['default']=_0x268931,_0x57519b;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial='uniform\x20sampler2D\x20image;\x0a\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput)\x20{\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20vec4\x20colorImage\x20=\x20texture(image,\x20st);\x0a\x20\x20if(colorImage.rgb\x20==\x20vec3(1.0)\x20||\x20colorImage.rgb\x20==\x20vec3(0.0))\x20{\x0a\x20\x20\x20\x20discard;\x0a\x20\x20}\x0a\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0a\x20\x20material.alpha\x20=\x20colorImage.a;\x0a\x20\x20return\x20material;\x0a}\x0a';function _0x2e0a(){const _0x176820=['fromCache','Rectangle','clientHeight','remove','Util','options','_layer','16WexChu','_last_heatData','forEach','HeatLayer','ctx','container','ALWAYS','EllipsoidSurfaceAppearance','KEEP','xmin','type','6403033GZGgdJ','_updatePositionsHook','flyTo','_mBoundsMax','keys','bumpMap','GraphicLayer','min','removeGraphic','lat','StencilOperation','diffHeight','_graphic2','_last_mBounds','4hswaaB','graphic','_getHeatCanvas','_scale','max','uniforms','floor','yellow','layer','points','_positions','maxCanvasSize','2195920hthISL','7403070FoxpIJ','xmax','create','positions','_container','rgb(140,140,140)','value','style','configure','push','LngLatPoint','splitNum','default','opacity','rectangle','1202682ZrHLZq','BlendingState','round','RenderState','arcRadiusScale','setOptions','REPLACE','PolyUtil','_map','minCanvasSize','1295215JCNDKo','ImageLayer','_heat','canvas','lng','StencilFunction','ymax','heatStyle','_rectangle','799950IbuuPs','_setOptionsHook','addGraphic','_graphic','4927680bJguOB','PointTrans','_renderer','DomUtil'];_0x2e0a=function(){return _0x176820;};return _0x2e0a();}if(!h337__namespace[_0x3f895f(0xc5)])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x3f895f(0xbe)]['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:'blue',0.6:'green',0.8:_0x3f895f(0xbd),0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance']['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x2d2620={}){const _0x211ded={_0x5e0882:0x9b,_0x41a0cd:0xef,_0x399390:0xba},_0x54c712=_0x3f895f;super(_0x2d2620),this[_0x54c712(_0x211ded._0x5e0882)][_0x54c712(0xc1)]=this['options']['maxCanvasSize']??document['body']['clientWidth'],this['options']['maxCanvasSize']=Math['min'](this['options']['maxCanvasSize'],0x1388),this[_0x54c712(0x9b)]['minCanvasSize']=this['options'][_0x54c712(0xdb)]??document['body'][_0x54c712(_0x211ded._0x41a0cd)],this['options'][_0x54c712(0xdb)]=Math[_0x54c712(_0x211ded._0x399390)](this['options']['minCanvasSize'],0x2bc),this['options'][_0x54c712(0xe3)]={...DEF_HEATSTYLE,...this['options']['heatStyle']},this[_0x54c712(_0x211ded._0x5e0882)]['style']={...DEF_STYLE,...this['options']['style']};}get['layer'](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set[_0x3f895f(0xe3)](_0x5954dd){const _0x3c6129={_0x373d6f:0xe3},_0x50002b=_0x3f895f;this['options']['heatStyle']=mars3d__namespace[_0x50002b(0xf1)]['merge'](this['options'][_0x50002b(_0x3c6129._0x373d6f)],_0x5954dd),this['_heat']&&(this['_heat'][_0x50002b(0xcb)](this['options']['heatStyle']),this['_updatePositionsHook'](!![]));}get['style'](){return this['options']['style'];}set['style'](_0x2fbfd9){const _0x12fdda={_0xe673f9:0x9b,_0x1cc19d:0x9b,_0x3494c9:0xca},_0x25e770=_0x3f895f;this[_0x25e770(_0x12fdda._0xe673f9)]['style']=mars3d__namespace['Util']['merge'](this[_0x25e770(_0x12fdda._0x1cc19d)][_0x25e770(_0x12fdda._0x3494c9)],_0x2fbfd9);}get['positions'](){const _0x2dc9a9=_0x3f895f;return this[_0x2dc9a9(0xc0)];}set[_0x3f895f(0xc6)](_0x28ada7){this['setPositions'](_0x28ada7);}get['coordinates'](){const _0xd0ab09={_0x3bcdb7:0xbf},_0x3600a6=_0x3f895f,_0x3866a2=[];return this[_0x3600a6(_0xd0ab09._0x3bcdb7)]['forEach'](_0x3a99ca=>{const _0x5bee06=_0x3600a6;_0x3866a2[_0x5bee06(0xcc)](_0x3a99ca['toArray']());}),_0x3866a2;}get['rectangle'](){const _0x2ce07f=_0x3f895f;return this[_0x2ce07f(0xe4)];}[_0x3f895f(0xe6)](_0x727d5a,_0xcd9e13){_0x727d5a['positions']&&(this['positions']=_0x727d5a['positions']);}['_mountedHook'](){const _0x1036c8={_0x507f48:0xdd,_0x301258:0xbe,_0x2ea59e:0xae},_0xa021d2=_0x3f895f;this['style']['type']==='image'?this['_layer']=new mars3d__namespace['layer'][(_0xa021d2(_0x1036c8._0x507f48))]({'crs':'EPSG:3857','private':!![]}):this['_layer']=new mars3d__namespace[(_0xa021d2(_0x1036c8._0x301258))][(_0xa021d2(_0x1036c8._0x2ea59e))]({'private':!![]});}['_addedHook'](){const _0x3fd1f3={_0x2ae579:0xa2,_0x2852a1:0xaa},_0x571254=_0x3f895f;this['_map']['addLayer'](this['_layer']),this['_container']=mars3d__namespace['DomUtil'][_0x571254(0xc5)]('div','mars3d-heatmap\x20mars3d-hideDiv',this['_map'][_0x571254(_0x3fd1f3._0x2ae579)]),this['options']['positions']&&(this['positions']=this['options']['positions']),this[_0x571254(0x9b)][_0x571254(_0x3fd1f3._0x2852a1)]&&this['flyToByAnimationEnd']();}['_removedHook'](){const _0x39e87c={_0x33b338:0xf0},_0x38551f=_0x3f895f;this['_container']&&(mars3d__namespace[_0x38551f(0xec)][_0x38551f(_0x39e87c._0x33b338)](this[_0x38551f(0xc7)]),delete this['_container']),this['clear'](),this['_map']['removeLayer'](this[_0x38551f(0x9c)]);}['addPosition'](_0x1f910b,_0x487eca){const _0xfb8bfd={_0x1e50b8:0xc0,_0x2e154d:0xcc},_0x3c9244=_0x3f895f;this['_positions']=this['_positions']||[],this[_0x3c9244(_0xfb8bfd._0x1e50b8)][_0x3c9244(_0xfb8bfd._0x2e154d)](_0x1f910b),this[_0x3c9244(0xa9)](_0x487eca);}['setPositions'](_0x50c000,_0x313917){const _0x2dec0f={_0x58217b:0xc0},_0x361b41=_0x3f895f;this[_0x361b41(_0x2dec0f._0x58217b)]=_0x50c000,this['_updatePositionsHook'](_0x313917);}['clear'](){const _0x8d161d={_0x5b3dfd:0xb0,_0x574040:0xe8},_0x5b2128=_0x3f895f;this['_graphic']&&(this['_layer'][_0x5b2128(_0x8d161d._0x5b3dfd)](this[_0x5b2128(_0x8d161d._0x574040)],!![]),delete this['_graphic']),this['_graphic2']&&(this[_0x5b2128(0x9c)][_0x5b2128(_0x8d161d._0x5b3dfd)](this['_graphic2'],!![]),delete this[_0x5b2128(0xb4)]);}['_updatePositionsHook'](_0x4f7008){const _0x508a94={_0x2f4eb1:0xc6,_0x19a9f7:0xb8,_0x27b394:0xa7,_0x583c26:0xd7,_0x299476:0xbb},_0x44bc20=_0x3f895f;if(!this['show']||!this[_0x44bc20(0xda)]||!this['positions']||this[_0x44bc20(_0x508a94._0x2f4eb1)]['length']===0x0)return this;const _0x665ece=this[_0x44bc20(_0x508a94._0x19a9f7)]();if(this['style'][_0x44bc20(_0x508a94._0x27b394)]==='image')this['_layer'][_0x44bc20(_0x508a94._0x583c26)]({'url':_0x665ece['toDataURL']('image/png'),'rectangle':this[_0x44bc20(0xe4)],'opacity':this['style'][_0x44bc20(0xd0)]});else this[_0x44bc20(0xca)]['arc']?this['_graphic']&&_0x4f7008?(this['_graphic']['uniforms']['image']=_0x665ece,this['_graphic']['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this[_0x44bc20(0xb4)][_0x44bc20(_0x508a94._0x299476)]['image']=_0x665ece,this[_0x44bc20(0xb4)]['uniforms']['bumpMap']=this['_graphic']['uniforms'][_0x44bc20(0xad)])):this['_createArcGraphic'](_0x665ece):this['_graphic']&&_0x4f7008?this['_graphic']['uniforms']['image']=_0x665ece:this['_createGraphic'](_0x665ece);return this;}['_createGraphic'](_0x4927d4){const _0x1a6149={_0x5cf5cb:0xe8},_0x5f4796=_0x3f895f;this['clear'](),this[_0x5f4796(_0x1a6149._0x5cf5cb)]=new mars3d__namespace[(_0x5f4796(0xb7))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x5f4796(0xa4))]({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x4927d4},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this['_layer']['addGraphic'](this['_graphic']);}['_createArcGraphic'](_0x1003a8){const _0x338709={_0xe914d2:0xd5,_0x4072c0:0xb2,_0x51edb3:0xe1,_0x5db90a:0xa5,_0x13040d:0xb2,_0x1a281e:0xb2,_0x3350ce:0xbc,_0x58cb4a:0xca,_0x5794f1:0xab,_0x2fdd4e:0xb3,_0x2c2287:0xe4,_0x4a81cb:0x9b},_0x13a3c1=_0x3f895f;this['clear']();const _0xdecc5d=Cesium[_0x13a3c1(_0x338709._0xe914d2)][_0x13a3c1(0xed)]({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation'][_0x13a3c1(0xa5)],'zFail':Cesium[_0x13a3c1(0xb2)]['KEEP'],'zPass':Cesium[_0x13a3c1(_0x338709._0x4072c0)]['REPLACE']},'backFunction':Cesium[_0x13a3c1(_0x338709._0x51edb3)][_0x13a3c1(0xa3)],'backOperation':{'fail':Cesium['StencilOperation'][_0x13a3c1(_0x338709._0x5db90a)],'zFail':Cesium[_0x13a3c1(_0x338709._0x13040d)]['KEEP'],'zPass':Cesium[_0x13a3c1(_0x338709._0x1a281e)][_0x13a3c1(0xd8)]},'reference':0x2,'mask':0x2},'blending':Cesium[_0x13a3c1(0xd3)]['ALPHA_BLEND']}),_0x218b25=Math[_0x13a3c1(_0x338709._0x3350ce)](this[_0x13a3c1(_0x338709._0x58cb4a)]['diffHeight']??this[_0x13a3c1(_0x338709._0x5794f1)]*0.02)+0.1;this['style'][_0x13a3c1(_0x338709._0x2fdd4e)]&&delete this['style']['diffHeight'];const _0x5f028d=(this['style'][_0x13a3c1(0xce)],0x64);let _0x49aaf2=Math['max'](this['_rectangle']['height'],this[_0x13a3c1(_0x338709._0x2c2287)]['width']);this['style']['granularity']=_0x49aaf2/=_0x5f028d;const _0x147dc2=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x1003a8,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x24772d=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0x13a3c1(_0x338709._0x4a81cb)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0xdecc5d,'material':_0x147dc2,'vertexShaderSource':getVertexShaderSource(_0x218b25*_0x24772d)})}),this[_0x13a3c1(0x9c)]['addGraphic'](this[_0x13a3c1(0xe8)]),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace[(_0x13a3c1(0xb7))]['RectanglePrimitive']({...this['options'],'rectangle':this[_0x13a3c1(_0x338709._0x2c2287)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0xdecc5d,'material':_0x147dc2,'vertexShaderSource':getVertexShaderSource(-_0x218b25)})}),this['_layer'][_0x13a3c1(0xe7)](this['_graphic2']));}['getRectangle'](_0x544f04){const _0x296002={_0x1063ea:0xd9},_0x1dfe78=_0x3f895f;return _0x544f04!==null&&_0x544f04!==void 0x0&&_0x544f04['isFormat']&&this['_rectangle']?mars3d__namespace[_0x1dfe78(_0x296002._0x1063ea)]['formatRectangle'](this['_rectangle']):this[_0x1dfe78(0xe4)];}['_getHeatCanvas'](){const _0x5dd56f={_0x394cf6:0x9f,_0x45e95b:0x9b,_0x56eb1e:0xdb,_0x28c389:0xc4,_0x2f7773:0xe2,_0x3754d0:0xee,_0x520aba:0xb5,_0x1e6798:0xca,_0x4c86c5:0xde},_0x2e5efe={_0x143bba:0xc9,_0x4d20ff:0xd4},_0xdd9537={_0x515156:0x9b,_0x203e03:0xe0,_0x274ff3:0xaf,_0x31f6ea:0xb1},_0x621413=_0x3f895f,_0x34998f=this['_positions'],_0x1bb928=[];let _0x2d3068,_0x398f4b,_0x1fe76e,_0x4f62d1;_0x34998f[_0x621413(_0x5dd56f._0x394cf6)](_0x1114fd=>{const _0x4273ac=_0x621413,_0xbefec1=mars3d__namespace[_0x4273ac(0xcd)]['parse'](_0x1114fd);if(!_0xbefec1)return;_0xbefec1[_0x4273ac(0xc9)]=_0x1114fd['value']||0x1,!this[_0x4273ac(_0xdd9537._0x515156)][_0x4273ac(0xd1)]&&(_0x2d3068===undefined?(_0x2d3068=_0xbefec1[_0x4273ac(_0xdd9537._0x203e03)],_0x398f4b=_0xbefec1['lng'],_0x1fe76e=_0xbefec1['lat'],_0x4f62d1=_0xbefec1['lat']):(_0x2d3068=Math[_0x4273ac(0xaf)](_0x2d3068,_0xbefec1['lng']),_0x398f4b=Math['max'](_0x398f4b,_0xbefec1['lng']),_0x1fe76e=Math[_0x4273ac(_0xdd9537._0x274ff3)](_0x1fe76e,_0xbefec1[_0x4273ac(_0xdd9537._0x31f6ea)]),_0x4f62d1=Math[_0x4273ac(0xba)](_0x4f62d1,_0xbefec1[_0x4273ac(0xb1)]))),_0x1bb928['push'](_0xbefec1);});_0x2d3068===_0x398f4b&&(_0x2d3068-=0.000001,_0x398f4b+=0.000001);_0x1fe76e===_0x4f62d1&&(_0x1fe76e-=0.000001,_0x4f62d1+=0.000001);let _0x4d97bd=this[_0x621413(_0x5dd56f._0x45e95b)][_0x621413(0xd1)]||{'xmin':_0x2d3068,'xmax':_0x398f4b,'ymin':_0x1fe76e,'ymax':_0x4f62d1};const _0x45e5ea=getMercatorBounds(_0x4d97bd),_0x3ed537=Math['abs'](_0x45e5ea['xmax']-_0x45e5ea['xmin']),_0x249d03=Math['abs'](_0x45e5ea[_0x621413(0xe2)]-_0x45e5ea['ymin']),_0x23024f=Math['max'](_0x3ed537,_0x249d03),_0x504953=Math['min'](_0x3ed537,_0x249d03);this[_0x621413(0xab)]=_0x23024f;let _0x20002c=0x1;if(_0x23024f>this['options']['maxCanvasSize'])_0x20002c=_0x23024f/this['options']['maxCanvasSize'],_0x504953/_0x20002c<this['options']['minCanvasSize']&&(_0x20002c=_0x504953/this[_0x621413(0x9b)][_0x621413(_0x5dd56f._0x56eb1e)]);else _0x504953<this['options']['minCanvasSize']&&(_0x20002c=_0x504953/this['options']['minCanvasSize'],_0x23024f/_0x20002c>this['options']['maxCanvasSize']&&(_0x20002c=_0x23024f/this[_0x621413(0x9b)]['maxCanvasSize']));const _0x5ce4ab=this['heatStyle']['radius']*1.5,_0x525d4d=_0x3ed537/_0x20002c+_0x5ce4ab*0x2,_0x5cf9de=_0x249d03/_0x20002c+_0x5ce4ab*0x2,_0x103259=_0x5ce4ab*_0x20002c;_0x45e5ea['xmin']-=_0x103259,_0x45e5ea['ymin']-=_0x103259,_0x45e5ea[_0x621413(_0x5dd56f._0x28c389)]+=_0x103259,_0x45e5ea[_0x621413(_0x5dd56f._0x2f7773)]+=_0x103259,this[_0x621413(0xb9)]=_0x20002c,_0x4d97bd=geLatLngBounds(_0x45e5ea),this['_rectangle']=Cesium[_0x621413(_0x5dd56f._0x3754d0)]['fromDegrees'](_0x4d97bd['xmin'],_0x4d97bd['ymin'],_0x4d97bd['xmax'],_0x4d97bd['ymax']);let _0x5f0a15=_0x1bb928[0x0]['value']??0x1,_0x2913f3=_0x1bb928[0x0]['value']??0x0;const _0xb6cba9=[];_0x1bb928['forEach'](_0x5d39e2=>{const _0x775eae=_0x621413,_0x4632d3=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5d39e2['lng'],_0x5d39e2[_0x775eae(0xb1)]]),_0x2558ba=_0x5d39e2[_0x775eae(_0x2e5efe._0x143bba)]||0x1,_0x52f600=Math[_0x775eae(_0x2e5efe._0x4d20ff)]((_0x4632d3[0x0]-_0x45e5ea['xmin'])/_0x20002c),_0x5064af=Math['round']((_0x45e5ea['ymax']-_0x4632d3[0x1])/_0x20002c);_0x5f0a15=Math[_0x775eae(0xba)](_0x5f0a15,_0x2558ba),_0x2913f3=Math['min'](_0x2913f3,_0x2558ba),_0xb6cba9['push']({'x':_0x52f600,'y':_0x5064af,'value':_0x2558ba});});const _0x4e8eff={'min':this['options']['min']??_0x2913f3,'max':this['options']['max']??_0x5f0a15,'data':_0xb6cba9};this[_0x621413(0x9e)]=_0x4e8eff;if(!this['_last_mBounds']||_0x45e5ea[_0x621413(0xa6)]!==this['_last_mBounds']['xmin']||_0x45e5ea['ymin']!==this['_last_mBounds']['ymin']||_0x45e5ea[_0x621413(0xc4)]!==this[_0x621413(_0x5dd56f._0x520aba)]['xmax']||_0x45e5ea['ymax']!==this['_last_mBounds'][_0x621413(0xe2)]){this[_0x621413(_0x5dd56f._0x520aba)]=_0x45e5ea,this['_container'][_0x621413(_0x5dd56f._0x1e6798)]['cssText']='width:'+_0x525d4d+'px;height:'+_0x5cf9de+'px;';const _0x431863={...this['heatStyle'],'container':this['_container']};!this[_0x621413(_0x5dd56f._0x4c86c5)]?this['_heat']=h337__namespace[_0x621413(0xc5)](_0x431863):this['_heat']['configure'](_0x431863);}this['_heat']['setData'](_0x4e8eff);const _0x43c278=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return _0x43c278;}['_getArcHeatCanvas'](){const _0x128fb7={_0x39228e:0xd6,_0x4ca548:0xec,_0x5038a5:0xde},_0x2ffb98=_0x3f895f;this['_heat']['configure']({'radius':this['heatStyle']['radius']*this['style'][_0x2ffb98(_0x128fb7._0x39228e)],'blur':this['heatStyle']['blur']*this['style']['arcBlurScale'],'gradient':this['heatStyle']['gradientArc']||{0.25:'rgb(0,0,0)',0.55:_0x2ffb98(0xc8),0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x47d230=mars3d__namespace[_0x2ffb98(_0x128fb7._0x4ca548)]['copyCanvas'](this[_0x2ffb98(_0x128fb7._0x5038a5)]['_renderer'][_0x2ffb98(0xdf)]);return this['_heat']['configure'](this['options']['heatStyle']),_0x47d230;}['getPointData'](_0x401e26){const _0x15210c={_0x1af363:0xea,_0xa64d01:0xb1,_0x2594b0:0xa1},_0x127ed3=_0x3f895f,_0x12f544=mars3d__namespace['LngLatPoint']['parse'](_0x401e26);if(!_0x12f544)return{};const _0x37b6ec=mars3d__namespace[_0x127ed3(_0x15210c._0x1af363)]['lonlat2mercator']([_0x12f544['lng'],_0x12f544[_0x127ed3(_0x15210c._0xa64d01)]]),_0x2a36ce=this['_last_mBounds'],_0x5ea580=Math['round']((_0x37b6ec[0x0]-_0x2a36ce[_0x127ed3(0xa6)])/this['_scale']),_0x4dad41=Math['round']((_0x2a36ce['ymax']-_0x37b6ec[0x1])/this['_scale']),_0x2dcac9=this['_heat']['getValueAt']({'x':_0x5ea580,'y':_0x4dad41}),_0x5be5eb=this['_heat'][_0x127ed3(0xeb)][_0x127ed3(_0x15210c._0x2594b0)]['getImageData'](_0x5ea580-0x1,_0x4dad41-0x1,0x1,0x1)['data'];return{'x':_0x5ea580,'y':_0x4dad41,'value':_0x2dcac9,'color':'rgba('+_0x5be5eb[0x0]+','+_0x5be5eb[0x1]+','+_0x5be5eb[0x2]+','+_0x5be5eb[0x3]+')'};}}mars3d__namespace['LayerUtil']['register']('heat',HeatLayer),mars3d__namespace['layer'][_0x3f895f(0xa0)]=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x592814){const _0x2bc4ba=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x592814['xmin'],_0x592814['ymin']]),_0x3c5f2b=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x592814['xmax'],_0x592814['ymax']]);return{'xmin':_0x2bc4ba[0x0],'ymin':_0x2bc4ba[0x1],'xmax':_0x3c5f2b[0x0],'ymax':_0x3c5f2b[0x1]};}function geLatLngBounds(_0x5b5d03){const _0x354c5d={_0x3c3500:0xea,_0x1d1e94:0xa6},_0x3a96d2=_0x3f895f,_0x2999db=mars3d__namespace[_0x3a96d2(_0x354c5d._0x3c3500)]['mercator2lonlat']([_0x5b5d03[_0x3a96d2(_0x354c5d._0x1d1e94)],_0x5b5d03['ymin']]),_0x267489=mars3d__namespace[_0x3a96d2(_0x354c5d._0x3c3500)]['mercator2lonlat']([_0x5b5d03[_0x3a96d2(0xc4)],_0x5b5d03['ymax']]);return{'xmin':_0x2999db[0x0],'ymin':_0x2999db[0x1],'xmax':_0x267489[0x0],'ymax':_0x267489[0x1]};}function getVertexShaderSource(_0x189e89){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'+_0x189e89+';\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[_0x3f895f(0xa0)]=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.6.11",
3
+ "version": "3.6.13",
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.11"
13
+ "mars3d": "~3.6.13"
14
14
  },
15
15
  "scripts": {
16
16
  "lint": "eslint ./src/**/*.{js,ts} --fix"