mars3d-heatmap 3.4.10 → 3.4.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.
- package/dist/mars3d-heatmap.js +3 -3
- package/package.json +2 -2
package/dist/mars3d-heatmap.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap
|
|
3
3
|
*
|
|
4
|
-
* 版本信息:v3.4.
|
|
5
|
-
* 编译日期:2022-
|
|
4
|
+
* 版本信息:v3.4.12
|
|
5
|
+
* 编译日期:2022-11-01 17:36:39
|
|
6
6
|
* 版权所有:Copyright by 火星科技 http://mars3d.cn
|
|
7
7
|
* 使用单位:免费公开版 ,2022-06-01
|
|
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 _0x4e649b=_0x5c18;(function(_0xf4fb80,_0x3084bc){const _0x386222=_0x5c18,_0x4586af=_0xf4fb80();while(!![]){try{const _0x1e9339=-parseInt(_0x386222(0x129))/0x1+parseInt(_0x386222(0x14d))/0x2+parseInt(_0x386222(0x134))/0x3+-parseInt(_0x386222(0x136))/0x4*(parseInt(_0x386222(0x11f))/0x5)+-parseInt(_0x386222(0x106))/0x6+parseInt(_0x386222(0x157))/0x7*(-parseInt(_0x386222(0x118))/0x8)+-parseInt(_0x386222(0x162))/0x9*(-parseInt(_0x386222(0x10d))/0xa);if(_0x1e9339===_0x3084bc)break;else _0x4586af['push'](_0x4586af['shift']());}catch(_0x586f87){_0x4586af['push'](_0x4586af['shift']());}}}(_0x5c7d,0xd5e15));function _interopNamespace(_0x3d3a52){const _0x183868=_0x5c18;if(_0x3d3a52&&_0x3d3a52[_0x183868(0x14e)])return _0x3d3a52;var _0x1414c9=Object['create'](null);return _0x3d3a52&&Object[_0x183868(0x177)](_0x3d3a52)[_0x183868(0x12c)](function(_0x43370c){const _0x50dfc6=_0x183868;if(_0x43370c!=='default'){var _0x358099=Object[_0x50dfc6(0x148)](_0x3d3a52,_0x43370c);Object[_0x50dfc6(0x104)](_0x1414c9,_0x43370c,_0x358099[_0x50dfc6(0xf4)]?_0x358099:{'enumerable':!![],'get':function(){return _0x3d3a52[_0x43370c];}});}}),_0x1414c9[_0x183868(0x105)]=_0x3d3a52,_0x1414c9;}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=\x20texture2D(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[_0x4e649b(0x13d)])throw new Error(_0x4e649b(0x171));function _0x5c7d(){const _0x50106d=['Bwf4','y29VCMrPBMf0zxm','CMDIkdi1nsWYntuSmJu1kq','ywrKug9ZAxrPB24','mtCXmde4nM1lwvLQvq','x19LC01VzhvSzq','z2v0vMfSDwvbDa','zMXVB3i','x2HLyxq','q2fYDgvZAwfUmG','AgvHDfn0EwXL','tgf5zxjvDgLS','s0vfua','twf0zxjPywW','ndi5ogvxDgXgrq','uMvUzgvYu3rHDgu','C2v0rgf0yq','BwvYz2u','x2XHC3rFBujVDw5KCW','vxrPBa','D2LKDgG6','D2LKDgG','y29UzMLNDxjL','CMDIkde0mcWXndaSmtqWkq','Dg9bCNjHEq','mZG3Bg9Zs2HJ','ywrKr3jHCgHPyW','CgfYC2u','Aw1Hz2u','CM91BMq','x21VDw50zwriB29R','x3bVC2L0Aw9UCW','z3jHCgHPyW','x2fKzgvKsg9VAW','CMvTB3zLr3jHCgHPyW','q2vZAxvT','yxjJqMX1CLnJywXL','x3vWzgf0zvbVC2L0Aw9UC0HVB2S','yM9KEq','ChvZAa','6k+35BYv5ywLigHLyxrTyxaUANmG5BQtia','ywrKtgf5zxi','C2v0ug9ZAxrPB25Z','ug9SEvv0AwW','AgvHDa','C2HVDW','A2v5CW','zMX5vg9cEufUAw1HDgLVBKvUza','x2DYyxbOAwm','BgvUz3rO','x3jLBw92zwriB29R','z2v0','u3rLBMnPBez1BMn0Aw9U','BwLUq2fUDMfZu2L6zq','BwLU','z2v0uMvJDgfUz2XL','CMDIysG','y2fUDMfZ','r3jHCgHPy0XHEwvY','Bwf4q2fUDMfZu2L6zq','C3r5Bgu','uMvJDgfUz2XL','zgf0yq','sgvHDeXHEwvY','x2XHEwvY','y2XPzw50sgvPz2H0','B3b0Aw9UCW','zgvMAw5LuhjVCgvYDhK','zgvMyxvSDa','mJC5ndC0mgzMthrLEq','zMX5vg8','Eg1HEa','DMfSDwu','u3rLBMnPBe9WzxjHDgLVBG','Ew1HEa','x2nYzwf0zuDYyxbOAwm','ntGXotmWDM54AMjR','EwvSBg93','y2XPzw50v2LKDgG','ug9PBNruCMfUCW','x21HCa','x21cB3vUzhnnyxG','zNjVBurLz3jLzxm','y3r4','y29WEunHBNzHCW','CMvTB3zLtgf5zxi','Eg1PBG','mtuXndrJC0jPCwy','Bg9UBgf0mM1LCMnHDg9Y','zgLMzKHLAwDODa','BwvYy2f0B3iYBg9UBgf0','Ew1PBG','z3jHzgLLBNrbCMm','Bg5N','mtvfCwjcC08','Dw5PzM9YBxm','x2XHC3rFAgvHDerHDge','AgvPz2H0','Cg9ZAxrPB25Z','rg9TvxrPBa','z3jLzw4','x3jLy3rHBMDSzq','y3nZvgv4Da','CMvTB3zL','mta2ndaYm1zXr3nvrW','y29UDgfPBMvY','x2nYzwf0zufYy0DYyxbOAwm','zM9YrwfJAa','z3jHBNvSyxjPDhK','z2v0ug9PBNreyxrH','Cg9PBNrZ','x3nLDe9WDgLVBNniB29R','yxr0CMLIDxrLihzLyZmGCg9ZAxrPB24ZreHPz2G7cIaGicaGicaGicbHDhrYAwj1DguGDMvJmYbWB3nPDgLVBJnetg93oWOGicaGicaGicaGyxr0CMLIDxrLihzLyZiGC3q7cIaGicaGicaGicbHDhrYAwj1DguGzMXVyxqGyMf0y2HjzdSkicaGicaGicaGihvUAwzVCM0GC2fTCgXLCJjeigj1BxbnyxbFmZSkicaGicaGicaGihzHCNLPBMCGDMvJmYb2x3bVC2L0Aw9Utum7cIaGicaGicaGicb2yxj5Aw5NihzLyZmGDL9WB3nPDgLVBKvdoWOGicaGicaGicaGDMfYEwLUzYb2zwmYihzFC3q7cGOGicaGicaGicaGDM9PzcbTywLUkcKkicaGicaGicaGihSkicaGicaGicaGicaGDMvJncbWid0Gy3PTx2nVBxb1DgvqB3nPDgLVBIGPoWOGicaGicaGicaGicb2x3bVC2L0Aw9UtumGpsbWB3nPDgLVBJnesgLNAcaRihbVC2L0Aw9Um0rmB3C7cIaGicaGicaGicaGihzFCg9ZAxrPB25fqYa9icHJEM1FBw9KzwXwAwv3uMvSyxrPDMvuB0v5zsaQihaPlNH5EJSkicaGicaGicaGicaGDL9ZDca9ihn0oWOGicaGicaGicaGicb2zwm0ignVBg9Yid0GDgv4DhvYztjekgj1BxbnyxbFmYWGDL9ZDcK7cIaGicaGicaGicaGigzSB2f0ignLBNrLCKj1BxaGpsbKAxn0yw5JzsH2zwmZkdaUmcKSy29SB3iUCMDIktSkicaGicaGicaGicaGDMvJmYb1CerPCIa9ig5VCM1HBgL6zsH2x3bVC2L0Aw9UtumUEhL6ktSkicaGicaGicaGicaGDMvJmYbKAxnqB3mGpsb1CerPCIaQignLBNrLCKj1BxaGkIa','x3jLBMrLCMvY','tg5Ntgf0ug9PBNq','mZu1mdiWoufsz0nPra','rwXSAxbZB2LKu3vYzMfJzufWCgvHCMfUy2u','mti5nJGZnLrnswLSqG','zNjVBunHy2HL','Bgf0','q29SB3i','quXxqvLt','vKvsvevyx0zpuK1bva','Bgf5zxi','y3jLyxrL','uMvJDgfUz2XLuhjPBwL0AxzL','CMvJDgfUz2XL','x3nJywXL','uKvqtefdrq','CMvK','y2XLyxi','x2DLDefYy0HLyxrdyw52yxm','x2DLDeHLyxrdyw52yxm','CMvNAxn0zxi','CMDIkdaSmcWWkq','z2v0t3DUuhjVCgvYDhLezxnJCMLWDg9Y'];_0x5c7d=function(){return _0x50106d;};return _0x5c7d();}const Cesium=mars3d__namespace[_0x4e649b(0x16c)],BaseLayer=mars3d__namespace[_0x4e649b(0x13c)]['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:'blue',0.6:_0x4e649b(0x125),0.8:_0x4e649b(0x10e),0.9:_0x4e649b(0x142)}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance'][_0x4e649b(0x13b)]};class HeatLayer extends BaseLayer{constructor(){const _0x45b9f8=_0x4e649b;let _0x354499=arguments[_0x45b9f8(0xf2)]>0x0&&arguments[0x0]!==undefined?arguments[0x0]:{};super(_0x354499),this[_0x45b9f8(0x103)][_0x45b9f8(0xfc)]=this[_0x45b9f8(0x103)]['maxCanvasSize']??document['body'][_0x45b9f8(0x10f)],this[_0x45b9f8(0x103)][_0x45b9f8(0xfc)]=Math[_0x45b9f8(0xf7)](this[_0x45b9f8(0x103)][_0x45b9f8(0xfc)],0x1388),this[_0x45b9f8(0x103)]['minCanvasSize']=this['options'][_0x45b9f8(0xf6)]??document[_0x45b9f8(0x16f)][_0x45b9f8(0x102)],this[_0x45b9f8(0x103)][_0x45b9f8(0xf6)]=Math['max'](this[_0x45b9f8(0x103)][_0x45b9f8(0xf6)],0x2bc),this[_0x45b9f8(0x103)]['heatStyle']={...DEF_HEATSTYLE,...this['options'][_0x45b9f8(0x153)]||{}},this[_0x45b9f8(0x103)][_0x45b9f8(0xfd)]={...DEF_STYLE,...this[_0x45b9f8(0x103)][_0x45b9f8(0xfd)]||{}};}get['layer'](){const _0x14f88c=_0x4e649b;return this[_0x14f88c(0x101)];}get[_0x4e649b(0x153)](){const _0x4e358c=_0x4e649b;return this[_0x4e358c(0x103)][_0x4e358c(0x153)];}set[_0x4e649b(0x153)](_0x51d3f2){const _0x23a2d1=_0x4e649b;this[_0x23a2d1(0x103)][_0x23a2d1(0x153)]=mars3d__namespace['Util'][_0x23a2d1(0x15a)](this[_0x23a2d1(0x103)][_0x23a2d1(0x153)],_0x51d3f2),this['_heat']&&(this[_0x23a2d1(0x151)]['configure'](this['options'][_0x23a2d1(0x153)]),this[_0x23a2d1(0x16e)](!![]));}get[_0x4e649b(0xfd)](){const _0x4ebd6a=_0x4e649b;return this[_0x4ebd6a(0x103)][_0x4ebd6a(0xfd)];}set['style'](_0x280cf5){const _0x4b5228=_0x4e649b;this[_0x4b5228(0x103)]['style']=mars3d__namespace[_0x4b5228(0x15c)][_0x4b5228(0x15a)](this[_0x4b5228(0x103)][_0x4b5228(0xfd)],_0x280cf5);}get[_0x4e649b(0x123)](){const _0x2136b9=_0x4e649b;return this[_0x2136b9(0x168)];}set['positions'](_0x10f4a3){const _0x15736f=_0x4e649b;this[_0x15736f(0x173)](_0x10f4a3);}get[_0x4e649b(0x14a)](){const _0x599cb0=_0x4e649b,_0x16e246=[];return this[_0x599cb0(0x12f)][_0x599cb0(0x12c)](_0x5503cf=>{const _0x1e6501=_0x599cb0;_0x16e246[_0x1e6501(0x170)](_0x5503cf[_0x1e6501(0x161)]());}),_0x16e246;}get[_0x4e649b(0x13f)](){return this['_rectangle'];}[_0x4e649b(0x130)](_0xf16db8,_0x2855c7){const _0x34d062=_0x4e649b;_0xf16db8[_0x34d062(0x123)]&&(this[_0x34d062(0x123)]=_0xf16db8[_0x34d062(0x123)]);}[_0x4e649b(0x167)](){const _0x129ca9=_0x4e649b;this[_0x129ca9(0x101)]=new mars3d__namespace['layer'][(_0x129ca9(0xfb))]({'private':!![]});}[_0x4e649b(0x16a)](){const _0x376d67=_0x4e649b;this[_0x376d67(0x111)][_0x376d67(0x172)](this[_0x376d67(0x101)]),this[_0x376d67(0x103)][_0x376d67(0x123)]&&(this[_0x376d67(0x123)]=this[_0x376d67(0x103)][_0x376d67(0x123)]),this['options'][_0x376d67(0x107)]&&this[_0x376d67(0x178)]();}[_0x4e649b(0xf3)](){const _0x147a0a=_0x4e649b;this[_0x147a0a(0x153)]['container']&&(mars3d__namespace[_0x147a0a(0x124)][_0x147a0a(0x128)](this['heatStyle']['container']),delete this[_0x147a0a(0x153)][_0x147a0a(0x12a)]),this[_0x147a0a(0x143)](),this[_0x147a0a(0x111)][_0x147a0a(0x116)](this[_0x147a0a(0x101)]);}[_0x4e649b(0x14c)](_0x35797b,_0x18d1c3){const _0x3d9de1=_0x4e649b;this[_0x3d9de1(0x168)]=this[_0x3d9de1(0x168)]||[],this['_positions'][_0x3d9de1(0x170)](_0x35797b),this[_0x3d9de1(0x16e)](_0x18d1c3);}[_0x4e649b(0x173)](_0x4f2de0,_0x2f1cbf){const _0x5a8747=_0x4e649b;this[_0x5a8747(0x168)]=_0x4f2de0,this[_0x5a8747(0x16e)](_0x2f1cbf);}['clear'](){const _0x163eec=_0x4e649b;this[_0x163eec(0x179)]&&(this[_0x163eec(0x101)][_0x163eec(0x16b)](this[_0x163eec(0x179)],!![]),delete this[_0x163eec(0x179)]);}['_updatePositionsHook'](_0x2635c3){const _0x3b1c94=_0x4e649b;if(!this[_0x3b1c94(0x176)]||!this[_0x3b1c94(0x111)]||!this[_0x3b1c94(0x123)]||this[_0x3b1c94(0x123)][_0x3b1c94(0xf2)]===0x0)return this;const _0x3bb0a7=this[_0x3b1c94(0x145)]();return this[_0x3b1c94(0xfd)]['arc']?this[_0x3b1c94(0x179)]&&_0x2635c3?(this[_0x3b1c94(0x179)][_0x3b1c94(0x120)]['image']=_0x3bb0a7,this[_0x3b1c94(0x179)][_0x3b1c94(0x120)]['bumpMap']=this[_0x3b1c94(0x144)]()):this['_createArcGraphic'](_0x3bb0a7):this[_0x3b1c94(0x179)]&&_0x2635c3?this['_graphic']['uniforms'][_0x3b1c94(0x165)]=_0x3bb0a7:this[_0x3b1c94(0x10c)](_0x3bb0a7),this;}[_0x4e649b(0x10c)](_0x3a9629){const _0x3750b5=_0x4e649b;this[_0x3750b5(0x143)](),this['_graphic']=new mars3d__namespace[(_0x3750b5(0x169))][(_0x3750b5(0x13e))]({...this[_0x3750b5(0x103)],'rectangle':this[_0x3750b5(0x126)],'appearance':new Cesium[(_0x3750b5(0x135))]({'material':new Cesium[(_0x3750b5(0x156))]({'fabric':{'uniforms':{'image':_0x3a9629},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x3750b5(0x101)][_0x3750b5(0x163)](this['_graphic']);}[_0x4e649b(0x12b)](_0x120dae){const _0x1371e6=_0x4e649b;this[_0x1371e6(0x143)]();const _0x238847=Cesium[_0x1371e6(0x158)][_0x1371e6(0x137)]({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction'][_0x1371e6(0x13a)],'frontOperation':{'fail':Cesium[_0x1371e6(0x10a)][_0x1371e6(0x155)],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium[_0x1371e6(0x10a)][_0x1371e6(0x141)]},'backFunction':Cesium[_0x1371e6(0xf5)][_0x1371e6(0x13a)],'backOperation':{'fail':Cesium[_0x1371e6(0x10a)]['KEEP'],'zFail':Cesium[_0x1371e6(0x10a)][_0x1371e6(0x155)],'zPass':Cesium[_0x1371e6(0x10a)][_0x1371e6(0x141)]},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x17bd86=Math[_0x1371e6(0x150)](this[_0x1371e6(0xfd)][_0x1371e6(0x11a)]??this[_0x1371e6(0x112)]*0.02)+0.1;this[_0x1371e6(0xfd)][_0x1371e6(0x11a)]&&delete this['style'][_0x1371e6(0x11a)];const _0x2a5e14=(this[_0x1371e6(0xfd)]['splitNum'],0x64);let _0x5e3e67=Math[_0x1371e6(0x149)](this[_0x1371e6(0x126)][_0x1371e6(0x122)],this['_rectangle'][_0x1371e6(0x15e)]);this[_0x1371e6(0xfd)][_0x1371e6(0x12d)]=_0x5e3e67/=_0x2a5e14,this[_0x1371e6(0x179)]=new mars3d__namespace['graphic'][(_0x1371e6(0x13e))]({...this[_0x1371e6(0x103)],'rectangle':this[_0x1371e6(0x126)],'appearance':new Cesium[(_0x1371e6(0x135))]({'aboveGround':!![],'renderState':_0x238847,'material':new Cesium[(_0x1371e6(0x156))]({'fabric':{'uniforms':{'image':_0x120dae,'repeat':new Cesium[(_0x1371e6(0x152))](0x1,0x1),'color':new Cesium[(_0x1371e6(0x139))](0x1,0x1,0x1,0.01),'bumpMap':this[_0x1371e6(0x144)]()},'source':HeatMaterial},'translucent':!![]}),'vertexShaderSource':_0x1371e6(0x131)+_0x17bd86+';\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20p\x20+=vec4(disPos,0.0);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20czm_modelViewProjectionRelativeToEye\x20*\x20p;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20','flat':!![]})}),this[_0x1371e6(0x101)]['addGraphic'](this['_graphic']);}[_0x4e649b(0xf8)](_0x57be08){const _0xb96a56=_0x4e649b;return _0x57be08!==null&&_0x57be08!==void 0x0&&_0x57be08['isFormat']&&this[_0xb96a56(0x126)]?mars3d__namespace[_0xb96a56(0x174)]['formatRectangle'](this['_rectangle']):this[_0xb96a56(0x126)];}[_0x4e649b(0x145)](){const _0x5f5496=_0x4e649b,_0x5b5d49=this[_0x5f5496(0x168)],_0x452215=[];let _0x53d6ce,_0x31b31a,_0x4b8aea,_0x55a81a;_0x5b5d49[_0x5f5496(0x12c)](_0x410a91=>{const _0x4213cc=_0x5f5496,_0x1824b5=mars3d__namespace[_0x4213cc(0x133)][_0x4213cc(0x164)](_0x410a91);if(!_0x1824b5)return;_0x1824b5[_0x4213cc(0x109)]=_0x410a91[_0x4213cc(0x109)]||0x1,!this[_0x4213cc(0x103)]['rectangle']&&(_0x53d6ce===undefined?(_0x53d6ce=_0x1824b5[_0x4213cc(0x11e)],_0x31b31a=_0x1824b5[_0x4213cc(0x11e)],_0x4b8aea=_0x1824b5['lat'],_0x55a81a=_0x1824b5[_0x4213cc(0x138)]):(_0x53d6ce=Math[_0x4213cc(0xf7)](_0x53d6ce,_0x1824b5[_0x4213cc(0x11e)]),_0x31b31a=Math[_0x4213cc(0x149)](_0x31b31a,_0x1824b5['lng']),_0x4b8aea=Math['min'](_0x4b8aea,_0x1824b5['lat']),_0x55a81a=Math[_0x4213cc(0x149)](_0x55a81a,_0x1824b5[_0x4213cc(0x138)]))),_0x452215[_0x4213cc(0x170)](_0x1824b5);});let _0x58fea0=this[_0x5f5496(0x103)][_0x5f5496(0x13f)]||{'xmin':_0x53d6ce,'xmax':_0x31b31a,'ymin':_0x4b8aea,'ymax':_0x55a81a};const _0x1a1afb=getMercatorBounds(_0x58fea0),_0x3ea547=Math['abs'](_0x1a1afb[_0x5f5496(0x108)]-_0x1a1afb[_0x5f5496(0x117)]),_0x1971e8=Math['abs'](_0x1a1afb[_0x5f5496(0x10b)]-_0x1a1afb[_0x5f5496(0x11c)]),_0x2886a2=Math[_0x5f5496(0x149)](_0x3ea547,_0x1971e8),_0x55d4c4=Math[_0x5f5496(0xf7)](_0x3ea547,_0x1971e8);this[_0x5f5496(0x112)]=_0x2886a2;let _0x2b7950=0x1;if(_0x2886a2>this[_0x5f5496(0x103)][_0x5f5496(0xfc)])_0x2b7950=_0x2886a2/this[_0x5f5496(0x103)][_0x5f5496(0xfc)],_0x55d4c4/_0x2b7950<this['options']['minCanvasSize']&&(_0x2b7950=_0x55d4c4/this[_0x5f5496(0x103)][_0x5f5496(0xf6)]);else _0x55d4c4<this[_0x5f5496(0x103)][_0x5f5496(0xf6)]&&(_0x2b7950=_0x55d4c4/this[_0x5f5496(0x103)][_0x5f5496(0xf6)],_0x2886a2/_0x2b7950>this[_0x5f5496(0x103)][_0x5f5496(0xfc)]&&(_0x2b7950=_0x2886a2/this[_0x5f5496(0x103)][_0x5f5496(0xfc)]));const _0x592fd9=this[_0x5f5496(0x153)]['radius']*1.5,_0x4eea17=_0x3ea547/_0x2b7950+_0x592fd9*0x2,_0x3b52d7=_0x1971e8/_0x2b7950+_0x592fd9*0x2,_0xf5f8ce=_0x592fd9*_0x2b7950;_0x1a1afb[_0x5f5496(0x117)]-=_0xf5f8ce,_0x1a1afb[_0x5f5496(0x11c)]-=_0xf5f8ce,_0x1a1afb[_0x5f5496(0x108)]+=_0xf5f8ce,_0x1a1afb['ymax']+=_0xf5f8ce,this['_scale']=_0x2b7950,_0x58fea0=geLatLngBounds(_0x1a1afb),this['_rectangle']=Cesium[_0x5f5496(0xfe)][_0x5f5496(0x113)](_0x58fea0['xmin'],_0x58fea0['ymin'],_0x58fea0['xmax'],_0x58fea0[_0x5f5496(0x10b)]);let _0x1a66f0=_0x452215[0x0][_0x5f5496(0x109)]??0x1,_0x586606=_0x452215[0x0][_0x5f5496(0x109)]??0x0;const _0x349808=[];_0x452215['forEach'](_0x19eba1=>{const _0x423884=_0x5f5496,_0x50c321=mars3d__namespace[_0x423884(0x110)][_0x423884(0x119)]([_0x19eba1['lng'],_0x19eba1[_0x423884(0x138)]]),_0x292378=_0x19eba1['value']||0x1,_0x40ad68=Math[_0x423884(0x166)]((_0x50c321[0x0]-_0x1a1afb[_0x423884(0x117)])/_0x2b7950),_0x21de48=Math[_0x423884(0x166)]((_0x1a1afb[_0x423884(0x10b)]-_0x50c321[0x1])/_0x2b7950);_0x1a66f0=Math[_0x423884(0x149)](_0x1a66f0,_0x292378),_0x586606=Math['min'](_0x586606,_0x292378),_0x349808['push']({'x':_0x40ad68,'y':_0x21de48,'value':_0x292378});});const _0x4c4c77={'min':this[_0x5f5496(0x103)][_0x5f5496(0xf7)]??_0x586606,'max':this['options'][_0x5f5496(0x149)]??_0x1a66f0,'data':_0x349808};this[_0x5f5496(0x121)]=_0x4c4c77;(!this[_0x5f5496(0x15b)]||_0x1a1afb['xmin']!==this['_last_mBounds'][_0x5f5496(0x117)]||_0x1a1afb[_0x5f5496(0x11c)]!==this[_0x5f5496(0x15b)][_0x5f5496(0x11c)]||_0x1a1afb[_0x5f5496(0x108)]!==this[_0x5f5496(0x15b)]['xmax']||_0x1a1afb[_0x5f5496(0x10b)]!==this['_last_mBounds'][_0x5f5496(0x10b)])&&(this[_0x5f5496(0x15b)]=_0x1a1afb,!this[_0x5f5496(0x153)][_0x5f5496(0x12a)]&&(this[_0x5f5496(0x153)][_0x5f5496(0x12a)]=mars3d__namespace[_0x5f5496(0x124)][_0x5f5496(0x13d)]('div','mars3d-heatmap\x20mars3d-hideDiv',this[_0x5f5496(0x111)]['container'])),this['heatStyle']['container'][_0x5f5496(0xfd)][_0x5f5496(0x127)]=_0x5f5496(0x15d)+_0x4eea17+'px;height:'+_0x3b52d7+'px;',!this['_heat']?this['_heat']=h337__namespace[_0x5f5496(0x13d)](this[_0x5f5496(0x153)]):this[_0x5f5496(0x151)][_0x5f5496(0x15f)](this[_0x5f5496(0x153)]));this[_0x5f5496(0x151)][_0x5f5496(0x159)](_0x4c4c77);const _0x52bf05=mars3d__namespace[_0x5f5496(0x124)][_0x5f5496(0x115)](this[_0x5f5496(0x151)]['_renderer'][_0x5f5496(0xfa)]);return _0x52bf05;}[_0x4e649b(0x144)](){const _0x44a97a=_0x4e649b;this[_0x44a97a(0x151)]['configure']({'radius':this['heatStyle']['radius']*this['style']['arcRadiusScale'],'blur':this[_0x44a97a(0x153)]['blur']*this[_0x44a97a(0xfd)][_0x44a97a(0x16d)],'gradient':this['heatStyle'][_0x44a97a(0x11d)]||{0.25:_0x44a97a(0x147),0.55:_0x44a97a(0x160),0.85:'rgb(216,216,216)',0x1:_0x44a97a(0x14b)}});const _0x3650b6=mars3d__namespace[_0x44a97a(0x124)][_0x44a97a(0x115)](this[_0x44a97a(0x151)][_0x44a97a(0x132)]['canvas']);return this[_0x44a97a(0x151)][_0x44a97a(0x15f)](this['options'][_0x44a97a(0x153)]),_0x3650b6;}[_0x4e649b(0x12e)](_0x4c840d){const _0x322f5b=_0x4e649b,_0x4928bf=mars3d__namespace['LngLatPoint'][_0x322f5b(0x164)](_0x4c840d);if(!_0x4928bf)return{};const _0x4c24e1=mars3d__namespace[_0x322f5b(0x110)][_0x322f5b(0x119)]([_0x4928bf[_0x322f5b(0x11e)],_0x4928bf[_0x322f5b(0x138)]]),_0x135fcb=this['_last_mBounds'],_0x4ae12a=Math['round']((_0x4c24e1[0x0]-_0x135fcb[_0x322f5b(0x117)])/this[_0x322f5b(0x140)]),_0x3c6d64=Math[_0x322f5b(0x166)]((_0x135fcb['ymax']-_0x4c24e1[0x1])/this[_0x322f5b(0x140)]),_0xd2f847=this[_0x322f5b(0x151)][_0x322f5b(0x14f)]({'x':_0x4ae12a,'y':_0x3c6d64}),_0x261e2c=this[_0x322f5b(0x151)][_0x322f5b(0x132)][_0x322f5b(0x114)]['getImageData'](_0x4ae12a-0x1,_0x3c6d64-0x1,0x1,0x1)[_0x322f5b(0xff)];return{'x':_0x4ae12a,'y':_0x3c6d64,'value':_0xd2f847,'color':_0x322f5b(0xf9)+_0x261e2c[0x0]+','+_0x261e2c[0x1]+','+_0x261e2c[0x2]+','+_0x261e2c[0x3]+')'};}}mars3d__namespace['layer'][_0x4e649b(0x100)]=HeatLayer,mars3d__namespace[_0x4e649b(0x154)][_0x4e649b(0x146)](_0x4e649b(0x175),HeatLayer);function getMercatorBounds(_0x51a741){const _0x2aa527=_0x4e649b,_0x6f1221=mars3d__namespace[_0x2aa527(0x110)]['lonlat2mercator']([_0x51a741[_0x2aa527(0x117)],_0x51a741[_0x2aa527(0x11c)]]),_0x530538=mars3d__namespace[_0x2aa527(0x110)][_0x2aa527(0x119)]([_0x51a741[_0x2aa527(0x108)],_0x51a741['ymax']]);return{'xmin':_0x6f1221[0x0],'ymin':_0x6f1221[0x1],'xmax':_0x530538[0x0],'ymax':_0x530538[0x1]};}function _0x5c18(_0x1c0230,_0x21ba1f){const _0x5c7dd5=_0x5c7d();return _0x5c18=function(_0x5c18d9,_0x480b04){_0x5c18d9=_0x5c18d9-0xf2;let _0x2d521e=_0x5c7dd5[_0x5c18d9];if(_0x5c18['nzhMJA']===undefined){var _0x577918=function(_0x3d3a52){const _0x1414c9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x43370c='',_0x358099='';for(let _0x354499=0x0,_0x51d3f2,_0x280cf5,_0x10f4a3=0x0;_0x280cf5=_0x3d3a52['charAt'](_0x10f4a3++);~_0x280cf5&&(_0x51d3f2=_0x354499%0x4?_0x51d3f2*0x40+_0x280cf5:_0x280cf5,_0x354499++%0x4)?_0x43370c+=String['fromCharCode'](0xff&_0x51d3f2>>(-0x2*_0x354499&0x6)):0x0){_0x280cf5=_0x1414c9['indexOf'](_0x280cf5);}for(let _0x16e246=0x0,_0x5503cf=_0x43370c['length'];_0x16e246<_0x5503cf;_0x16e246++){_0x358099+='%'+('00'+_0x43370c['charCodeAt'](_0x16e246)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x358099);};_0x5c18['UwTXjG']=_0x577918,_0x1c0230=arguments,_0x5c18['nzhMJA']=!![];}const _0x2ddcba=_0x5c7dd5[0x0],_0x378d1e=_0x5c18d9+_0x2ddcba,_0x5f3bde=_0x1c0230[_0x378d1e];return!_0x5f3bde?(_0x2d521e=_0x5c18['UwTXjG'](_0x2d521e),_0x1c0230[_0x378d1e]=_0x2d521e):_0x2d521e=_0x5f3bde,_0x2d521e;},_0x5c18(_0x1c0230,_0x21ba1f);}function geLatLngBounds(_0x276621){const _0x345957=_0x4e649b,_0x1bf50b=mars3d__namespace[_0x345957(0x110)][_0x345957(0x11b)]([_0x276621['xmin'],_0x276621[_0x345957(0x11c)]]),_0x356175=mars3d__namespace[_0x345957(0x110)]['mercator2lonlat']([_0x276621['xmax'],_0x276621['ymax']]);return{'xmin':_0x1bf50b[0x0],'ymin':_0x1bf50b[0x1],'xmax':_0x356175[0x0],'ymax':_0x356175[0x1]};}exports[_0x4e649b(0x100)]=HeatLayer,Object[_0x4e649b(0x104)](exports,_0x4e649b(0x14e),{'value':!![]});
|
|
14
|
+
'use strict';const _0x5df9ba=_0x4d18;function _0x2ee4(){const _0x1956bc=['mJK1nZe5mKfACujjsa','uMvJDgfUz2XLuhjPBwL0AxzL','u3rLBMnPBe9WzxjHDgLVBG','mtGXmZK0BhbwBvrM','BgvUz3rO','vKvsvevyx0zpuK1bva','BwvYz2u','quXqsefFqKXftKq','x2DLDeHLyxrdyw52yxm','x3bVC2L0Aw9UCW','ChG7AgvPz2H0oG','rg9TvxrPBa','BwLUq2fUDMfZu2L6zq','Bgf0','z3jHBNvSyxjPDhK','Dw5PzM9YBsbZyw1WBgvYmKqGAw1Hz2u7cGPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPihSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0oWOGihzLyZqGy29SB3jjBwfNzsa9ihrLEhr1CMuYrcHPBwfNzsWGC3qPoWOGigLMkgnVBg9Ysw1Hz2uUCMDIid09ihzLyZmOms4Wksb8FcbJB2XVCKLTywDLlNjNyIa9psb2zwmZkdaUmcKPihSkicaGigrPC2nHCMq7cIaGFqOGig1HDgvYAwfSlMrPzMz1C2uGpsbJB2XVCKLTywDLlNjNyJSkicbTyxrLCMLHBc5HBhbOysa9ignVBg9Ysw1Hz2uUytSkicbYzxr1CM4GBwf0zxjPywW7cN0k','x3nLDe9WDgLVBNniB29R','mtmZmZy4menoqufSCq','x21HCa','yxjJ','y29WEunHBNzHCW','CM91BMq','Ew1PBG','yMX1zq','Bgf5zxi','CMvJDgfUz2XL','x2DLDefYy0HLyxrdyw52yxm','y3r4','B3b0Aw9UCW','C2v0ug9ZAxrPB25Z','uKvqtefdrq','x2nYzwf0zuDYyxbOAwm','y29VCMrPBMf0zxm','vxrPBa','y29UDgfPBMvY','CMDIkdi1nsWYntuSmJu1kq','ywrKug9ZAxrPB24','C3r5Bgu','CMfKAxvZ','y29UzMLNDxjL','q2fYDgvZAwfUmG','x21cB3vUzhnnyxG','mJbkBwPcCwe','quXxqvLt','CMvK','x2DYyxbOAwm','BwvYy2f0B3iYBg9UBgf0','BwfYCZnKlwHLyxrTyxaGBwfYCZnKlwHPzgveAxy','z3jHzgLLBNrbCMm','z3jLzw4','s0vfua','BwLU','x2XHC3rFBujVDw5KCW','Aw1Hz2u','Ew1HEa','yNvTCe1HCa','tgf5zxjvDgLS','x2fKzgvKsg9VAW','CMvTB3zLtgf5zxi','sgvHDeXHEwvY','Bg9UBgf0mM1LCMnHDg9Y','DMfSDwu','rwXSAxbZB2LKu3vYzMfJzufWCgvHCMfUy2u','z2v0vMfSDwvbDa','CMDIysG','Bwf4','zgvMAw5LuhjVCgvYDhK','r3jHCgHPy0XHEwvY','x2XHC3rFAgvHDerHDge','AgvHDa','EwvSBg93','z2v0uMvJDgfUz2XL','x3vWzgf0zvbVC2L0Aw9UC0HVB2S','C2HVDW','z3jHCgHPyW','q2vZAxvT','C2v0rgf0yq','x3jLBMrLCMvY','x3jLBw92zwriB29R','zNjVBunHy2HL','ywjZ','6k+35BYv5ywLigHLyxrTyxaUANmG5BQtia','x3nJywXL','zM9YrwfJAa','x2XHEwvY','Eg1HEa','x3jLy3rHBMDSzq','Bg5N','Eg1PBG','ywrKr3jHCgHPyW','Dw5PzM9YBxm','CgfYC2u','CMvTB3zLr3jHCgHPyW','yxjJqMX1CLnJywXL','y2XLyxi','ChvZAa','Cg9PBNrZ','AgvHDfn0EwXL','uMvUzgvYu3rHDgu','x2DYyxbOAwmY','x2nYzwf0zufYy0DYyxbOAwm','u3rLBMnPBez1BMn0Aw9U','x2HLyxq','zgf0yq','CMDIkde0mcWXndaSmtqWkq','z2v0','x21VDw50zwriB29R','mZG0nZaYCw5PvNbz','mJqYnde2DuLmufbI','mJa3mtCZnhDPu0vxzW','z2v0t3DUuhjVCgvYDhLezxnJCMLWDg9Y','CMvNAxn0zxi','zgLMzKHLAwDODa','tg5Ntgf0ug9PBNq','z2v0ug9PBNreyxrH','ywrKtgf5zxi','C3bSAxroDw0','CMvTB3zL','qMfZzuXHEwvY','yM9KEq','y3jLyxrL','Bwf4q2fUDMfZu2L6zq','Cg9ZAxrPB25Z','y2fUDMfZ','zgvMyxvSDa','CMDIkdiXnIWYmtySmJe2kq','CMDIkdaSmcWWkq','zMX5vg8','zgL2','twf0zxjPywW','yxjJrgLYzwn0Aw9U','uMvJDgfUz2XL','ug9PBNruCMfUCW','mZe2mdi2q2POEe5u'];_0x2ee4=function(){return _0x1956bc;};return _0x2ee4();}function _0x4d18(_0x28841b,_0x51e583){const _0x2ee409=_0x2ee4();return _0x4d18=function(_0x4d1805,_0x45afac){_0x4d1805=_0x4d1805-0x1e0;let _0x3691da=_0x2ee409[_0x4d1805];if(_0x4d18['FmtdQo']===undefined){var _0x27339a=function(_0x2217fe){const _0x1234e5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x23ff44='',_0x40d756='';for(let _0x388dee=0x0,_0x4eb3b2,_0xcf48bf,_0x1eef78=0x0;_0xcf48bf=_0x2217fe['charAt'](_0x1eef78++);~_0xcf48bf&&(_0x4eb3b2=_0x388dee%0x4?_0x4eb3b2*0x40+_0xcf48bf:_0xcf48bf,_0x388dee++%0x4)?_0x23ff44+=String['fromCharCode'](0xff&_0x4eb3b2>>(-0x2*_0x388dee&0x6)):0x0){_0xcf48bf=_0x1234e5['indexOf'](_0xcf48bf);}for(let _0x304a7c=0x0,_0x2879f4=_0x23ff44['length'];_0x304a7c<_0x2879f4;_0x304a7c++){_0x40d756+='%'+('00'+_0x23ff44['charCodeAt'](_0x304a7c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x40d756);};_0x4d18['EAfpZB']=_0x27339a,_0x28841b=arguments,_0x4d18['FmtdQo']=!![];}const _0x317d38=_0x2ee409[0x0],_0x154d85=_0x4d1805+_0x317d38,_0x485a3e=_0x28841b[_0x154d85];return!_0x485a3e?(_0x3691da=_0x4d18['EAfpZB'](_0x3691da),_0x28841b[_0x154d85]=_0x3691da):_0x3691da=_0x485a3e,_0x3691da;},_0x4d18(_0x28841b,_0x51e583);}(function(_0x334339,_0x204fc8){const _0xab9c73=_0x4d18,_0x12f4bb=_0x334339();while(!![]){try{const _0x4f89cc=-parseInt(_0xab9c73(0x264))/0x1+-parseInt(_0xab9c73(0x260))/0x2+parseInt(_0xab9c73(0x246))/0x3+parseInt(_0xab9c73(0x247))/0x4*(parseInt(_0xab9c73(0x205))/0x5)+parseInt(_0xab9c73(0x1ec))/0x6+parseInt(_0xab9c73(0x248))/0x7+-parseInt(_0xab9c73(0x261))/0x8;if(_0x4f89cc===_0x204fc8)break;else _0x12f4bb['push'](_0x12f4bb['shift']());}catch(_0x2bba1b){_0x12f4bb['push'](_0x12f4bb['shift']());}}}(_0x2ee4,0x2be7c));function _interopNamespace(_0x2217fe){const _0x52f9ee=_0x4d18;if(_0x2217fe&&_0x2217fe['__esModule'])return _0x2217fe;var _0x1234e5=Object[_0x52f9ee(0x253)](null);return _0x2217fe&&Object['keys'](_0x2217fe)[_0x52f9ee(0x22e)](function(_0x23ff44){const _0x4721f0=_0x52f9ee;if(_0x23ff44!=='default'){var _0x40d756=Object[_0x4721f0(0x249)](_0x2217fe,_0x23ff44);Object[_0x4721f0(0x21d)](_0x1234e5,_0x23ff44,_0x40d756[_0x4721f0(0x244)]?_0x40d756:{'enumerable':!![],'get':function(){return _0x2217fe[_0x23ff44];}});}}),_0x1234e5[_0x52f9ee(0x257)]=_0x2217fe,_0x1234e5;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial=_0x5df9ba(0x1ea);if(!h337__namespace['create'])throw new Error(_0x5df9ba(0x22c));const Cesium=mars3d__namespace[_0x5df9ba(0x226)],BaseLayer=mars3d__namespace[_0x5df9ba(0x1f3)][_0x5df9ba(0x251)],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:_0x5df9ba(0x1f2),0.6:_0x5df9ba(0x20c),0.8:_0x5df9ba(0x221),0.9:_0x5df9ba(0x207)}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium[_0x5df9ba(0x219)][_0x5df9ba(0x1e0)]};class HeatLayer extends BaseLayer{constructor(){const _0x35808d=_0x5df9ba;let _0x388dee=arguments['length']>0x0&&arguments[0x0]!==undefined?arguments[0x0]:{};super(_0x388dee),this['options'][_0x35808d(0x254)]=this[_0x35808d(0x1f7)][_0x35808d(0x254)]??document[_0x35808d(0x252)]['clientWidth'],this[_0x35808d(0x1f7)]['maxCanvasSize']=Math['min'](this[_0x35808d(0x1f7)][_0x35808d(0x254)],0x1388),this['options'][_0x35808d(0x1e7)]=this[_0x35808d(0x1f7)][_0x35808d(0x1e7)]??document[_0x35808d(0x252)]['clientHeight'],this[_0x35808d(0x1f7)][_0x35808d(0x1e7)]=Math[_0x35808d(0x21c)](this['options'][_0x35808d(0x1e7)],0x2bc),this['options'][_0x35808d(0x23c)]={...DEF_HEATSTYLE,...this['options'][_0x35808d(0x23c)]||{}},this['options'][_0x35808d(0x200)]={...DEF_STYLE,...this['options']['style']||{}};}get[_0x5df9ba(0x1f3)](){return this['_layer'];}get[_0x5df9ba(0x23c)](){const _0x4e4aba=_0x5df9ba;return this[_0x4e4aba(0x1f7)][_0x4e4aba(0x23c)];}set['heatStyle'](_0x4eb3b2){const _0x150315=_0x5df9ba;this['options'][_0x150315(0x23c)]=mars3d__namespace[_0x150315(0x1fc)][_0x150315(0x1e1)](this[_0x150315(0x1f7)][_0x150315(0x23c)],_0x4eb3b2),this[_0x150315(0x241)]&&(this[_0x150315(0x241)][_0x150315(0x202)](this[_0x150315(0x1f7)][_0x150315(0x23c)]),this[_0x150315(0x223)](!![]));}get[_0x5df9ba(0x200)](){return this['options']['style'];}set[_0x5df9ba(0x200)](_0xcf48bf){const _0x48dd05=_0x5df9ba;this[_0x48dd05(0x1f7)]['style']=mars3d__namespace['Util'][_0x48dd05(0x1e1)](this[_0x48dd05(0x1f7)][_0x48dd05(0x200)],_0xcf48bf);}get[_0x5df9ba(0x255)](){const _0xfefc3f=_0x5df9ba;return this[_0xfefc3f(0x1e4)];}set['positions'](_0x1eef78){const _0x572b9c=_0x5df9ba;this[_0x572b9c(0x1f8)](_0x1eef78);}get[_0x5df9ba(0x1fb)](){const _0x3ea185=_0x5df9ba,_0x304a7c=[];return this[_0x3ea185(0x23b)][_0x3ea185(0x22e)](_0x2879f4=>{const _0x2410d5=_0x3ea185;_0x304a7c[_0x2410d5(0x23a)](_0x2879f4['toArray']());}),_0x304a7c;}get[_0x5df9ba(0x1f4)](){const _0x5b66b6=_0x5df9ba;return this[_0x5b66b6(0x231)];}[_0x5df9ba(0x1eb)](_0x5e1f05,_0x577413){const _0x27caf4=_0x5df9ba;_0x5e1f05[_0x27caf4(0x255)]&&(this['positions']=_0x5e1f05[_0x27caf4(0x255)]);}[_0x5df9ba(0x245)](){const _0x4f7ba1=_0x5df9ba;this[_0x4f7ba1(0x22f)]=new mars3d__namespace[(_0x4f7ba1(0x1f3))][(_0x4f7ba1(0x21e))]({'private':!![]});}[_0x5df9ba(0x214)](){const _0x16169e=_0x5df9ba;this[_0x16169e(0x1ed)][_0x16169e(0x24e)](this[_0x16169e(0x22f)]),this[_0x16169e(0x1f7)][_0x16169e(0x255)]&&(this['positions']=this['options'][_0x16169e(0x255)]),this[_0x16169e(0x1f7)][_0x16169e(0x25a)]&&this['flyToByAnimationEnd']();}[_0x5df9ba(0x229)](){const _0x39c9da=_0x5df9ba;this['heatStyle']['container']&&(mars3d__namespace[_0x39c9da(0x1e6)][_0x39c9da(0x250)](this['heatStyle'][_0x39c9da(0x1fd)]),delete this[_0x39c9da(0x23c)]['container']),this['clear'](),this[_0x39c9da(0x1ed)][_0x39c9da(0x215)](this[_0x39c9da(0x22f)]);}[_0x5df9ba(0x1ff)](_0x27c599,_0x56afe6){const _0x4358af=_0x5df9ba;this[_0x4358af(0x1e4)]=this['_positions']||[],this[_0x4358af(0x1e4)][_0x4358af(0x23a)](_0x27c599),this[_0x4358af(0x223)](_0x56afe6);}[_0x5df9ba(0x1f8)](_0x18ae54,_0x4b9adb){const _0x26ca4a=_0x5df9ba;this[_0x26ca4a(0x1e4)]=_0x18ae54,this[_0x26ca4a(0x223)](_0x4b9adb);}[_0x5df9ba(0x239)](){const _0x19a13c=_0x5df9ba;this[_0x19a13c(0x208)]&&(this['_layer'][_0x19a13c(0x237)](this[_0x19a13c(0x208)],!![]),delete this[_0x19a13c(0x208)]),this[_0x19a13c(0x23e)]&&(this[_0x19a13c(0x22f)][_0x19a13c(0x237)](this[_0x19a13c(0x23e)],!![]),delete this[_0x19a13c(0x23e)]);}[_0x5df9ba(0x223)](_0x9a64d0){const _0x25d99b=_0x5df9ba;if(!this[_0x25d99b(0x224)]||!this[_0x25d99b(0x1ed)]||!this['positions']||this[_0x25d99b(0x255)][_0x25d99b(0x265)]===0x0)return this;const _0x561aa5=this[_0x25d99b(0x1e3)]();return this[_0x25d99b(0x200)][_0x25d99b(0x1ee)]?this[_0x25d99b(0x208)]&&_0x9a64d0?(this[_0x25d99b(0x208)]['uniforms'][_0x25d99b(0x210)]=_0x561aa5,this[_0x25d99b(0x208)][_0x25d99b(0x235)]['bumpMap']=this[_0x25d99b(0x1f5)](),this['_graphic2']&&(this['_graphic2'][_0x25d99b(0x235)][_0x25d99b(0x210)]=_0x561aa5,this[_0x25d99b(0x23e)][_0x25d99b(0x235)][_0x25d99b(0x212)]=this[_0x25d99b(0x208)]['uniforms']['bumpMap'])):this[_0x25d99b(0x23f)](_0x561aa5):this['_graphic']&&_0x9a64d0?this[_0x25d99b(0x208)][_0x25d99b(0x235)][_0x25d99b(0x210)]=_0x561aa5:this[_0x25d99b(0x1fa)](_0x561aa5),this;}['_createGraphic'](_0x157c09){const _0x242d19=_0x5df9ba;this[_0x242d19(0x239)](),this[_0x242d19(0x208)]=new mars3d__namespace[(_0x242d19(0x225))][(_0x242d19(0x262))]({...this[_0x242d19(0x1f7)],'rectangle':this[_0x242d19(0x231)],'appearance':new Cesium[(_0x242d19(0x219))]({'material':new Cesium[(_0x242d19(0x25c))]({'fabric':{'uniforms':{'image':_0x157c09},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this['_layer'][_0x242d19(0x234)](this[_0x242d19(0x208)]);}[_0x5df9ba(0x23f)](_0x39b30c){const _0x31830b=_0x5df9ba;this[_0x31830b(0x239)]();const _0x1ead3f=Cesium[_0x31830b(0x23d)][_0x31830b(0x22a)]({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium[_0x31830b(0x240)]['ALWAYS'],'frontOperation':{'fail':Cesium[_0x31830b(0x263)][_0x31830b(0x20d)],'zFail':Cesium['StencilOperation'][_0x31830b(0x20d)],'zPass':Cesium[_0x31830b(0x263)][_0x31830b(0x1f9)]},'backFunction':Cesium['StencilFunction'][_0x31830b(0x206)],'backOperation':{'fail':Cesium[_0x31830b(0x263)]['KEEP'],'zFail':Cesium['StencilOperation'][_0x31830b(0x20d)],'zPass':Cesium['StencilOperation'][_0x31830b(0x1f9)]},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState'][_0x31830b(0x1e2)]}),_0x5cd4fe=Math['floor'](this[_0x31830b(0x200)][_0x31830b(0x24b)]??this[_0x31830b(0x204)]*0.02)+0.1;this[_0x31830b(0x200)][_0x31830b(0x24b)]&&delete this[_0x31830b(0x200)][_0x31830b(0x24b)];const _0x159655=(this[_0x31830b(0x200)][_0x31830b(0x24f)],0x64);let _0x4c25ae=Math['max'](this[_0x31830b(0x231)]['height'],this[_0x31830b(0x231)]['width']);this[_0x31830b(0x200)][_0x31830b(0x1e9)]=_0x4c25ae/=_0x159655;const _0x65cae8=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x39b30c,'repeat':new Cesium[(_0x31830b(0x203))](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this[_0x31830b(0x1f5)]()},'source':HeatMaterial},'translucent':!![]}),_0x1cc044=this['style'][_0x31830b(0x25d)]||0x1;this[_0x31830b(0x208)]=new mars3d__namespace['graphic'][(_0x31830b(0x262))]({...this[_0x31830b(0x1f7)],'rectangle':this[_0x31830b(0x231)],'appearance':new Cesium[(_0x31830b(0x219))]({'flat':!![],'aboveGround':!![],'renderState':_0x1ead3f,'material':_0x65cae8,'vertexShaderSource':getVertexShaderSource(_0x5cd4fe*_0x1cc044)})}),this[_0x31830b(0x22f)]['addGraphic'](this[_0x31830b(0x208)]),this[_0x31830b(0x200)][_0x31830b(0x25d)]===0x0&&(this[_0x31830b(0x23e)]=new mars3d__namespace[(_0x31830b(0x225))][(_0x31830b(0x262))]({...this[_0x31830b(0x1f7)],'rectangle':this[_0x31830b(0x231)],'appearance':new Cesium[(_0x31830b(0x219))]({'flat':!![],'aboveGround':!![],'renderState':_0x1ead3f,'material':_0x65cae8,'vertexShaderSource':getVertexShaderSource(-_0x5cd4fe)})}),this['_layer'][_0x31830b(0x234)](this['_graphic2']));}[_0x5df9ba(0x222)](_0x285c23){const _0x4afb33=_0x5df9ba;return _0x285c23!==null&&_0x285c23!==void 0x0&&_0x285c23['isFormat']&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this[_0x4afb33(0x231)]):this['_rectangle'];}['_getHeatCanvas'](){const _0x4e19c3=_0x5df9ba,_0x2ddebd=this[_0x4e19c3(0x1e4)],_0x289f38=[];let _0x522a4a,_0x255988,_0x599a93,_0x1fdd1b;_0x2ddebd[_0x4e19c3(0x22e)](_0x17d18b=>{const _0x4c2b47=_0x4e19c3,_0x38827d=mars3d__namespace[_0x4c2b47(0x24c)][_0x4c2b47(0x236)](_0x17d18b);if(!_0x38827d)return;_0x38827d[_0x4c2b47(0x218)]=_0x17d18b[_0x4c2b47(0x218)]||0x1,!this[_0x4c2b47(0x1f7)]['rectangle']&&(_0x522a4a===undefined?(_0x522a4a=_0x38827d[_0x4c2b47(0x232)],_0x255988=_0x38827d[_0x4c2b47(0x232)],_0x599a93=_0x38827d[_0x4c2b47(0x1e8)],_0x1fdd1b=_0x38827d[_0x4c2b47(0x1e8)]):(_0x522a4a=Math[_0x4c2b47(0x20e)](_0x522a4a,_0x38827d[_0x4c2b47(0x232)]),_0x255988=Math[_0x4c2b47(0x21c)](_0x255988,_0x38827d[_0x4c2b47(0x232)]),_0x599a93=Math['min'](_0x599a93,_0x38827d[_0x4c2b47(0x1e8)]),_0x1fdd1b=Math[_0x4c2b47(0x21c)](_0x1fdd1b,_0x38827d[_0x4c2b47(0x1e8)]))),_0x289f38[_0x4c2b47(0x23a)](_0x38827d);});let _0xde671d=this[_0x4e19c3(0x1f7)][_0x4e19c3(0x1f4)]||{'xmin':_0x522a4a,'xmax':_0x255988,'ymin':_0x599a93,'ymax':_0x1fdd1b};const _0x3fb70a=getMercatorBounds(_0xde671d),_0x246e8c=Math['abs'](_0x3fb70a[_0x4e19c3(0x230)]-_0x3fb70a[_0x4e19c3(0x233)]),_0x141ef0=Math[_0x4e19c3(0x22b)](_0x3fb70a[_0x4e19c3(0x211)]-_0x3fb70a['ymin']),_0x3ccb0f=Math[_0x4e19c3(0x21c)](_0x246e8c,_0x141ef0),_0x42eb47=Math[_0x4e19c3(0x20e)](_0x246e8c,_0x141ef0);this[_0x4e19c3(0x204)]=_0x3ccb0f;let _0x41a64c=0x1;if(_0x3ccb0f>this['options']['maxCanvasSize'])_0x41a64c=_0x3ccb0f/this[_0x4e19c3(0x1f7)][_0x4e19c3(0x254)],_0x42eb47/_0x41a64c<this[_0x4e19c3(0x1f7)][_0x4e19c3(0x1e7)]&&(_0x41a64c=_0x42eb47/this[_0x4e19c3(0x1f7)][_0x4e19c3(0x1e7)]);else _0x42eb47<this[_0x4e19c3(0x1f7)][_0x4e19c3(0x1e7)]&&(_0x41a64c=_0x42eb47/this[_0x4e19c3(0x1f7)][_0x4e19c3(0x1e7)],_0x3ccb0f/_0x41a64c>this[_0x4e19c3(0x1f7)]['maxCanvasSize']&&(_0x41a64c=_0x3ccb0f/this['options'][_0x4e19c3(0x254)]));const _0x220917=this['heatStyle'][_0x4e19c3(0x201)]*1.5,_0x357a1e=_0x246e8c/_0x41a64c+_0x220917*0x2,_0x22f9f1=_0x141ef0/_0x41a64c+_0x220917*0x2,_0x53a116=_0x220917*_0x41a64c;_0x3fb70a['xmin']-=_0x53a116,_0x3fb70a[_0x4e19c3(0x1f1)]-=_0x53a116,_0x3fb70a['xmax']+=_0x53a116,_0x3fb70a[_0x4e19c3(0x211)]+=_0x53a116,this[_0x4e19c3(0x22d)]=_0x41a64c,_0xde671d=geLatLngBounds(_0x3fb70a),this['_rectangle']=Cesium[_0x4e19c3(0x25e)]['fromDegrees'](_0xde671d[_0x4e19c3(0x233)],_0xde671d[_0x4e19c3(0x1f1)],_0xde671d[_0x4e19c3(0x230)],_0xde671d[_0x4e19c3(0x211)]);let _0x52a263=_0x289f38[0x0][_0x4e19c3(0x218)]??0x1,_0x24b7bf=_0x289f38[0x0]['value']??0x0;const _0x6f0bfe=[];_0x289f38['forEach'](_0x7c9fe9=>{const _0xee1474=_0x4e19c3,_0x18d2d5=mars3d__namespace[_0xee1474(0x25f)]['lonlat2mercator']([_0x7c9fe9[_0xee1474(0x232)],_0x7c9fe9[_0xee1474(0x1e8)]]),_0x27adcc=_0x7c9fe9[_0xee1474(0x218)]||0x1,_0x5d98d9=Math[_0xee1474(0x1f0)]((_0x18d2d5[0x0]-_0x3fb70a[_0xee1474(0x233)])/_0x41a64c),_0x2ca188=Math[_0xee1474(0x1f0)]((_0x3fb70a['ymax']-_0x18d2d5[0x1])/_0x41a64c);_0x52a263=Math[_0xee1474(0x21c)](_0x52a263,_0x27adcc),_0x24b7bf=Math[_0xee1474(0x20e)](_0x24b7bf,_0x27adcc),_0x6f0bfe[_0xee1474(0x23a)]({'x':_0x5d98d9,'y':_0x2ca188,'value':_0x27adcc});});const _0x172d74={'min':this[_0x4e19c3(0x1f7)][_0x4e19c3(0x20e)]??_0x24b7bf,'max':this[_0x4e19c3(0x1f7)][_0x4e19c3(0x21c)]??_0x52a263,'data':_0x6f0bfe};this[_0x4e19c3(0x21f)]=_0x172d74;(!this['_last_mBounds']||_0x3fb70a[_0x4e19c3(0x233)]!==this[_0x4e19c3(0x20f)][_0x4e19c3(0x233)]||_0x3fb70a[_0x4e19c3(0x1f1)]!==this[_0x4e19c3(0x20f)][_0x4e19c3(0x1f1)]||_0x3fb70a[_0x4e19c3(0x230)]!==this[_0x4e19c3(0x20f)][_0x4e19c3(0x230)]||_0x3fb70a['ymax']!==this[_0x4e19c3(0x20f)][_0x4e19c3(0x211)])&&(this[_0x4e19c3(0x20f)]=_0x3fb70a,!this['heatStyle'][_0x4e19c3(0x1fd)]&&(this[_0x4e19c3(0x23c)][_0x4e19c3(0x1fd)]=mars3d__namespace[_0x4e19c3(0x1e6)]['create'](_0x4e19c3(0x25b),_0x4e19c3(0x20a),this['_map'][_0x4e19c3(0x1fd)])),this[_0x4e19c3(0x23c)]['container'][_0x4e19c3(0x200)]['cssText']='width:'+_0x357a1e+_0x4e19c3(0x1e5)+_0x22f9f1+'px;',!this[_0x4e19c3(0x241)]?this[_0x4e19c3(0x241)]=h337__namespace[_0x4e19c3(0x253)](this[_0x4e19c3(0x23c)]):this['_heat']['configure'](this['heatStyle']));this[_0x4e19c3(0x241)][_0x4e19c3(0x227)](_0x172d74);const _0x12f34b=mars3d__namespace[_0x4e19c3(0x1e6)][_0x4e19c3(0x1ef)](this[_0x4e19c3(0x241)]['_renderer'][_0x4e19c3(0x256)]);return _0x12f34b;}[_0x5df9ba(0x1f5)](){const _0x1e6c36=_0x5df9ba;this[_0x1e6c36(0x241)]['configure']({'radius':this['heatStyle'][_0x1e6c36(0x201)]*this[_0x1e6c36(0x200)]['arcRadiusScale'],'blur':this[_0x1e6c36(0x23c)]['blur']*this[_0x1e6c36(0x200)][_0x1e6c36(0x238)],'gradient':this['heatStyle'][_0x1e6c36(0x20b)]||{0.25:_0x1e6c36(0x259),0.55:_0x1e6c36(0x243),0.85:_0x1e6c36(0x258),0x1:_0x1e6c36(0x1fe)}});const _0x4ae5a7=mars3d__namespace[_0x1e6c36(0x1e6)][_0x1e6c36(0x1ef)](this[_0x1e6c36(0x241)][_0x1e6c36(0x228)][_0x1e6c36(0x256)]);return this[_0x1e6c36(0x241)][_0x1e6c36(0x202)](this['options'][_0x1e6c36(0x23c)]),_0x4ae5a7;}[_0x5df9ba(0x24d)](_0x8e2e1f){const _0xef2208=_0x5df9ba,_0x13e4dc=mars3d__namespace[_0xef2208(0x24c)]['parse'](_0x8e2e1f);if(!_0x13e4dc)return{};const _0x3e3bce=mars3d__namespace[_0xef2208(0x25f)][_0xef2208(0x217)]([_0x13e4dc[_0xef2208(0x232)],_0x13e4dc[_0xef2208(0x1e8)]]),_0x503470=this['_last_mBounds'],_0x281fec=Math[_0xef2208(0x1f0)]((_0x3e3bce[0x0]-_0x503470[_0xef2208(0x233)])/this[_0xef2208(0x22d)]),_0x416a6c=Math[_0xef2208(0x1f0)]((_0x503470[_0xef2208(0x211)]-_0x3e3bce[0x1])/this[_0xef2208(0x22d)]),_0xdb9cb2=this[_0xef2208(0x241)][_0xef2208(0x21a)]({'x':_0x281fec,'y':_0x416a6c}),_0x43b0df=this[_0xef2208(0x241)]['_renderer'][_0xef2208(0x1f6)]['getImageData'](_0x281fec-0x1,_0x416a6c-0x1,0x1,0x1)[_0xef2208(0x242)];return{'x':_0x281fec,'y':_0x416a6c,'value':_0xdb9cb2,'color':_0xef2208(0x21b)+_0x43b0df[0x0]+','+_0x43b0df[0x1]+','+_0x43b0df[0x2]+','+_0x43b0df[0x3]+')'};}}mars3d__namespace[_0x5df9ba(0x1f3)][_0x5df9ba(0x216)]=HeatLayer,mars3d__namespace[_0x5df9ba(0x213)][_0x5df9ba(0x24a)](_0x5df9ba(0x220),HeatLayer);function getMercatorBounds(_0x25fad3){const _0x37d371=_0x5df9ba,_0x5ca455=mars3d__namespace[_0x37d371(0x25f)][_0x37d371(0x217)]([_0x25fad3['xmin'],_0x25fad3['ymin']]),_0xb8d320=mars3d__namespace['PointTrans'][_0x37d371(0x217)]([_0x25fad3[_0x37d371(0x230)],_0x25fad3['ymax']]);return{'xmin':_0x5ca455[0x0],'ymin':_0x5ca455[0x1],'xmax':_0xb8d320[0x0],'ymax':_0xb8d320[0x1]};}function geLatLngBounds(_0xe367e5){const _0x1b5945=_0x5df9ba,_0x1ee9f4=mars3d__namespace[_0x1b5945(0x25f)][_0x1b5945(0x209)]([_0xe367e5[_0x1b5945(0x233)],_0xe367e5[_0x1b5945(0x1f1)]]),_0x44d0fa=mars3d__namespace[_0x1b5945(0x25f)]['mercator2lonlat']([_0xe367e5['xmax'],_0xe367e5['ymax']]);return{'xmin':_0x1ee9f4[0x0],'ymin':_0x1ee9f4[0x1],'xmax':_0x44d0fa[0x0],'ymax':_0x44d0fa[0x1]};}function getVertexShaderSource(_0x3cbaf4){return'attribute\x20vec3\x20position3DHigh;\x0a\x20\x20attribute\x20vec3\x20position3DLow;\x0a\x20\x20attribute\x20vec2\x20st;\x0a\x20\x20attribute\x20float\x20batchId;\x0a\x20\x20uniform\x20sampler2D\x20bumpMap_3;\x0a\x20\x20varying\x20vec3\x20v_positionMC;\x0a\x20\x20varying\x20vec3\x20v_positionEC;\x0a\x20\x20varying\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=\x20texture2D(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'+_0x3cbaf4+';\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[_0x5df9ba(0x216)]=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.4.
|
|
3
|
+
"version": "3.4.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.4.
|
|
13
|
+
"mars3d": "~3.4.12"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|