Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mars3d-heatmap

Package Overview
Dependencies
Maintainers
1
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mars3d-heatmap - npm Package Compare versions

Comparing version 3.5.18 to 3.6.0

6

dist/mars3d-heatmap.js
/**
* Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap
*
* 版本信息:v3.5.18
* 编译日期:2023-07-31 17:54:18
* 版本信息:v3.6.0
* 编译日期:2023-08-04 12:18:40
* 版权所有:Copyright by 火星科技 http://mars3d.cn

@@ -14,3 +14,3 @@ * 使用单位:免费公开版 ,2023-03-17

})(this, (function (exports, mars3d, h337) {
'use strict';const _0x2ffe1a=_0x44d0;function _0x3a1e(){const _0x3f2cd1=['52788alAqSv','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','_setOptionsHook','ymin','mars3d-heatmap\x20mars3d-hideDiv','copyCanvas','lonlat2mercator','value','_mBoundsMax','length','show','lng','maxCanvasSize','134UGMDzr','175960WiprNA','REPLACE','_getArcHeatCanvas','red','_scale','rgb(255,255,255)','push','rgb(140,140,140)','lat','width','forEach','max','uniforms','abs','StencilOperation','heatStyle','graphic','EllipsoidSurfaceAppearance','clear','register','setPositions','points','default','_addedHook','addPosition','layer','ImageLayer','minCanvasSize','options','bumpMap','arcRadiusScale','getOwnPropertyDescriptor','arcDirection','1067WKtMgk','mercator2lonlat','4615135wGGJCr','_graphic','RenderState','addGraphic','RectanglePrimitive','_heat','_positions','KEEP','3792768YjofKK','toDataURL','_updatePositionsHook','image','canvas','_removedHook','granularity','positions','min','105DBaNtm','VERTEX_FORMAT','_layer','ymax','style','blur','xmax','xmin','flyToByAnimationEnd','_last_mBounds','18pTibyz','请引入\x20heatmap.js\x20库\x20','_getHeatCanvas','isFormat','px;height:','PointTrans','getPointData','_graphic2','6SZdYWK','flyTo','radius','4982930ILAYZd','blue','2059592FlCRYf','DomUtil','ALWAYS','_createArcGraphic','_rectangle','LayerUtil','22549GsPwjo'];_0x3a1e=function(){return _0x3f2cd1;};return _0x3a1e();}(function(_0x45e7fd,_0x1aee7e){const _0xdbde67={_0x195476:0xe8,_0x87d7de:0xf7,_0x25feac:0x13d,_0x50bb8b:0x122,_0x304c29:0x142,_0x590fb7:0x140,_0x330084:0x118},_0x17d1f5=_0x44d0,_0x374e7f=_0x45e7fd();while(!![]){try{const _0x4d22a6=-parseInt(_0x17d1f5(_0xdbde67._0x195476))/0x1*(parseInt(_0x17d1f5(0xf6))/0x2)+parseInt(_0x17d1f5(0x12b))/0x3*(parseInt(_0x17d1f5(_0xdbde67._0x87d7de))/0x4)+-parseInt(_0x17d1f5(0x11a))/0x5*(-parseInt(_0x17d1f5(_0xdbde67._0x25feac))/0x6)+-parseInt(_0x17d1f5(_0xdbde67._0x50bb8b))/0x7+-parseInt(_0x17d1f5(_0xdbde67._0x304c29))/0x8*(parseInt(_0x17d1f5(0x135))/0x9)+parseInt(_0x17d1f5(_0xdbde67._0x590fb7))/0xa+parseInt(_0x17d1f5(_0xdbde67._0x330084))/0xb*(parseInt(_0x17d1f5(0xe9))/0xc);if(_0x4d22a6===_0x1aee7e)break;else _0x374e7f['push'](_0x374e7f['shift']());}catch(_0x2a85fb){_0x374e7f['push'](_0x374e7f['shift']());}}}(_0x3a1e,0xc83c8));function _interopNamespace(_0x2dd22a){const _0x1748a8={_0x4d5c3a:0x10d},_0x7dd4c4={_0x3d6181:0x116},_0x36ec96=_0x44d0;if(_0x2dd22a&&_0x2dd22a['__esModule'])return _0x2dd22a;var _0x503a5a=Object['create'](null);return _0x2dd22a&&Object['keys'](_0x2dd22a)[_0x36ec96(0x101)](function(_0x4f3f6e){const _0x5ac840=_0x36ec96;if(_0x4f3f6e!==_0x5ac840(0x10d)){var _0x40706d=Object[_0x5ac840(_0x7dd4c4._0x3d6181)](_0x2dd22a,_0x4f3f6e);Object['defineProperty'](_0x503a5a,_0x4f3f6e,_0x40706d['get']?_0x40706d:{'enumerable':!![],'get':function(){return _0x2dd22a[_0x4f3f6e];}});}}),_0x503a5a[_0x36ec96(_0x1748a8._0x4d5c3a)]=_0x2dd22a,_0x503a5a;}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(_0x2ffe1a(0x136));const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x2ffe1a(0x110)]['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:_0x2ffe1a(0x141),0.6:'green',0.8:'yellow',0.9:_0x2ffe1a(0xfa)}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium[_0x2ffe1a(0x108)][_0x2ffe1a(0x12c)]};class HeatLayer extends BaseLayer{constructor(_0x5d4677={}){const _0xf79ef={_0x4b56ee:0x113,_0x4328f0:0x112,_0x1a686c:0x12f},_0x58217b=_0x2ffe1a;super(_0x5d4677),this['options']['maxCanvasSize']=this['options']['maxCanvasSize']??document['body']['clientWidth'],this['options']['maxCanvasSize']=Math['min'](this['options']['maxCanvasSize'],0x1388),this[_0x58217b(0x113)]['minCanvasSize']=this['options']['minCanvasSize']??document['body']['clientHeight'],this[_0x58217b(_0xf79ef._0x4b56ee)]['minCanvasSize']=Math['max'](this['options'][_0x58217b(_0xf79ef._0x4328f0)],0x2bc),this['options']['heatStyle']={...DEF_HEATSTYLE,...this['options'][_0x58217b(0x106)]},this['options'][_0x58217b(_0xf79ef._0x1a686c)]={...DEF_STYLE,...this['options']['style']};}get[_0x2ffe1a(0x110)](){return this['_layer'];}get['heatStyle'](){const _0x1ab069=_0x2ffe1a;return this['options'][_0x1ab069(0x106)];}set['heatStyle'](_0xb7716a){const _0x2483d4={_0x5497a1:0x113,_0x5ddd4b:0x11f},_0x5a0c0a=_0x2ffe1a;this[_0x5a0c0a(0x113)]['heatStyle']=mars3d__namespace['Util']['merge'](this[_0x5a0c0a(_0x2483d4._0x5497a1)]['heatStyle'],_0xb7716a),this[_0x5a0c0a(_0x2483d4._0x5ddd4b)]&&(this['_heat']['configure'](this['options']['heatStyle']),this[_0x5a0c0a(0x124)](!![]));}get['style'](){return this['options']['style'];}set['style'](_0x1f37b0){const _0x47f5f4=_0x2ffe1a;this[_0x47f5f4(0x113)]['style']=mars3d__namespace['Util']['merge'](this['options'][_0x47f5f4(0x12f)],_0x1f37b0);}get['positions'](){const _0x523d95=_0x2ffe1a;return this[_0x523d95(0x120)];}set[_0x2ffe1a(0x129)](_0x14d8c9){this['setPositions'](_0x14d8c9);}get['coordinates'](){const _0x506e38={_0x44a69a:0x10c},_0x5d1368={_0x39d0be:0xfd},_0x339f2e=_0x2ffe1a,_0x10cfa6=[];return this[_0x339f2e(_0x506e38._0x44a69a)]['forEach'](_0x479dd5=>{const _0x5effe3=_0x339f2e;_0x10cfa6[_0x5effe3(_0x5d1368._0x39d0be)](_0x479dd5['toArray']());}),_0x10cfa6;}get['rectangle'](){const _0x2db6b2=_0x2ffe1a;return this[_0x2db6b2(0xe6)];}[_0x2ffe1a(0xeb)](_0xa2af0c,_0x402849){_0xa2af0c['positions']&&(this['positions']=_0xa2af0c['positions']);}['_mountedHook'](){const _0x3cda43={_0x288595:0x111},_0x75e59=_0x2ffe1a;this['style']['type']==='image'?this['_layer']=new mars3d__namespace['layer'][(_0x75e59(_0x3cda43._0x288595))]({'crs':'EPSG:3857','private':!![]}):this['_layer']=new mars3d__namespace[(_0x75e59(0x110))]['GraphicLayer']({'private':!![]});}[_0x2ffe1a(0x10e)](){const _0x22d324={_0x302f70:0xe3,_0x82c0be:0xed,_0x5352c8:0x129,_0x1aef73:0x129,_0xf8d483:0x13e},_0x46faa5=_0x2ffe1a;this['_map']['addLayer'](this['_layer']),this['_container']=mars3d__namespace[_0x46faa5(_0x22d324._0x302f70)]['create']('div',_0x46faa5(_0x22d324._0x82c0be),this['_map']['container']),this['options'][_0x46faa5(_0x22d324._0x5352c8)]&&(this[_0x46faa5(_0x22d324._0x1aef73)]=this[_0x46faa5(0x113)]['positions']),this['options'][_0x46faa5(_0x22d324._0xf8d483)]&&this[_0x46faa5(0x133)]();}[_0x2ffe1a(0x127)](){const _0x5a188d=_0x2ffe1a;this['_container']&&(mars3d__namespace['DomUtil']['remove'](this['_container']),delete this['_container']),this['clear'](),this['_map']['removeLayer'](this[_0x5a188d(0x12d)]);}[_0x2ffe1a(0x10f)](_0x3245a3,_0x41e791){const _0x538a54=_0x2ffe1a;this['_positions']=this['_positions']||[],this['_positions'][_0x538a54(0xfd)](_0x3245a3),this['_updatePositionsHook'](_0x41e791);}[_0x2ffe1a(0x10b)](_0x1900bf,_0x34b12d){this['_positions']=_0x1900bf,this['_updatePositionsHook'](_0x34b12d);}['clear'](){const _0x3b7aae=_0x2ffe1a;this['_graphic']&&(this['_layer']['removeGraphic'](this['_graphic'],!![]),delete this['_graphic']),this['_graphic2']&&(this[_0x3b7aae(0x12d)]['removeGraphic'](this[_0x3b7aae(0x13c)],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x10f963){const _0x3eeb2f={_0xb1c3fa:0xf2,_0x4e5434:0x103,_0x625e5d:0x11b,_0x2ccb01:0x114,_0x5a01cf:0xe5},_0x5da669=_0x2ffe1a;if(!this[_0x5da669(0xf3)]||!this['_map']||!this['positions']||this['positions'][_0x5da669(_0x3eeb2f._0xb1c3fa)]===0x0)return this;const _0x50e803=this[_0x5da669(0x137)]();if(this['style']['type']==='image')this['_layer']['setOptions']({'url':_0x50e803[_0x5da669(0x123)]('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style']['arc']?this['_graphic']&&_0x10f963?(this[_0x5da669(0x11b)][_0x5da669(_0x3eeb2f._0x4e5434)]['image']=_0x50e803,this['_graphic']['uniforms']['bumpMap']=this[_0x5da669(0xf9)](),this['_graphic2']&&(this['_graphic2'][_0x5da669(0x103)]['image']=_0x50e803,this['_graphic2'][_0x5da669(0x103)]['bumpMap']=this[_0x5da669(_0x3eeb2f._0x625e5d)]['uniforms'][_0x5da669(_0x3eeb2f._0x2ccb01)])):this[_0x5da669(_0x3eeb2f._0x5a01cf)](_0x50e803):this['_graphic']&&_0x10f963?this['_graphic']['uniforms'][_0x5da669(0x125)]=_0x50e803:this['_createGraphic'](_0x50e803);return this;}['_createGraphic'](_0x3abba5){const _0x545e6c={_0x44d5bf:0x11b,_0x5efac6:0x107},_0x5409ce=_0x2ffe1a;this['clear'](),this[_0x5409ce(_0x545e6c._0x44d5bf)]=new mars3d__namespace[(_0x5409ce(_0x545e6c._0x5efac6))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x3abba5},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x5409ce(0x12d)]['addGraphic'](this[_0x5409ce(0x11b)]);}[_0x2ffe1a(0xe5)](_0x21bd66){const _0x578179={_0x25f168:0xe4,_0xbd3789:0xf8,_0x424cb4:0x128,_0x3e8c83:0x107},_0x1ec919=_0x2ffe1a;this[_0x1ec919(0x109)]();const _0x106a82=Cesium[_0x1ec919(0x11c)]['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction'][_0x1ec919(_0x578179._0x25f168)],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation'][_0x1ec919(0x121)],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0x1ec919(0x105)]['KEEP'],'zPass':Cesium[_0x1ec919(0x105)][_0x1ec919(_0x578179._0xbd3789)]},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x422d33=Math['floor'](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style']['diffHeight']&&delete this['style']['diffHeight'];const _0x3851e3=(this[_0x1ec919(0x12f)]['splitNum'],0x64);let _0x463671=Math['max'](this['_rectangle']['height'],this['_rectangle'][_0x1ec919(0x100)]);this[_0x1ec919(0x12f)][_0x1ec919(_0x578179._0x424cb4)]=_0x463671/=_0x3851e3;const _0x5b8020=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x21bd66,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this[_0x1ec919(0xf9)]()},'source':HeatMaterial},'translucent':!![]}),_0x74fdea=this['style']['arcDirection']||0x1;this[_0x1ec919(0x11b)]=new mars3d__namespace[(_0x1ec919(_0x578179._0x3e8c83))][(_0x1ec919(0x11e))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x106a82,'material':_0x5b8020,'vertexShaderSource':getVertexShaderSource(_0x422d33*_0x74fdea)})}),this['_layer']['addGraphic'](this[_0x1ec919(0x11b)]),this['style'][_0x1ec919(0x117)]===0x0&&(this[_0x1ec919(0x13c)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x1ec919(0xe6)],'appearance':new Cesium[(_0x1ec919(0x108))]({'flat':!![],'aboveGround':!![],'renderState':_0x106a82,'material':_0x5b8020,'vertexShaderSource':getVertexShaderSource(-_0x422d33)})}),this['_layer'][_0x1ec919(0x11d)](this['_graphic2']));}['getRectangle'](_0x5dbd3b){const _0x218ab3=_0x2ffe1a;return _0x5dbd3b!==null&&_0x5dbd3b!==void 0x0&&_0x5dbd3b[_0x218ab3(0x138)]&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this['_rectangle']):this[_0x218ab3(0xe6)];}['_getHeatCanvas'](){const _0x528ea2={_0x5e1f08:0x113,_0x1842d7:0x131,_0x3526fe:0x104,_0x19cf60:0x102,_0x26ef62:0xf5,_0x823823:0x112,_0x5e272d:0x13f,_0x393f9d:0xe6,_0x4f1331:0x113,_0x3746d6:0x132,_0x55784d:0x131,_0x3675f4:0x134,_0x17f30f:0x134,_0xe731e0:0x11f},_0x27f801={_0x3849a1:0xf0},_0x1d3b4e={_0xdcd852:0xff,_0x4a2a19:0xf4,_0xc4d1c2:0x12a},_0x4243cb=_0x2ffe1a,_0x25f968=this['_positions'],_0x21fb3d=[];let _0x5b91ab,_0x55f592,_0x189341,_0x12ae0f;_0x25f968['forEach'](_0x197c32=>{const _0x270741=_0x44d0,_0x3bebfe=mars3d__namespace['LngLatPoint']['parse'](_0x197c32);if(!_0x3bebfe)return;_0x3bebfe['value']=_0x197c32['value']||0x1,!this['options']['rectangle']&&(_0x5b91ab===undefined?(_0x5b91ab=_0x3bebfe['lng'],_0x55f592=_0x3bebfe['lng'],_0x189341=_0x3bebfe['lat'],_0x12ae0f=_0x3bebfe[_0x270741(_0x1d3b4e._0xdcd852)]):(_0x5b91ab=Math[_0x270741(0x12a)](_0x5b91ab,_0x3bebfe[_0x270741(_0x1d3b4e._0x4a2a19)]),_0x55f592=Math['max'](_0x55f592,_0x3bebfe['lng']),_0x189341=Math[_0x270741(_0x1d3b4e._0xc4d1c2)](_0x189341,_0x3bebfe['lat']),_0x12ae0f=Math['max'](_0x12ae0f,_0x3bebfe[_0x270741(_0x1d3b4e._0xdcd852)]))),_0x21fb3d['push'](_0x3bebfe);});_0x5b91ab===_0x55f592&&(_0x5b91ab-=0.000001,_0x55f592+=0.000001);_0x189341===_0x12ae0f&&(_0x189341-=0.000001,_0x12ae0f+=0.000001);let _0x20c3a0=this[_0x4243cb(_0x528ea2._0x5e1f08)]['rectangle']||{'xmin':_0x5b91ab,'xmax':_0x55f592,'ymin':_0x189341,'ymax':_0x12ae0f};const _0x1ac722=getMercatorBounds(_0x20c3a0),_0x5a7922=Math['abs'](_0x1ac722[_0x4243cb(_0x528ea2._0x1842d7)]-_0x1ac722['xmin']),_0x4bc8fd=Math[_0x4243cb(_0x528ea2._0x3526fe)](_0x1ac722['ymax']-_0x1ac722['ymin']),_0x49528c=Math[_0x4243cb(_0x528ea2._0x19cf60)](_0x5a7922,_0x4bc8fd),_0x7df19e=Math[_0x4243cb(0x12a)](_0x5a7922,_0x4bc8fd);this[_0x4243cb(0xf1)]=_0x49528c;let _0xc015a=0x1;if(_0x49528c>this['options']['maxCanvasSize'])_0xc015a=_0x49528c/this['options'][_0x4243cb(_0x528ea2._0x26ef62)],_0x7df19e/_0xc015a<this['options']['minCanvasSize']&&(_0xc015a=_0x7df19e/this['options'][_0x4243cb(_0x528ea2._0x823823)]);else _0x7df19e<this['options']['minCanvasSize']&&(_0xc015a=_0x7df19e/this[_0x4243cb(_0x528ea2._0x5e1f08)][_0x4243cb(0x112)],_0x49528c/_0xc015a>this[_0x4243cb(0x113)]['maxCanvasSize']&&(_0xc015a=_0x49528c/this['options']['maxCanvasSize']));const _0x5b51eb=this['heatStyle'][_0x4243cb(_0x528ea2._0x5e272d)]*1.5,_0x1eb5de=_0x5a7922/_0xc015a+_0x5b51eb*0x2,_0x4e9b0b=_0x4bc8fd/_0xc015a+_0x5b51eb*0x2,_0x9c34be=_0x5b51eb*_0xc015a;_0x1ac722['xmin']-=_0x9c34be,_0x1ac722['ymin']-=_0x9c34be,_0x1ac722['xmax']+=_0x9c34be,_0x1ac722['ymax']+=_0x9c34be,this[_0x4243cb(0xfb)]=_0xc015a,_0x20c3a0=geLatLngBounds(_0x1ac722),this[_0x4243cb(_0x528ea2._0x393f9d)]=Cesium['Rectangle']['fromDegrees'](_0x20c3a0['xmin'],_0x20c3a0[_0x4243cb(0xec)],_0x20c3a0['xmax'],_0x20c3a0['ymax']);let _0x4e226d=_0x21fb3d[0x0]['value']??0x1,_0xbac319=_0x21fb3d[0x0]['value']??0x0;const _0x1c63f9=[];_0x21fb3d['forEach'](_0x1833b6=>{const _0x31079a=_0x4243cb,_0x5de2cf=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x1833b6[_0x31079a(0xf4)],_0x1833b6[_0x31079a(0xff)]]),_0x19f7b0=_0x1833b6[_0x31079a(_0x27f801._0x3849a1)]||0x1,_0x3425f7=Math['round']((_0x5de2cf[0x0]-_0x1ac722['xmin'])/_0xc015a),_0x421b14=Math['round']((_0x1ac722['ymax']-_0x5de2cf[0x1])/_0xc015a);_0x4e226d=Math['max'](_0x4e226d,_0x19f7b0),_0xbac319=Math['min'](_0xbac319,_0x19f7b0),_0x1c63f9['push']({'x':_0x3425f7,'y':_0x421b14,'value':_0x19f7b0});});const _0x32f3aa={'min':this[_0x4243cb(_0x528ea2._0x4f1331)]['min']??_0xbac319,'max':this['options']['max']??_0x4e226d,'data':_0x1c63f9};this['_last_heatData']=_0x32f3aa;if(!this['_last_mBounds']||_0x1ac722['xmin']!==this['_last_mBounds'][_0x4243cb(_0x528ea2._0x3746d6)]||_0x1ac722['ymin']!==this['_last_mBounds']['ymin']||_0x1ac722[_0x4243cb(_0x528ea2._0x55784d)]!==this['_last_mBounds']['xmax']||_0x1ac722[_0x4243cb(0x12e)]!==this[_0x4243cb(_0x528ea2._0x3675f4)]['ymax']){this[_0x4243cb(_0x528ea2._0x17f30f)]=_0x1ac722,this['_container']['style']['cssText']='width:'+_0x1eb5de+_0x4243cb(0x139)+_0x4e9b0b+'px;';const _0x2f70d6={...this['heatStyle'],'container':this['_container']};!this[_0x4243cb(0x11f)]?this[_0x4243cb(_0x528ea2._0xe731e0)]=h337__namespace['create'](_0x2f70d6):this['_heat']['configure'](_0x2f70d6);}this['_heat']['setData'](_0x32f3aa);const _0x33adb6=mars3d__namespace['DomUtil'][_0x4243cb(0xee)](this[_0x4243cb(0x11f)]['_renderer'][_0x4243cb(0x126)]);return _0x33adb6;}['_getArcHeatCanvas'](){const _0xd7229d={_0x3eef55:0x106,_0x32146f:0x106},_0x5486d3=_0x2ffe1a;this['_heat']['configure']({'radius':this['heatStyle']['radius']*this['style'][_0x5486d3(0x115)],'blur':this[_0x5486d3(_0xd7229d._0x3eef55)][_0x5486d3(0x130)]*this['style']['arcBlurScale'],'gradient':this[_0x5486d3(0x106)]['gradientArc']||{0.25:'rgb(0,0,0)',0.55:_0x5486d3(0xfe),0.85:'rgb(216,216,216)',0x1:_0x5486d3(0xfc)}});const _0x14b2db=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer'][_0x5486d3(0x126)]);return this['_heat']['configure'](this[_0x5486d3(0x113)][_0x5486d3(_0xd7229d._0x32146f)]),_0x14b2db;}[_0x2ffe1a(0x13b)](_0x2568f8){const _0x364182={_0x3ce0b1:0x12e,_0x4a00c2:0xfb},_0x59e184=_0x2ffe1a,_0x103dca=mars3d__namespace['LngLatPoint']['parse'](_0x2568f8);if(!_0x103dca)return{};const _0x5539e0=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x103dca['lng'],_0x103dca[_0x59e184(0xff)]]),_0x406a15=this['_last_mBounds'],_0x5743cb=Math['round']((_0x5539e0[0x0]-_0x406a15['xmin'])/this['_scale']),_0xaceba4=Math['round']((_0x406a15[_0x59e184(_0x364182._0x3ce0b1)]-_0x5539e0[0x1])/this[_0x59e184(_0x364182._0x4a00c2)]),_0x23ea87=this['_heat']['getValueAt']({'x':_0x5743cb,'y':_0xaceba4}),_0x9b27b5=this['_heat']['_renderer']['ctx']['getImageData'](_0x5743cb-0x1,_0xaceba4-0x1,0x1,0x1)['data'];return{'x':_0x5743cb,'y':_0xaceba4,'value':_0x23ea87,'color':'rgba('+_0x9b27b5[0x0]+','+_0x9b27b5[0x1]+','+_0x9b27b5[0x2]+','+_0x9b27b5[0x3]+')'};}}mars3d__namespace[_0x2ffe1a(0xe7)][_0x2ffe1a(0x10a)]('heat',HeatLayer),mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x19b721){const _0x3b6546={_0x5c1c2e:0xec,_0x51a289:0xef},_0x7c25c8=_0x2ffe1a,_0x27ebbf=mars3d__namespace[_0x7c25c8(0x13a)]['lonlat2mercator']([_0x19b721[_0x7c25c8(0x132)],_0x19b721[_0x7c25c8(_0x3b6546._0x5c1c2e)]]),_0x3fac44=mars3d__namespace['PointTrans'][_0x7c25c8(_0x3b6546._0x51a289)]([_0x19b721['xmax'],_0x19b721['ymax']]);return{'xmin':_0x27ebbf[0x0],'ymin':_0x27ebbf[0x1],'xmax':_0x3fac44[0x0],'ymax':_0x3fac44[0x1]};}function _0x44d0(_0x5a02dd,_0x9d44d6){const _0x3a1e60=_0x3a1e();return _0x44d0=function(_0x44d03e,_0x2966a2){_0x44d03e=_0x44d03e-0xe3;let _0x3d7ed7=_0x3a1e60[_0x44d03e];return _0x3d7ed7;},_0x44d0(_0x5a02dd,_0x9d44d6);}function geLatLngBounds(_0x19a54e){const _0x1b361d={_0xb43efc:0x13a,_0x16bf04:0x119},_0x333048=_0x2ffe1a,_0x1a7d46=mars3d__namespace[_0x333048(_0x1b361d._0xb43efc)]['mercator2lonlat']([_0x19a54e[_0x333048(0x132)],_0x19a54e[_0x333048(0xec)]]),_0x26b85e=mars3d__namespace[_0x333048(_0x1b361d._0xb43efc)][_0x333048(_0x1b361d._0x16bf04)]([_0x19a54e['xmax'],_0x19a54e['ymax']]);return{'xmin':_0x1a7d46[0x0],'ymin':_0x1a7d46[0x1],'xmax':_0x26b85e[0x0],'ymax':_0x26b85e[0x1]};}function getVertexShaderSource(_0x345ccb){const _0x24b660={_0x3bc3e7:0xea},_0x229343=_0x2ffe1a;return _0x229343(_0x24b660._0x3bc3e7)+_0x345ccb+';\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':!![]});
'use strict';const _0x169532=_0x4443;(function(_0x236169,_0x3aff11){const _0x1a3e8d={_0x505495:0xeb,_0x33a292:0x120,_0x36ba90:0x101,_0xb4976c:0x134,_0x53faf1:0xee,_0x10ba32:0x117,_0x52a1f1:0xfb},_0x1d6dbc=_0x4443,_0x51ee72=_0x236169();while(!![]){try{const _0x4883ac=-parseInt(_0x1d6dbc(_0x1a3e8d._0x505495))/0x1*(parseInt(_0x1d6dbc(0xf2))/0x2)+-parseInt(_0x1d6dbc(_0x1a3e8d._0x33a292))/0x3*(-parseInt(_0x1d6dbc(_0x1a3e8d._0x36ba90))/0x4)+parseInt(_0x1d6dbc(_0x1a3e8d._0xb4976c))/0x5*(-parseInt(_0x1d6dbc(0x12c))/0x6)+parseInt(_0x1d6dbc(0x123))/0x7*(parseInt(_0x1d6dbc(_0x1a3e8d._0x53faf1))/0x8)+-parseInt(_0x1d6dbc(_0x1a3e8d._0x10ba32))/0x9+parseInt(_0x1d6dbc(_0x1a3e8d._0x52a1f1))/0xa+-parseInt(_0x1d6dbc(0xf5))/0xb;if(_0x4883ac===_0x3aff11)break;else _0x51ee72['push'](_0x51ee72['shift']());}catch(_0x27c675){_0x51ee72['push'](_0x51ee72['shift']());}}}(_0x4cd4,0xd2df1));function _0x4cd4(){const _0x199796=['4593UiemnQ','max','style','800XvGeGF','_layer','options','minCanvasSize','170CAOkGq','rgb(0,0,0)','xmin','789910LGJPHu','diffHeight','_graphic','addGraphic','LayerUtil','min','8242730Qtckqy','positions','canvas','_heat','_graphic2','body','870380PNSzoT','BlendingState','rgb(216,216,216)','getRectangle','forEach','RenderState','clear','_createGraphic','lng','mercator2lonlat','PointTrans','ymin','LngLatPoint','lonlat2mercator','StencilOperation','heatStyle','_mountedHook','floor','RectanglePrimitive','PolyUtil','_scale','fromDegrees','3501630tyAIPR','Cesium','rgb(255,255,255)','_renderer','cssText','maxCanvasSize','__esModule','image','_getHeatCanvas','6RMCZgS','formatRectangle','remove','84091xfnbca','graphic','show','StencilFunction','_setOptionsHook','create','bumpMap','isFormat','ALWAYS','2214GyAVYK','_mBoundsMax','toDataURL','copyCanvas','configure','default','getValueAt','type','10105msJGJq','_positions','_rectangle','uniforms','round','heat','EllipsoidSurfaceAppearance','value','lat','px;','ymax','KEEP','length','push'];_0x4cd4=function(){return _0x199796;};return _0x4cd4();}function _interopNamespace(_0x3da217){const _0x3c95c6={_0x4886c4:0x131},_0x20134c={_0x450270:0x131},_0x29792b=_0x4443;if(_0x3da217&&_0x3da217['__esModule'])return _0x3da217;var _0x17d9b2=Object['create'](null);return _0x3da217&&Object['keys'](_0x3da217)['forEach'](function(_0x2bcae6){const _0x11e06d=_0x4443;if(_0x2bcae6!==_0x11e06d(_0x20134c._0x450270)){var _0x154662=Object['getOwnPropertyDescriptor'](_0x3da217,_0x2bcae6);Object['defineProperty'](_0x17d9b2,_0x2bcae6,_0x154662['get']?_0x154662:{'enumerable':!![],'get':function(){return _0x3da217[_0x2bcae6];}});}}),_0x17d9b2[_0x29792b(_0x3c95c6._0x4886c4)]=_0x3da217,_0x17d9b2;}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[_0x169532(0x118)],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(_0x2923ea={}){const _0x5a3aef={_0x32cdb1:0xf0,_0x262789:0x110,_0x4f9a42:0xf0},_0x392d8e=_0x169532;super(_0x2923ea),this[_0x392d8e(0xf0)]['maxCanvasSize']=this[_0x392d8e(_0x5a3aef._0x32cdb1)]['maxCanvasSize']??document[_0x392d8e(0x100)]['clientWidth'],this['options']['maxCanvasSize']=Math['min'](this['options']['maxCanvasSize'],0x1388),this[_0x392d8e(0xf0)]['minCanvasSize']=this['options'][_0x392d8e(0xf1)]??document['body']['clientHeight'],this['options']['minCanvasSize']=Math['max'](this['options']['minCanvasSize'],0x2bc),this['options'][_0x392d8e(_0x5a3aef._0x262789)]={...DEF_HEATSTYLE,...this[_0x392d8e(_0x5a3aef._0x4f9a42)]['heatStyle']},this['options']['style']={...DEF_STYLE,...this[_0x392d8e(0xf0)]['style']};}get['layer'](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set['heatStyle'](_0x3bc5f5){const _0x1419fc={_0x5e71b9:0x110},_0x1d01dd=_0x169532;this[_0x1d01dd(0xf0)]['heatStyle']=mars3d__namespace['Util']['merge'](this['options']['heatStyle'],_0x3bc5f5),this['_heat']&&(this['_heat']['configure'](this['options'][_0x1d01dd(_0x1419fc._0x5e71b9)]),this['_updatePositionsHook'](!![]));}get['style'](){const _0x3dd41b=_0x169532;return this[_0x3dd41b(0xf0)]['style'];}set['style'](_0x5de1c2){this['options']['style']=mars3d__namespace['Util']['merge'](this['options']['style'],_0x5de1c2);}get['positions'](){return this['_positions'];}set[_0x169532(0xfc)](_0x37bfa3){this['setPositions'](_0x37bfa3);}get['coordinates'](){const _0x326ce5=_0x169532,_0x34865b=[];return this['points'][_0x326ce5(0x105)](_0x26408e=>{const _0x51a149=_0x326ce5;_0x34865b[_0x51a149(0xea)](_0x26408e['toArray']());}),_0x34865b;}get['rectangle'](){const _0x2ec73e=_0x169532;return this[_0x2ec73e(0x136)];}[_0x169532(0x127)](_0x983feb,_0x5ddcc2){const _0x208b95=_0x169532;_0x983feb['positions']&&(this['positions']=_0x983feb[_0x208b95(0xfc)]);}[_0x169532(0x111)](){const _0x2a43df=_0x169532;this['style']['type']===_0x2a43df(0x11e)?this['_layer']=new mars3d__namespace['layer']['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this['_layer']=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}['_addedHook'](){const _0xb36ea5={_0x457bd0:0xfc,_0x52b234:0xf0},_0x29d06e=_0x169532;this['_map']['addLayer'](this['_layer']),this['_container']=mars3d__namespace['DomUtil'][_0x29d06e(0x128)]('div','mars3d-heatmap\x20mars3d-hideDiv',this['_map']['container']),this[_0x29d06e(0xf0)][_0x29d06e(_0xb36ea5._0x457bd0)]&&(this['positions']=this[_0x29d06e(_0xb36ea5._0x52b234)]['positions']),this[_0x29d06e(_0xb36ea5._0x52b234)]['flyTo']&&this['flyToByAnimationEnd']();}['_removedHook'](){const _0x4ddb5d=_0x169532;this['_container']&&(mars3d__namespace['DomUtil'][_0x4ddb5d(0x122)](this['_container']),delete this['_container']),this[_0x4ddb5d(0x107)](),this['_map']['removeLayer'](this['_layer']);}['addPosition'](_0x462a4b,_0x9a0191){const _0x2be8b9={_0x4227cc:0x135},_0x7273a9=_0x169532;this[_0x7273a9(_0x2be8b9._0x4227cc)]=this['_positions']||[],this['_positions']['push'](_0x462a4b),this['_updatePositionsHook'](_0x9a0191);}['setPositions'](_0x32cd49,_0x3fee65){this['_positions']=_0x32cd49,this['_updatePositionsHook'](_0x3fee65);}['clear'](){const _0x41b338={_0x40610f:0xf7},_0xf3c998=_0x169532;this[_0xf3c998(0xf7)]&&(this['_layer']['removeGraphic'](this[_0xf3c998(_0x41b338._0x40610f)],!![]),delete this['_graphic']),this['_graphic2']&&(this['_layer']['removeGraphic'](this['_graphic2'],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x278693){const _0x458633={_0x1ce24c:0xfc,_0x42f73e:0xe9,_0x380078:0x133,_0x1c3821:0x11e,_0x37a834:0x12e,_0xdbbf45:0x129,_0x3a08ec:0xf7},_0x42c4ab=_0x169532;if(!this[_0x42c4ab(0x125)]||!this['_map']||!this['positions']||this[_0x42c4ab(_0x458633._0x1ce24c)][_0x42c4ab(_0x458633._0x42f73e)]===0x0)return this;const _0x3b0242=this[_0x42c4ab(0x11f)]();if(this[_0x42c4ab(0xed)][_0x42c4ab(_0x458633._0x380078)]===_0x42c4ab(_0x458633._0x1c3821))this['_layer']['setOptions']({'url':_0x3b0242[_0x42c4ab(_0x458633._0x37a834)]('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style']['arc']?this['_graphic']&&_0x278693?(this['_graphic']['uniforms']['image']=_0x3b0242,this[_0x42c4ab(0xf7)]['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x3b0242,this['_graphic2']['uniforms'][_0x42c4ab(_0x458633._0xdbbf45)]=this['_graphic'][_0x42c4ab(0x137)]['bumpMap'])):this['_createArcGraphic'](_0x3b0242):this[_0x42c4ab(_0x458633._0x3a08ec)]&&_0x278693?this[_0x42c4ab(0xf7)]['uniforms']['image']=_0x3b0242:this[_0x42c4ab(0x108)](_0x3b0242);return this;}['_createGraphic'](_0x4fc9b4){const _0x339f7c={_0x3ab513:0xf7},_0x2ca7e9=_0x169532;this['clear'](),this[_0x2ca7e9(_0x339f7c._0x3ab513)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x4fc9b4},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x2ca7e9(0xef)][_0x2ca7e9(0xf8)](this[_0x2ca7e9(0xf7)]);}['_createArcGraphic'](_0x3073c1){const _0x1cf604={_0x25cf1f:0x107,_0x2202a6:0x126,_0x649f04:0x12b,_0x3c139f:0xe8,_0xa6c605:0x102,_0x5efea8:0x112,_0x31aa98:0x136,_0x49befb:0xf0,_0x54c2b1:0x113,_0x52ce65:0xe3,_0x275fe7:0xff},_0x2ac55a=_0x169532;this[_0x2ac55a(_0x1cf604._0x25cf1f)]();const _0x51e87a=Cesium[_0x2ac55a(0x106)]['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium[_0x2ac55a(_0x1cf604._0x2202a6)][_0x2ac55a(_0x1cf604._0x649f04)],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation'][_0x2ac55a(_0x1cf604._0x3c139f)],'zPass':Cesium[_0x2ac55a(0x10f)]['REPLACE']},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium[_0x2ac55a(0x10f)][_0x2ac55a(0xe8)],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium[_0x2ac55a(0x10f)]['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium[_0x2ac55a(_0x1cf604._0xa6c605)]['ALPHA_BLEND']}),_0x2ced6f=Math[_0x2ac55a(_0x1cf604._0x5efea8)](this[_0x2ac55a(0xed)][_0x2ac55a(0xf6)]??this['_mBoundsMax']*0.02)+0.1;this['style']['diffHeight']&&delete this['style']['diffHeight'];const _0x2eb602=(this['style']['splitNum'],0x64);let _0x3432d3=Math['max'](this[_0x2ac55a(0x136)]['height'],this[_0x2ac55a(_0x1cf604._0x31aa98)]['width']);this['style']['granularity']=_0x3432d3/=_0x2eb602;const _0x1fc5e1=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x3073c1,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x7f3dda=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace[(_0x2ac55a(0x124))]['RectanglePrimitive']({...this[_0x2ac55a(_0x1cf604._0x49befb)],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x2ac55a(0xe3))]({'flat':!![],'aboveGround':!![],'renderState':_0x51e87a,'material':_0x1fc5e1,'vertexShaderSource':getVertexShaderSource(_0x2ced6f*_0x7f3dda)})}),this[_0x2ac55a(0xef)]['addGraphic'](this['_graphic']),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace['graphic'][(_0x2ac55a(_0x1cf604._0x54c2b1))]({...this['options'],'rectangle':this[_0x2ac55a(0x136)],'appearance':new Cesium[(_0x2ac55a(_0x1cf604._0x52ce65))]({'flat':!![],'aboveGround':!![],'renderState':_0x51e87a,'material':_0x1fc5e1,'vertexShaderSource':getVertexShaderSource(-_0x2ced6f)})}),this['_layer']['addGraphic'](this[_0x2ac55a(_0x1cf604._0x275fe7)]));}[_0x169532(0x104)](_0x20d26c){const _0x42ad05={_0x3edb74:0x12a,_0x259b8c:0x114},_0x5037a5=_0x169532;return _0x20d26c!==null&&_0x20d26c!==void 0x0&&_0x20d26c[_0x5037a5(_0x42ad05._0x3edb74)]&&this['_rectangle']?mars3d__namespace[_0x5037a5(_0x42ad05._0x259b8c)][_0x5037a5(0x121)](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x1b4774={_0x2fd7c2:0x135,_0x3709e3:0xf0,_0x33fb80:0xf4,_0x5e68ca:0xec,_0x248f1b:0x11c,_0x227c33:0xf4,_0x4311df:0xe7,_0x458e22:0x115,_0x1d1d29:0x136,_0x1a3a37:0x116,_0x197ee6:0xec,_0x47d522:0xf4,_0x4b5096:0x10c,_0x5997e2:0x11b,_0x3917c6:0xe6,_0x1716a4:0xfe,_0x167297:0x11a},_0x2eab5c={_0x2d7ec0:0x10e},_0x4637c1={_0x4a178d:0xe4,_0x1204e5:0xfa},_0x1eca3c=_0x169532,_0x4cc9f=this[_0x1eca3c(_0x1b4774._0x2fd7c2)],_0x24cbd9=[];let _0x1c9f25,_0x1b7068,_0x44ca0c,_0x1a4719;_0x4cc9f['forEach'](_0x39fba1=>{const _0x42af11=_0x1eca3c,_0xd32572=mars3d__namespace[_0x42af11(0x10d)]['parse'](_0x39fba1);if(!_0xd32572)return;_0xd32572[_0x42af11(_0x4637c1._0x4a178d)]=_0x39fba1['value']||0x1,!this[_0x42af11(0xf0)]['rectangle']&&(_0x1c9f25===undefined?(_0x1c9f25=_0xd32572['lng'],_0x1b7068=_0xd32572['lng'],_0x44ca0c=_0xd32572['lat'],_0x1a4719=_0xd32572[_0x42af11(0xe5)]):(_0x1c9f25=Math[_0x42af11(0xfa)](_0x1c9f25,_0xd32572['lng']),_0x1b7068=Math['max'](_0x1b7068,_0xd32572['lng']),_0x44ca0c=Math[_0x42af11(_0x4637c1._0x1204e5)](_0x44ca0c,_0xd32572['lat']),_0x1a4719=Math['max'](_0x1a4719,_0xd32572['lat']))),_0x24cbd9['push'](_0xd32572);});_0x1c9f25===_0x1b7068&&(_0x1c9f25-=0.000001,_0x1b7068+=0.000001);_0x44ca0c===_0x1a4719&&(_0x44ca0c-=0.000001,_0x1a4719+=0.000001);let _0x569f47=this[_0x1eca3c(_0x1b4774._0x3709e3)]['rectangle']||{'xmin':_0x1c9f25,'xmax':_0x1b7068,'ymin':_0x44ca0c,'ymax':_0x1a4719};const _0x1aead6=getMercatorBounds(_0x569f47),_0x3c35c3=Math['abs'](_0x1aead6['xmax']-_0x1aead6[_0x1eca3c(_0x1b4774._0x33fb80)]),_0xbbd460=Math['abs'](_0x1aead6['ymax']-_0x1aead6['ymin']),_0xa61afe=Math[_0x1eca3c(_0x1b4774._0x5e68ca)](_0x3c35c3,_0xbbd460),_0x4b235c=Math['min'](_0x3c35c3,_0xbbd460);this[_0x1eca3c(0x12d)]=_0xa61afe;let _0x388b49=0x1;if(_0xa61afe>this['options']['maxCanvasSize'])_0x388b49=_0xa61afe/this['options']['maxCanvasSize'],_0x4b235c/_0x388b49<this[_0x1eca3c(0xf0)]['minCanvasSize']&&(_0x388b49=_0x4b235c/this['options']['minCanvasSize']);else _0x4b235c<this['options']['minCanvasSize']&&(_0x388b49=_0x4b235c/this[_0x1eca3c(0xf0)][_0x1eca3c(0xf1)],_0xa61afe/_0x388b49>this['options']['maxCanvasSize']&&(_0x388b49=_0xa61afe/this['options'][_0x1eca3c(_0x1b4774._0x248f1b)]));const _0xcc09e6=this['heatStyle']['radius']*1.5,_0x2b05a8=_0x3c35c3/_0x388b49+_0xcc09e6*0x2,_0x3e76a2=_0xbbd460/_0x388b49+_0xcc09e6*0x2,_0x4e92dd=_0xcc09e6*_0x388b49;_0x1aead6[_0x1eca3c(_0x1b4774._0x227c33)]-=_0x4e92dd,_0x1aead6['ymin']-=_0x4e92dd,_0x1aead6['xmax']+=_0x4e92dd,_0x1aead6[_0x1eca3c(_0x1b4774._0x4311df)]+=_0x4e92dd,this[_0x1eca3c(_0x1b4774._0x458e22)]=_0x388b49,_0x569f47=geLatLngBounds(_0x1aead6),this[_0x1eca3c(_0x1b4774._0x1d1d29)]=Cesium['Rectangle'][_0x1eca3c(_0x1b4774._0x1a3a37)](_0x569f47['xmin'],_0x569f47['ymin'],_0x569f47['xmax'],_0x569f47[_0x1eca3c(0xe7)]);let _0x5d653b=_0x24cbd9[0x0]['value']??0x1,_0xb580d3=_0x24cbd9[0x0]['value']??0x0;const _0x48f10b=[];_0x24cbd9['forEach'](_0x256b64=>{const _0xc4ffd6=_0x1eca3c,_0x2c7f49=mars3d__namespace[_0xc4ffd6(0x10b)][_0xc4ffd6(_0x2eab5c._0x2d7ec0)]([_0x256b64['lng'],_0x256b64[_0xc4ffd6(0xe5)]]),_0x2841f6=_0x256b64['value']||0x1,_0x4002b3=Math['round']((_0x2c7f49[0x0]-_0x1aead6['xmin'])/_0x388b49),_0x204cc7=Math[_0xc4ffd6(0x138)]((_0x1aead6['ymax']-_0x2c7f49[0x1])/_0x388b49);_0x5d653b=Math['max'](_0x5d653b,_0x2841f6),_0xb580d3=Math[_0xc4ffd6(0xfa)](_0xb580d3,_0x2841f6),_0x48f10b['push']({'x':_0x4002b3,'y':_0x204cc7,'value':_0x2841f6});});const _0x18c149={'min':this[_0x1eca3c(0xf0)][_0x1eca3c(0xfa)]??_0xb580d3,'max':this['options'][_0x1eca3c(_0x1b4774._0x197ee6)]??_0x5d653b,'data':_0x48f10b};this['_last_heatData']=_0x18c149;if(!this['_last_mBounds']||_0x1aead6['xmin']!==this['_last_mBounds'][_0x1eca3c(_0x1b4774._0x47d522)]||_0x1aead6[_0x1eca3c(_0x1b4774._0x4b5096)]!==this['_last_mBounds']['ymin']||_0x1aead6['xmax']!==this['_last_mBounds']['xmax']||_0x1aead6['ymax']!==this['_last_mBounds']['ymax']){this['_last_mBounds']=_0x1aead6,this['_container']['style'][_0x1eca3c(_0x1b4774._0x5997e2)]='width:'+_0x2b05a8+'px;height:'+_0x3e76a2+_0x1eca3c(_0x1b4774._0x3917c6);const _0x3f16d1={...this['heatStyle'],'container':this['_container']};!this['_heat']?this['_heat']=h337__namespace['create'](_0x3f16d1):this[_0x1eca3c(_0x1b4774._0x1716a4)]['configure'](_0x3f16d1);}this['_heat']['setData'](_0x18c149);const _0x59b40f=mars3d__namespace['DomUtil'][_0x1eca3c(0x12f)](this['_heat'][_0x1eca3c(_0x1b4774._0x167297)]['canvas']);return _0x59b40f;}['_getArcHeatCanvas'](){const _0x4cc81e={_0x587a25:0xfe,_0x4f438d:0xfd,_0x36ddbb:0x130,_0x457915:0xf0},_0x50bc5c=_0x169532;this['_heat']['configure']({'radius':this['heatStyle']['radius']*this['style']['arcRadiusScale'],'blur':this['heatStyle']['blur']*this[_0x50bc5c(0xed)]['arcBlurScale'],'gradient':this[_0x50bc5c(0x110)]['gradientArc']||{0.25:_0x50bc5c(0xf3),0.55:'rgb(140,140,140)',0.85:_0x50bc5c(0x103),0x1:_0x50bc5c(0x119)}});const _0xae8f05=mars3d__namespace['DomUtil']['copyCanvas'](this[_0x50bc5c(_0x4cc81e._0x587a25)][_0x50bc5c(0x11a)][_0x50bc5c(_0x4cc81e._0x4f438d)]);return this[_0x50bc5c(0xfe)][_0x50bc5c(_0x4cc81e._0x36ddbb)](this[_0x50bc5c(_0x4cc81e._0x457915)]['heatStyle']),_0xae8f05;}['getPointData'](_0x42c36b){const _0x210336={_0x29cbb4:0xe5,_0x324dac:0xe7,_0x1bcbaa:0xfe},_0x173d1f=_0x169532,_0x875303=mars3d__namespace['LngLatPoint']['parse'](_0x42c36b);if(!_0x875303)return{};const _0x43e291=mars3d__namespace['PointTrans'][_0x173d1f(0x10e)]([_0x875303[_0x173d1f(0x109)],_0x875303[_0x173d1f(_0x210336._0x29cbb4)]]),_0x338b52=this['_last_mBounds'],_0x70c885=Math['round']((_0x43e291[0x0]-_0x338b52['xmin'])/this['_scale']),_0x10b0d9=Math['round']((_0x338b52[_0x173d1f(_0x210336._0x324dac)]-_0x43e291[0x1])/this['_scale']),_0x345e6a=this[_0x173d1f(_0x210336._0x1bcbaa)][_0x173d1f(0x132)]({'x':_0x70c885,'y':_0x10b0d9}),_0x1ee12f=this['_heat']['_renderer']['ctx']['getImageData'](_0x70c885-0x1,_0x10b0d9-0x1,0x1,0x1)['data'];return{'x':_0x70c885,'y':_0x10b0d9,'value':_0x345e6a,'color':'rgba('+_0x1ee12f[0x0]+','+_0x1ee12f[0x1]+','+_0x1ee12f[0x2]+','+_0x1ee12f[0x3]+')'};}}mars3d__namespace[_0x169532(0xf9)]['register'](_0x169532(0xe2),HeatLayer),mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x4531c0){const _0x2047cd={_0x27ebed:0x10e,_0x39f150:0x10c,_0xc9d8b8:0x10e},_0x3682ae=_0x169532,_0x3fd241=mars3d__namespace['PointTrans'][_0x3682ae(_0x2047cd._0x27ebed)]([_0x4531c0['xmin'],_0x4531c0[_0x3682ae(_0x2047cd._0x39f150)]]),_0x125316=mars3d__namespace['PointTrans'][_0x3682ae(_0x2047cd._0xc9d8b8)]([_0x4531c0['xmax'],_0x4531c0['ymax']]);return{'xmin':_0x3fd241[0x0],'ymin':_0x3fd241[0x1],'xmax':_0x125316[0x0],'ymax':_0x125316[0x1]};}function _0x4443(_0x164358,_0x306ade){const _0x4cd4d0=_0x4cd4();return _0x4443=function(_0x4443cb,_0x1a0e36){_0x4443cb=_0x4443cb-0xe2;let _0x4fda11=_0x4cd4d0[_0x4443cb];return _0x4fda11;},_0x4443(_0x164358,_0x306ade);}function geLatLngBounds(_0x29660b){const _0x327f67={_0x543faf:0x10b},_0x139da0=_0x169532,_0x511ce7=mars3d__namespace['PointTrans'][_0x139da0(0x10a)]([_0x29660b[_0x139da0(0xf4)],_0x29660b['ymin']]),_0x31af62=mars3d__namespace[_0x139da0(_0x327f67._0x543faf)][_0x139da0(0x10a)]([_0x29660b['xmax'],_0x29660b[_0x139da0(0xe7)]]);return{'xmin':_0x511ce7[0x0],'ymin':_0x511ce7[0x1],'xmax':_0x31af62[0x0],'ymax':_0x31af62[0x1]};}function getVertexShaderSource(_0x5a67e1){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'+_0x5a67e1+';\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,_0x169532(0x11d),{'value':!![]});
}));
{
"name": "mars3d-heatmap",
"version": "3.5.18",
"version": "3.6.0",
"description": "Mars3D平台插件,结合heatmap可视化功能插件",

@@ -13,3 +13,3 @@ "main": "dist/mars3d-heatmap.js",

"devDependencies": {
"mars3d": "~3.5.18"
"mars3d": "~3.6.0"
},

@@ -16,0 +16,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc