mars3d-heatmap
Advanced tools
Comparing version 3.7.1 to 3.7.2
/** | ||
* Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap | ||
* | ||
* 版本信息:v3.7.1 | ||
* 编译日期:2024-01-23 21:36:57 | ||
* 版本信息:v3.7.2 | ||
* 编译日期:2024-01-29 17:17:23 | ||
* 版权所有:Copyright by 火星科技 http://mars3d.cn | ||
@@ -10,7 +10,7 @@ * 使用单位:免费公开版 ,2024-01-15 | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, (window.mars3d || require('mars3d')), (window.h337 || require('@mars3d/heatmap.js'))) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'mars3d', '@mars3d/heatmap.js'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-heatmap"] = {}, global.mars3d, global.h337)); | ||
})(this, (function (exports, mars3d, h337) { | ||
'use strict';const _0x5124ca=_0x1cb4;(function(_0x2a98e5,_0x2da1d6){const _0x23d12c={_0x1b23a9:0xdd,_0x27d37e:0xdf,_0x32cf38:0xe8,_0x1f605f:0xed,_0x4d01ee:0xd6,_0x31dd20:0xd1},_0x19120c=_0x1cb4,_0x2253fb=_0x2a98e5();while(!![]){try{const _0x5ddc4b=parseInt(_0x19120c(0xb6))/0x1*(-parseInt(_0x19120c(0xe5))/0x2)+parseInt(_0x19120c(_0x23d12c._0x1b23a9))/0x3+parseInt(_0x19120c(_0x23d12c._0x27d37e))/0x4*(parseInt(_0x19120c(0xc8))/0x5)+parseInt(_0x19120c(_0x23d12c._0x32cf38))/0x6*(parseInt(_0x19120c(0xce))/0x7)+parseInt(_0x19120c(_0x23d12c._0x1f605f))/0x8*(parseInt(_0x19120c(_0x23d12c._0x4d01ee))/0x9)+-parseInt(_0x19120c(_0x23d12c._0x31dd20))/0xa+-parseInt(_0x19120c(0xcc))/0xb;if(_0x5ddc4b===_0x2da1d6)break;else _0x2253fb['push'](_0x2253fb['shift']());}catch(_0x3fae5c){_0x2253fb['push'](_0x2253fb['shift']());}}}(_0x5709,0x90dfd));function _interopNamespace(_0x1c87c0){const _0x31f6a2={_0x396965:0xb4},_0xf8b457={_0x2282fc:0xc2},_0x1ebb2d=_0x1cb4;if(_0x1c87c0&&_0x1c87c0[_0x1ebb2d(_0x31f6a2._0x396965)])return _0x1c87c0;var _0x572fda=Object['create'](null);return _0x1c87c0&&Object['keys'](_0x1c87c0)['forEach'](function(_0x104a5b){const _0x91bd59=_0x1ebb2d;if(_0x104a5b!=='default'){var _0x22f77e=Object['getOwnPropertyDescriptor'](_0x1c87c0,_0x104a5b);Object[_0x91bd59(_0xf8b457._0x2282fc)](_0x572fda,_0x104a5b,_0x22f77e['get']?_0x22f77e:{'enumerable':!![],'get':function(){return _0x1c87c0[_0x104a5b];}});}}),_0x572fda['default']=_0x1c87c0,_0x572fda;}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 _0x1cb4(_0xda2bf6,_0x376f10){const _0x5709be=_0x5709();return _0x1cb4=function(_0x1cb4c7,_0x4db0e6){_0x1cb4c7=_0x1cb4c7-0xb4;let _0x5c6142=_0x5709be[_0x1cb4c7];return _0x5c6142;},_0x1cb4(_0xda2bf6,_0x376f10);}function _0x5709(){const _0x18c519=['remove','arcBlurScale','_updatePositionsHook','Util','xmax','_positions','push','clientWidth','rgb(0,0,0)','clear','_map','options','_graphic','addPosition','forEach','value','minCanvasSize','_rectangle','radius','__esModule','width','168899ipgZPG','uniforms','canvas','create','addGraphic','LayerUtil','Rectangle','xmin','diffHeight','EllipsoidSurfaceAppearance','DomUtil','ymin','defineProperty','ALWAYS','_graphic2','heatStyle','_mBoundsMax','_setOptionsHook','3374650ZVyZRW','parse','max','HeatLayer','14459170iZOwUR','_heat','497hMWWan','请引入\x20heatmap.js\x20库\x20','graphic','7920620jtezAh','_layer','show','width:','arcRadiusScale','9MItJbX','merge','StencilOperation','rectangle','lonlat2mercator','_container','ALPHA_BLEND','3089760HUxkQK','min','4HlgvEy','positions','style','lat','PointTrans','KEEP','2VQvRsn','yellow','container','88758reDgld','floor','layer','bumpMap','_addedHook','909464EuNCrQ','lng','_last_mBounds','image','points','ymax','_getHeatCanvas','Cesium','arc','clientHeight','round'];_0x5709=function(){return _0x18c519;};return _0x5709();}if(!h337__namespace['create'])throw new Error(_0x5124ca(0xcf));const Cesium=mars3d__namespace[_0x5124ca(0xf4)],BaseLayer=mars3d__namespace[_0x5124ca(0xea)]['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:'blue',0.6:'green',0.8:_0x5124ca(0xe6),0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance']['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x22fa80={}){const _0x8b1d66={_0x48f074:0x103,_0xc00712:0xff,_0x1aedf4:0xde,_0x537ed7:0x108,_0x1814e4:0x103},_0x487281=_0x5124ca;super(_0x22fa80),this[_0x487281(_0x8b1d66._0x48f074)]['maxCanvasSize']=this['options']['maxCanvasSize']??document['body'][_0x487281(_0x8b1d66._0xc00712)],this[_0x487281(0x103)]['maxCanvasSize']=Math[_0x487281(_0x8b1d66._0x1aedf4)](this[_0x487281(0x103)]['maxCanvasSize'],0x1388),this['options'][_0x487281(_0x8b1d66._0x537ed7)]=this['options'][_0x487281(_0x8b1d66._0x537ed7)]??document['body'][_0x487281(0xf6)],this['options']['minCanvasSize']=Math['max'](this['options']['minCanvasSize'],0x2bc),this['options']['heatStyle']={...DEF_HEATSTYLE,...this['options'][_0x487281(0xc5)]},this[_0x487281(_0x8b1d66._0x1814e4)]['style']={...DEF_STYLE,...this[_0x487281(_0x8b1d66._0x1814e4)]['style']};}get[_0x5124ca(0xea)](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set['heatStyle'](_0x456aa0){const _0x4317ce={_0x22bb19:0xfb,_0x20709c:0x103,_0x42b4d8:0xcd},_0x212ec4=_0x5124ca;this['options']['heatStyle']=mars3d__namespace[_0x212ec4(_0x4317ce._0x22bb19)]['merge'](this[_0x212ec4(_0x4317ce._0x20709c)]['heatStyle'],_0x456aa0),this['_heat']&&(this[_0x212ec4(_0x4317ce._0x42b4d8)]['configure'](this['options']['heatStyle']),this['_updatePositionsHook'](!![]));}get[_0x5124ca(0xe1)](){const _0x13b4fd={_0x493873:0x103,_0x27bb10:0xe1},_0xf28b98=_0x5124ca;return this[_0xf28b98(_0x13b4fd._0x493873)][_0xf28b98(_0x13b4fd._0x27bb10)];}set[_0x5124ca(0xe1)](_0x21e27f){const _0x4f5aeb={_0x4ce370:0xd7,_0x285f9c:0x103},_0x44255d=_0x5124ca;this['options']['style']=mars3d__namespace['Util'][_0x44255d(_0x4f5aeb._0x4ce370)](this[_0x44255d(_0x4f5aeb._0x285f9c)]['style'],_0x21e27f);}get['positions'](){return this['_positions'];}set[_0x5124ca(0xe0)](_0x46fb83){this['setPositions'](_0x46fb83);}get['coordinates'](){const _0xd0b837={_0x3499f9:0xf1},_0x273d4b={_0xaaef6f:0xfe},_0x2c9bff=_0x5124ca,_0x4b5a26=[];return this[_0x2c9bff(_0xd0b837._0x3499f9)][_0x2c9bff(0x106)](_0x2438c9=>{const _0x8f94d1=_0x2c9bff;_0x4b5a26[_0x8f94d1(_0x273d4b._0xaaef6f)](_0x2438c9['toArray']());}),_0x4b5a26;}get[_0x5124ca(0xd9)](){return this['_rectangle'];}[_0x5124ca(0xc7)](_0x405e18,_0x20a448){const _0x20cea4=_0x5124ca;_0x405e18[_0x20cea4(0xe0)]&&(this['positions']=_0x405e18['positions']);}['_mountedHook'](){const _0x584655={_0xa18d8b:0xf0,_0x276395:0xea},_0xc549ae=_0x5124ca;this[_0xc549ae(0xe1)]['type']===_0xc549ae(_0x584655._0xa18d8b)?this[_0xc549ae(0xd2)]=new mars3d__namespace[(_0xc549ae(_0x584655._0x276395))]['ImageLayer']({'crs':'EPSG:3857','private':!![]}):this['_layer']=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}[_0x5124ca(0xec)](){const _0x3d3879={_0x2402e2:0xdb,_0xa51d5:0xe7,_0x2ad39c:0xe0},_0x3af095=_0x5124ca;this[_0x3af095(0x102)]['addLayer'](this['_layer']),this[_0x3af095(_0x3d3879._0x2402e2)]=mars3d__namespace[_0x3af095(0xc0)][_0x3af095(0xb9)]('div','mars3d-heatmap\x20mars3d-hideDiv',this['_map'][_0x3af095(_0x3d3879._0xa51d5)]),this['options']['positions']&&(this['positions']=this['options'][_0x3af095(_0x3d3879._0x2ad39c)]),this['options']['flyTo']&&this['flyToByAnimationEnd']();}['_removedHook'](){const _0x266f5b={_0x2b5fda:0xdb,_0x5b8086:0xf8,_0x4b69bd:0xd2},_0x126b29=_0x5124ca;this[_0x126b29(_0x266f5b._0x2b5fda)]&&(mars3d__namespace['DomUtil'][_0x126b29(_0x266f5b._0x5b8086)](this['_container']),delete this['_container']),this['clear'](),this[_0x126b29(0x102)]['removeLayer'](this[_0x126b29(_0x266f5b._0x4b69bd)]);}[_0x5124ca(0x105)](_0x1367d4,_0x4d1968){const _0x27290e={_0x42dc67:0xfd,_0x58523f:0xfd},_0x44a812=_0x5124ca;this[_0x44a812(_0x27290e._0x42dc67)]=this['_positions']||[],this[_0x44a812(_0x27290e._0x58523f)][_0x44a812(0xfe)](_0x1367d4),this['_updatePositionsHook'](_0x4d1968);}['setPositions'](_0xdc9b49,_0x129801){const _0x504c86=_0x5124ca;this['_positions']=_0xdc9b49,this[_0x504c86(0xfa)](_0x129801);}['clear'](){const _0x1b37b8={_0x18612c:0x104},_0x1a12a2=_0x5124ca;this[_0x1a12a2(0x104)]&&(this['_layer']['removeGraphic'](this[_0x1a12a2(0x104)],!![]),delete this[_0x1a12a2(_0x1b37b8._0x18612c)]),this['_graphic2']&&(this['_layer']['removeGraphic'](this[_0x1a12a2(0xc4)],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x2b1ce4){const _0x2f94cf={_0x5db3a4:0xe1,_0x350729:0xf5,_0x16093e:0xb7,_0x335d1d:0xeb,_0x3f15f8:0xb7},_0x27126f=_0x5124ca;if(!this[_0x27126f(0xd3)]||!this['_map']||!this['positions']||this['positions']['length']===0x0)return this;const _0x14e272=this['_getHeatCanvas']();if(this[_0x27126f(_0x2f94cf._0x5db3a4)]['type']==='image')this[_0x27126f(0xd2)]['setOptions']({'url':_0x14e272['toDataURL']('image/png',0x1),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style'][_0x27126f(_0x2f94cf._0x350729)]?this['_graphic']&&_0x2b1ce4?(this['_graphic'][_0x27126f(0xb7)]['image']=_0x14e272,this['_graphic']['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x14e272,this['_graphic2'][_0x27126f(_0x2f94cf._0x16093e)][_0x27126f(_0x2f94cf._0x335d1d)]=this[_0x27126f(0x104)][_0x27126f(_0x2f94cf._0x3f15f8)]['bumpMap'])):this['_createArcGraphic'](_0x14e272):this[_0x27126f(0x104)]&&_0x2b1ce4?this['_graphic']['uniforms']['image']=_0x14e272:this['_createGraphic'](_0x14e272);return this;}['_createGraphic'](_0x479876){const _0x3da342={_0x4b7ed6:0x109},_0x1193f4=_0x5124ca;this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x1193f4(_0x3da342._0x4b7ed6)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x479876},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this['_layer']['addGraphic'](this['_graphic']);}['_createArcGraphic'](_0xbc45d1){const _0x2d6a8a={_0xa12616:0xd8,_0x1f1b8e:0xe4,_0x5835fa:0xc3,_0x593427:0xdc,_0x4cd158:0xe9,_0x4a2e55:0xbe,_0x3fa369:0xbe,_0x1f91ea:0x109,_0x55934a:0x104,_0x2733e6:0x109,_0x4fe510:0xbf},_0x30e0f8=_0x5124ca;this[_0x30e0f8(0x101)]();const _0x52acbd=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0x30e0f8(_0x2d6a8a._0xa12616)][_0x30e0f8(_0x2d6a8a._0x1f1b8e)],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium['StencilFunction'][_0x30e0f8(_0x2d6a8a._0x5835fa)],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium[_0x30e0f8(0xd8)]['KEEP'],'zPass':Cesium[_0x30e0f8(0xd8)]['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState'][_0x30e0f8(_0x2d6a8a._0x593427)]}),_0x357edf=Math[_0x30e0f8(_0x2d6a8a._0x4cd158)](this['style'][_0x30e0f8(_0x2d6a8a._0x4a2e55)]??this[_0x30e0f8(0xc6)]*0.02)+0.1;this['style']['diffHeight']&&delete this['style'][_0x30e0f8(_0x2d6a8a._0x3fa369)];const _0x3f6fc3=(this['style']['splitNum'],0x64);let _0x2dfa33=Math['max'](this[_0x30e0f8(_0x2d6a8a._0x1f91ea)]['height'],this['_rectangle'][_0x30e0f8(0xb5)]);this['style']['granularity']=_0x2dfa33/=_0x3f6fc3;const _0x327c48=new Cesium['Material']({'fabric':{'uniforms':{'image':_0xbc45d1,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x1f0415=this[_0x30e0f8(0xe1)]['arcDirection']||0x1;this[_0x30e0f8(_0x2d6a8a._0x55934a)]=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0x30e0f8(0x103)],'rectangle':this[_0x30e0f8(_0x2d6a8a._0x2733e6)],'appearance':new Cesium[(_0x30e0f8(_0x2d6a8a._0x4fe510))]({'flat':!![],'aboveGround':!![],'renderState':_0x52acbd,'material':_0x327c48,'vertexShaderSource':getVertexShaderSource(_0x357edf*_0x1f0415)})}),this['_layer'][_0x30e0f8(0xba)](this['_graphic']),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace[(_0x30e0f8(0xd0))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x52acbd,'material':_0x327c48,'vertexShaderSource':getVertexShaderSource(-_0x357edf)})}),this['_layer'][_0x30e0f8(0xba)](this[_0x30e0f8(0xc4)]));}['getRectangle'](_0x16bccc){return _0x16bccc!==null&&_0x16bccc!==void 0x0&&_0x16bccc['isFormat']&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this['_rectangle']):this['_rectangle'];}[_0x5124ca(0xf3)](){const _0x45c2d3={_0x814c3f:0x108,_0x4ae9f3:0x103,_0x488b2e:0xf2,_0x1f3690:0xbc,_0x4665dd:0x107,_0x574120:0xca,_0x37e15d:0xef,_0x385532:0xc1,_0x1da196:0xef,_0x602b4d:0xcd,_0x2745bd:0xcd},_0x3c6d66={_0x2dd7a9:0xda,_0x318d1a:0xe2,_0x1d85b3:0xbd,_0x203f8a:0xf7,_0x86d685:0xfe},_0x2388df={_0x582faa:0xee,_0x4638e6:0xe2,_0x119bd7:0xde},_0x1ae3ba=_0x5124ca,_0xc38390=this['_positions'],_0x4a0dc3=[];let _0xc3c2db,_0x3c14de,_0x3d35d2,_0x5de790;_0xc38390[_0x1ae3ba(0x106)](_0x4b7091=>{const _0x16f1de=_0x1ae3ba,_0x185187=mars3d__namespace['LngLatPoint'][_0x16f1de(0xc9)](_0x4b7091);if(!_0x185187)return;_0x185187['value']=_0x4b7091[_0x16f1de(0x107)]||0x1,!this['options']['rectangle']&&(_0xc3c2db===undefined?(_0xc3c2db=_0x185187['lng'],_0x3c14de=_0x185187[_0x16f1de(_0x2388df._0x582faa)],_0x3d35d2=_0x185187[_0x16f1de(_0x2388df._0x4638e6)],_0x5de790=_0x185187[_0x16f1de(0xe2)]):(_0xc3c2db=Math['min'](_0xc3c2db,_0x185187['lng']),_0x3c14de=Math['max'](_0x3c14de,_0x185187[_0x16f1de(0xee)]),_0x3d35d2=Math[_0x16f1de(_0x2388df._0x119bd7)](_0x3d35d2,_0x185187['lat']),_0x5de790=Math[_0x16f1de(0xca)](_0x5de790,_0x185187[_0x16f1de(0xe2)]))),_0x4a0dc3['push'](_0x185187);});_0xc3c2db===_0x3c14de&&(_0xc3c2db-=0.000001,_0x3c14de+=0.000001);_0x3d35d2===_0x5de790&&(_0x3d35d2-=0.000001,_0x5de790+=0.000001);let _0x584008=this[_0x1ae3ba(0x103)]['rectangle']||{'xmin':_0xc3c2db,'xmax':_0x3c14de,'ymin':_0x3d35d2,'ymax':_0x5de790};const _0x2ff8a6=getMercatorBounds(_0x584008),_0x4ed780=Math['abs'](_0x2ff8a6['xmax']-_0x2ff8a6['xmin']),_0x4010cc=Math['abs'](_0x2ff8a6['ymax']-_0x2ff8a6['ymin']),_0x168cbb=Math['max'](_0x4ed780,_0x4010cc),_0x17063f=Math['min'](_0x4ed780,_0x4010cc);this['_mBoundsMax']=_0x168cbb;let _0xe6c400=0x1;if(_0x168cbb>this['options']['maxCanvasSize'])_0xe6c400=_0x168cbb/this['options']['maxCanvasSize'],_0x17063f/_0xe6c400<this['options'][_0x1ae3ba(_0x45c2d3._0x814c3f)]&&(_0xe6c400=_0x17063f/this[_0x1ae3ba(_0x45c2d3._0x4ae9f3)]['minCanvasSize']);else _0x17063f<this['options']['minCanvasSize']&&(_0xe6c400=_0x17063f/this['options']['minCanvasSize'],_0x168cbb/_0xe6c400>this[_0x1ae3ba(0x103)]['maxCanvasSize']&&(_0xe6c400=_0x168cbb/this['options']['maxCanvasSize']));const _0x32e8ff=this['heatStyle']['radius']*1.5,_0x1d69c9=_0x4ed780/_0xe6c400+_0x32e8ff*0x2,_0x29ecea=_0x4010cc/_0xe6c400+_0x32e8ff*0x2,_0x5955ae=_0x32e8ff*_0xe6c400;_0x2ff8a6['xmin']-=_0x5955ae,_0x2ff8a6['ymin']-=_0x5955ae,_0x2ff8a6['xmax']+=_0x5955ae,_0x2ff8a6[_0x1ae3ba(_0x45c2d3._0x488b2e)]+=_0x5955ae,this['_scale']=_0xe6c400,_0x584008=geLatLngBounds(_0x2ff8a6),this['_rectangle']=Cesium[_0x1ae3ba(_0x45c2d3._0x1f3690)]['fromDegrees'](_0x584008['xmin'],_0x584008['ymin'],_0x584008[_0x1ae3ba(0xfc)],_0x584008[_0x1ae3ba(0xf2)]);let _0xbb5f94=_0x4a0dc3[0x0][_0x1ae3ba(_0x45c2d3._0x4665dd)]??0x1,_0x20f841=_0x4a0dc3[0x0]['value']??0x0;const _0x2e9554=[];_0x4a0dc3['forEach'](_0x171f8e=>{const _0x2237d7=_0x1ae3ba,_0x41b6a8=mars3d__namespace['PointTrans'][_0x2237d7(_0x3c6d66._0x2dd7a9)]([_0x171f8e['lng'],_0x171f8e[_0x2237d7(_0x3c6d66._0x318d1a)]]),_0x3149c3=_0x171f8e['value']||0x1,_0x3078c4=Math['round']((_0x41b6a8[0x0]-_0x2ff8a6[_0x2237d7(_0x3c6d66._0x1d85b3)])/_0xe6c400),_0x4af3f8=Math[_0x2237d7(_0x3c6d66._0x203f8a)]((_0x2ff8a6[_0x2237d7(0xf2)]-_0x41b6a8[0x1])/_0xe6c400);_0xbb5f94=Math['max'](_0xbb5f94,_0x3149c3),_0x20f841=Math['min'](_0x20f841,_0x3149c3),_0x2e9554[_0x2237d7(_0x3c6d66._0x86d685)]({'x':_0x3078c4,'y':_0x4af3f8,'value':_0x3149c3});});const _0x26a119={'min':this['options']['min']??_0x20f841,'max':this[_0x1ae3ba(_0x45c2d3._0x4ae9f3)][_0x1ae3ba(_0x45c2d3._0x574120)]??_0xbb5f94,'data':_0x2e9554};this['_last_heatData']=_0x26a119;if(!this['_last_mBounds']||_0x2ff8a6['xmin']!==this[_0x1ae3ba(_0x45c2d3._0x37e15d)]['xmin']||_0x2ff8a6[_0x1ae3ba(_0x45c2d3._0x385532)]!==this['_last_mBounds']['ymin']||_0x2ff8a6[_0x1ae3ba(0xfc)]!==this[_0x1ae3ba(_0x45c2d3._0x1da196)]['xmax']||_0x2ff8a6['ymax']!==this['_last_mBounds']['ymax']){this['_last_mBounds']=_0x2ff8a6,this['_container']['style']['cssText']=_0x1ae3ba(0xd4)+_0x1d69c9+'px;height:'+_0x29ecea+'px;';const _0x426928={...this['heatStyle'],'container':this['_container']};!this[_0x1ae3ba(_0x45c2d3._0x602b4d)]?this[_0x1ae3ba(_0x45c2d3._0x2745bd)]=h337__namespace['create'](_0x426928):this['_heat']['configure'](_0x426928);}this['_heat']['setData'](_0x26a119);const _0x2fd762=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return _0x2fd762;}['_getArcHeatCanvas'](){const _0x14b06f={_0x355066:0x10a,_0x3e2335:0xf9,_0x11161a:0xcd},_0x1228c8=_0x5124ca;this[_0x1228c8(0xcd)]['configure']({'radius':this['heatStyle'][_0x1228c8(_0x14b06f._0x355066)]*this[_0x1228c8(0xe1)][_0x1228c8(0xd5)],'blur':this[_0x1228c8(0xc5)]['blur']*this['style'][_0x1228c8(_0x14b06f._0x3e2335)],'gradient':this['heatStyle']['gradientArc']||{0.25:_0x1228c8(0x100),0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x367bed=mars3d__namespace['DomUtil']['copyCanvas'](this[_0x1228c8(_0x14b06f._0x11161a)]['_renderer'][_0x1228c8(0xb8)]);return this['_heat']['configure'](this[_0x1228c8(0x103)]['heatStyle']),_0x367bed;}['getPointData'](_0x5947b7){const _0x21a28e={_0x5068bc:0xda,_0x21a539:0xcd},_0x42de15=_0x5124ca,_0x3cd354=mars3d__namespace['LngLatPoint']['parse'](_0x5947b7);if(!_0x3cd354)return{};const _0x2e528e=mars3d__namespace['PointTrans'][_0x42de15(_0x21a28e._0x5068bc)]([_0x3cd354[_0x42de15(0xee)],_0x3cd354['lat']]),_0x265239=this['_last_mBounds'],_0x3a322f=Math['round']((_0x2e528e[0x0]-_0x265239['xmin'])/this['_scale']),_0x448cc9=Math['round']((_0x265239[_0x42de15(0xf2)]-_0x2e528e[0x1])/this['_scale']),_0x337926=this['_heat']['getValueAt']({'x':_0x3a322f,'y':_0x448cc9}),_0x5b03da=this[_0x42de15(_0x21a28e._0x21a539)]['_renderer']['ctx']['getImageData'](_0x3a322f-0x1,_0x448cc9-0x1,0x1,0x1)['data'];return{'x':_0x3a322f,'y':_0x448cc9,'value':_0x337926,'color':'rgba('+_0x5b03da[0x0]+','+_0x5b03da[0x1]+','+_0x5b03da[0x2]+','+_0x5b03da[0x3]+')'};}}mars3d__namespace[_0x5124ca(0xbb)]['register']('heat',HeatLayer),mars3d__namespace['layer']['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x507e75){const _0x35f6f4={_0x34cc92:0xe3,_0x749f60:0xda,_0x32d55a:0xf2},_0x37028c=_0x5124ca,_0x43e04a=mars3d__namespace[_0x37028c(_0x35f6f4._0x34cc92)][_0x37028c(_0x35f6f4._0x749f60)]([_0x507e75[_0x37028c(0xbd)],_0x507e75['ymin']]),_0x44d3a7=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x507e75['xmax'],_0x507e75[_0x37028c(_0x35f6f4._0x32d55a)]]);return{'xmin':_0x43e04a[0x0],'ymin':_0x43e04a[0x1],'xmax':_0x44d3a7[0x0],'ymax':_0x44d3a7[0x1]};}function geLatLngBounds(_0x6237b2){const _0x4b0865={_0x2a9071:0xbd},_0x51d18b=_0x5124ca,_0x4d1976=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x6237b2[_0x51d18b(_0x4b0865._0x2a9071)],_0x6237b2['ymin']]),_0x312c47=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x6237b2['xmax'],_0x6237b2[_0x51d18b(0xf2)]]);return{'xmin':_0x4d1976[0x0],'ymin':_0x4d1976[0x1],'xmax':_0x312c47[0x0],'ymax':_0x312c47[0x1]};}function getVertexShaderSource(_0x3d0ecc){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'+_0x3d0ecc+';\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[_0x5124ca(0xcb)]=HeatLayer,Object['defineProperty'](exports,'__esModule',{'value':!![]}); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, (window.mars3d || require('mars3d'))) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'mars3d'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-heatmap"] = {}, global.mars3d)); | ||
})(this, (function (exports, mars3d) { | ||
'use strict';var _0x3eb2ff=_0x2fe8;(function(_0x4c9aa0,_0x226cbf){var _0x546a7d={_0x3f9e94:0x240,_0x49c300:0x205,_0x4d670c:0x255,_0xe85bf1:0x264},_0x469542=_0x2fe8,_0x5e79ff=_0x4c9aa0();while(!![]){try{var _0x590a59=parseInt(_0x469542(0x1d4))/0x1+-parseInt(_0x469542(_0x546a7d._0x3f9e94))/0x2*(parseInt(_0x469542(0x24e))/0x3)+-parseInt(_0x469542(0x1dc))/0x4+parseInt(_0x469542(_0x546a7d._0x49c300))/0x5+parseInt(_0x469542(0x251))/0x6*(parseInt(_0x469542(0x1d7))/0x7)+-parseInt(_0x469542(_0x546a7d._0x4d670c))/0x8*(parseInt(_0x469542(0x24c))/0x9)+parseInt(_0x469542(_0x546a7d._0xe85bf1))/0xa;if(_0x590a59===_0x226cbf)break;else _0x5e79ff['push'](_0x5e79ff['shift']());}catch(_0x5a04ba){_0x5e79ff['push'](_0x5e79ff['shift']());}}}(_0x9956,0x64dd2));function _interopNamespace(_0x5da4ad){var _0x34c27d={_0x2eeb79:0x23e},_0x4ece92=_0x2fe8;if(_0x5da4ad&&_0x5da4ad['__esModule'])return _0x5da4ad;var _0x525cc9=Object[_0x4ece92(0x21c)](null);return _0x5da4ad&&Object['keys'](_0x5da4ad)['forEach'](function(_0x2a11d9){var _0x1ed98f=_0x4ece92;if(_0x2a11d9!=='default'){var _0x376ba9=Object[_0x1ed98f(_0x34c27d._0x2eeb79)](_0x5da4ad,_0x2a11d9);Object['defineProperty'](_0x525cc9,_0x2a11d9,_0x376ba9[_0x1ed98f(0x1f2)]?_0x376ba9:{'enumerable':!![],'get':function(){return _0x5da4ad[_0x2a11d9];}});}}),_0x525cc9['default']=_0x5da4ad,_0x525cc9;}function _mergeNamespaces(_0x44cccb,_0x30276a){var _0x17f3dc={_0x39bca8:0x262};return _0x30276a['forEach'](function(_0x517703){var _0x5776c7=_0x2fe8;_0x517703&&typeof _0x517703!=='string'&&!Array[_0x5776c7(0x1e9)](_0x517703)&&Object[_0x5776c7(_0x17f3dc._0x39bca8)](_0x517703)['forEach'](function(_0x5b2a28){var _0x253523=_0x5776c7;if(_0x5b2a28!=='default'&&!(_0x5b2a28 in _0x44cccb)){var _0x415d17=Object[_0x253523(0x23e)](_0x517703,_0x5b2a28);Object['defineProperty'](_0x44cccb,_0x5b2a28,_0x415d17['get']?_0x415d17:{'enumerable':!![],'get':function(){return _0x517703[_0x5b2a28];}});}});}),_0x44cccb;}var mars3d__namespace=_interopNamespace(mars3d),commonjsGlobal=typeof globalThis!=='undefined'?globalThis:typeof window!=='undefined'?window:typeof global!=='undefined'?global:typeof self!=='undefined'?self:{},heatmap$1={'exports':{}};(function(_0x27d397){var _0x3296f1={_0x3f3fc4:0x20a},_0x45d29b={_0x1ca625:0x21a},_0x18b4df={_0x4fe982:0x23f},_0x23e31d={_0x4ad7f8:0x231},_0x145041=_0x2fe8;(function(_0x2bdcaf,_0x5e751e,_0x28223e){var _0x44817f=_0x2fe8;_0x27d397['exports']?_0x27d397[_0x44817f(_0x23e31d._0x4ad7f8)]=_0x28223e():_0x5e751e[_0x2bdcaf]=_0x28223e();}(_0x145041(0x210),commonjsGlobal,function(){var _0x411b0d={_0x3b5d8c:0x24d},_0x38938e={_0x5aea2c:0x24b},_0x16407c={_0x8b8cb9:0x22b,_0x3004aa:0x1f6},_0x3bb51c={_0x4672ae:0x24b},_0x3c00ee={_0x3b9a5a:0x25c,_0x1a4fbc:0x25a},_0x579cd5={_0x2f794:0x219},_0x21cb72={_0x1236a6:0x22e},_0x594ec9={_0x3c5a0d:0x23a},_0x4b01a3={_0x3ef462:0x252},_0x6ebfa2={_0x2f2d41:0x201,_0x5691c5:0x1ef,_0x4608f3:0x260,_0x487e5f:0x1e4},_0x36aa4c={_0x52a8a4:0x1fa,_0x427a70:0x219,_0xc6e8e2:0x262},_0x16e6bb={_0x52faff:0x243,_0x452490:0x24a,_0x2491e5:0x1e5},_0x36c7ce={_0x428b3d:0x1ee,_0x57d997:0x1ef},_0x45678c={_0xc44ec8:0x254,_0xfda890:0x25e},_0x5d9a75={_0xe9ecbd:0x233},_0x2545e6=_0x145041,_0x2d7e54={'defaultRadius':0x28,'defaultRenderer':'canvas2d','defaultGradient':{0.25:'rgb(0,0,255)',0.55:_0x2545e6(_0x3296f1._0x3f3fc4),0.85:'yellow',0x1:'rgb(255,0,0)'},'defaultMaxOpacity':0x1,'defaultMinOpacity':0x0,'defaultBlur':0.85,'defaultXField':'x','defaultYField':'y','defaultValueField':'value','plugins':{}},_0x39690e=function _0x475150(){var _0x3a865d={_0x3a9ecd:0x225},_0x45d840={_0x2c0630:0x233,_0x8fb379:0x1f6},_0x16dd56={_0x5605ae:0x216},_0x1d7852={_0x8f727a:0x246},_0x20773f={_0x5737ce:0x246},_0xbff21f={_0x358296:0x246,_0x5d55d0:0x1d5,_0x39adab:0x229,_0x56c18a:0x20e},_0x350291=function _0x319d7f(_0x504b1d){var _0x3f1d0f=_0x2fe8;this['_coordinator']={},this['_data']=[],this['_radi']=[],this[_0x3f1d0f(_0xbff21f._0x358296)]=0xa,this['_max']=0x1,this['_xField']=_0x504b1d[_0x3f1d0f(_0xbff21f._0x5d55d0)]||_0x504b1d['defaultXField'],this['_yField']=_0x504b1d['yField']||_0x504b1d['defaultYField'],this['_valueField']=_0x504b1d[_0x3f1d0f(_0xbff21f._0x39adab)]||_0x504b1d['defaultValueField'],_0x504b1d[_0x3f1d0f(_0xbff21f._0x56c18a)]&&(this['_cfgRadius']=_0x504b1d[_0x3f1d0f(0x20e)]);},_0x229a83=_0x2d7e54['defaultRadius'];return _0x350291['prototype']={'_organiseData':function(_0x3188f2,_0x29f58e){var _0x12159a=_0x2fe8,_0x307880=_0x3188f2[this['_xField']],_0x9d10e9=_0x3188f2[this['_yField']],_0x3c9e58=this[_0x12159a(0x1d6)],_0x3cfa09=this['_data'],_0x20cc21=this[_0x12159a(_0x5d9a75._0xe9ecbd)],_0x5ef69a=this['_min'],_0x38eabc=_0x3188f2[this[_0x12159a(0x242)]]||0x1,_0x4a7200=_0x3188f2[_0x12159a(0x20e)]||this['_cfgRadius']||_0x229a83;!_0x3cfa09[_0x307880]&&(_0x3cfa09[_0x307880]=[],_0x3c9e58[_0x307880]=[]);!_0x3cfa09[_0x307880][_0x9d10e9]?(_0x3cfa09[_0x307880][_0x9d10e9]=_0x38eabc,_0x3c9e58[_0x307880][_0x9d10e9]=_0x4a7200):_0x3cfa09[_0x307880][_0x9d10e9]+=_0x38eabc;var _0x42971e=_0x3cfa09[_0x307880][_0x9d10e9];if(_0x42971e>_0x20cc21)return!_0x29f58e?this['_max']=_0x42971e:this['setDataMax'](_0x42971e),![];else return _0x42971e<_0x5ef69a?(!_0x29f58e?this['_min']=_0x42971e:this['setDataMin'](_0x42971e),![]):{'x':_0x307880,'y':_0x9d10e9,'value':_0x38eabc,'radius':_0x4a7200,'min':_0x5ef69a,'max':_0x20cc21};},'_unOrganizeData':function(){var _0x2bf0d2=_0x2fe8,_0x4c3496=[],_0x461751=this['_data'],_0x193923=this['_radi'];for(var _0x359e29 in _0x461751){for(var _0x37306f in _0x461751[_0x359e29]){_0x4c3496['push']({'x':_0x359e29,'y':_0x37306f,'radius':_0x193923[_0x359e29][_0x37306f],'value':_0x461751[_0x359e29][_0x37306f]});}}return{'min':this[_0x2bf0d2(_0x20773f._0x5737ce)],'max':this['_max'],'data':_0x4c3496};},'_onExtremaChange':function(){var _0xc4adff=_0x2fe8;this['_coordinator']['emit']('extremachange',{'min':this[_0xc4adff(_0x1d7852._0x8f727a)],'max':this['_max']});},'addData':function(){var _0x1c2899=_0x2fe8;if(arguments[0x0]['length']>0x0){var _0x516416=arguments[0x0],_0x4613f1=_0x516416['length'];while(_0x4613f1--){this['addData']['call'](this,_0x516416[_0x4613f1]);}}else{var _0x2f8893=this['_organiseData'](arguments[0x0],!![]);_0x2f8893&&(this['_data']['length']===0x0&&(this['_min']=this['_max']=_0x2f8893['value']),this['_coordinator']['emit'](_0x1c2899(_0x16dd56._0x5605ae),{'min':this[_0x1c2899(0x246)],'max':this[_0x1c2899(0x233)],'data':[_0x2f8893]}));}return this;},'setData':function(_0x3b4c76){var _0x1496cc=_0x2fe8,_0x2b34b0=_0x3b4c76['data'],_0x1d4e0b=_0x2b34b0['length'];this['_data']=[],this['_radi']=[];for(var _0x365c32=0x0;_0x365c32<_0x1d4e0b;_0x365c32++){this['_organiseData'](_0x2b34b0[_0x365c32],![]);}return this['_max']=_0x3b4c76[_0x1496cc(0x1fa)],this['_min']=_0x3b4c76[_0x1496cc(_0x45678c._0xc44ec8)]||0x0,this[_0x1496cc(0x1f9)](),this[_0x1496cc(_0x45678c._0xfda890)]['emit']('renderall',this['_getInternalData']()),this;},'removeData':function(){},'setDataMax':function(_0x32972d){var _0x17ad3c=_0x2fe8;return this[_0x17ad3c(_0x45d840._0x2c0630)]=_0x32972d,this['_onExtremaChange'](),this['_coordinator']['emit']('renderall',this[_0x17ad3c(_0x45d840._0x8fb379)]()),this;},'setDataMin':function(_0x176f7f){var _0x14b14f=_0x2fe8;return this['_min']=_0x176f7f,this['_onExtremaChange'](),this['_coordinator'][_0x14b14f(0x22b)]('renderall',this['_getInternalData']()),this;},'setCoordinator':function(_0x279e0f){this['_coordinator']=_0x279e0f;},'_getInternalData':function(){var _0x3007b8=_0x2fe8;return{'max':this['_max'],'min':this['_min'],'data':this[_0x3007b8(_0x3a865d._0x3a9ecd)],'radi':this['_radi']};},'getData':function(){return this['_unOrganizeData']();}},_0x350291;}(),_0x7afbec=function _0x8e83b5(){var _0x8f0f80={_0x2b757f:0x1ef},_0x16c157={_0x2ba2fd:0x265,_0xcbe509:0x1f7},_0x27d335={_0x59557a:0x258},_0x21a866={_0x4af68c:0x223,_0x261535:0x243,_0x154629:0x22e,_0x599746:0x23d},_0x1e2b9c={_0xc111ae:0x220},_0x59e04d=_0x2545e6,_0x4cbea7=function(_0x212508){var _0x259876=_0x2fe8,_0x2c5d65=_0x212508['gradient']||_0x212508[_0x259876(_0x36c7ce._0x428b3d)],_0xcc5f7e=document['createElement'](_0x259876(_0x36c7ce._0x57d997)),_0x2d1be7=_0xcc5f7e[_0x259876(0x211)]('2d',{'willReadFrequently':!![]});_0xcc5f7e['width']=0x100,_0xcc5f7e['height']=0x1;var _0x824ad8=_0x2d1be7[_0x259876(0x1ec)](0x0,0x0,0x100,0x1);for(var _0x20db54 in _0x2c5d65){_0x824ad8['addColorStop'](_0x20db54,_0x2c5d65[_0x20db54]);}return _0x2d1be7['fillStyle']=_0x824ad8,_0x2d1be7['fillRect'](0x0,0x0,0x100,0x1),_0x2d1be7['getImageData'](0x0,0x0,0x100,0x1)['data'];},_0x336eab=function(_0x45e2d3,_0x218f87){var _0xc2328d=_0x2fe8,_0x5e4e48=document['createElement']('canvas'),_0x3e1043=_0x5e4e48['getContext']('2d',{'willReadFrequently':!![]}),_0x14d884=_0x45e2d3,_0x4d1099=_0x45e2d3;_0x5e4e48['width']=_0x5e4e48[_0xc2328d(_0x16e6bb._0x52faff)]=_0x45e2d3*0x2;if(_0x218f87==0x1)_0x3e1043[_0xc2328d(_0x16e6bb._0x452490)](),_0x3e1043['arc'](_0x14d884,_0x4d1099,_0x45e2d3,0x0,0x2*Math['PI'],![]),_0x3e1043['fillStyle']='rgba(0,0,0,1)',_0x3e1043['fill']();else{var _0x3eb0ce=_0x3e1043['createRadialGradient'](_0x14d884,_0x4d1099,_0x45e2d3*_0x218f87,_0x14d884,_0x4d1099,_0x45e2d3);_0x3eb0ce[_0xc2328d(0x263)](0x0,'rgba(0,0,0,1)'),_0x3eb0ce['addColorStop'](0x1,'rgba(0,0,0,0)'),_0x3e1043[_0xc2328d(_0x16e6bb._0x2491e5)]=_0x3eb0ce,_0x3e1043['fillRect'](0x0,0x0,0x2*_0x45e2d3,0x2*_0x45e2d3);}return _0x5e4e48;},_0xb05077=function(_0x14a2d5){var _0x4c8548=_0x2fe8,_0x140478=[],_0x32e9f4=_0x14a2d5['min'],_0x5afc6c=_0x14a2d5[_0x4c8548(_0x36aa4c._0x52a8a4)],_0x127ea9=_0x14a2d5['radi'],_0x14a2d5=_0x14a2d5['data'],_0x1dac1e=Object['keys'](_0x14a2d5),_0x2b6862=_0x1dac1e[_0x4c8548(_0x36aa4c._0x427a70)];while(_0x2b6862--){var _0x2be735=_0x1dac1e[_0x2b6862],_0x5db789=Object[_0x4c8548(_0x36aa4c._0xc6e8e2)](_0x14a2d5[_0x2be735]),_0xbd6b26=_0x5db789['length'];while(_0xbd6b26--){var _0x40eba0=_0x5db789[_0xbd6b26],_0x401aca=_0x14a2d5[_0x2be735][_0x40eba0],_0x5f05f6=_0x127ea9[_0x2be735][_0x40eba0];_0x140478[_0x4c8548(0x20c)]({'x':_0x2be735,'y':_0x40eba0,'value':_0x401aca,'radius':_0x5f05f6});}}return{'min':_0x32e9f4,'max':_0x5afc6c,'data':_0x140478};};function _0x389711(_0x28ccf0){var _0x26c8d9=_0x2fe8,_0x459ae4=_0x28ccf0[_0x26c8d9(0x1f4)],_0x378489=this[_0x26c8d9(0x22e)]=document[_0x26c8d9(_0x6ebfa2._0x2f2d41)](_0x26c8d9(0x1ef)),_0x37ded2=this[_0x26c8d9(_0x6ebfa2._0x5691c5)]=_0x28ccf0['canvas']||document['createElement']('canvas');this['_renderBoundaries']=[0x2710,0x2710,0x0,0x0];var _0x3ecf15=getComputedStyle(_0x28ccf0['container'])||{};_0x37ded2['className']=_0x26c8d9(0x1ff),this['_width']=_0x37ded2[_0x26c8d9(_0x6ebfa2._0x4608f3)]=_0x378489['width']=_0x28ccf0['width']||+_0x3ecf15['width']['replace'](/px/,''),this[_0x26c8d9(0x25b)]=_0x37ded2['height']=_0x378489['height']=_0x28ccf0['height']||+_0x3ecf15['height'][_0x26c8d9(0x226)](/px/,''),this['shadowCtx']=_0x378489['getContext']('2d',{'willReadFrequently':!![]}),this['ctx']=_0x37ded2[_0x26c8d9(0x211)]('2d',{'willReadFrequently':!![]}),_0x37ded2['style']['cssText']=_0x378489['style'][_0x26c8d9(_0x6ebfa2._0x487e5f)]=_0x26c8d9(0x209),_0x459ae4['style']['position']='relative',_0x459ae4['appendChild'](_0x37ded2),this['_palette']=_0x4cbea7(_0x28ccf0),this['_templates']={},this['_setStyles'](_0x28ccf0);}return _0x389711[_0x59e04d(_0x18b4df._0x4fe982)]={'renderPartial':function(_0x379c1a){var _0x59a76f=_0x59e04d;_0x379c1a[_0x59a76f(_0x4b01a3._0x3ef462)][_0x59a76f(0x219)]>0x0&&(this['_drawAlpha'](_0x379c1a),this['_colorize']());},'renderAll':function(_0x83995){var _0x5cc947=_0x59e04d;this['_clear'](),_0x83995[_0x5cc947(0x252)]['length']>0x0&&(this[_0x5cc947(_0x594ec9._0x3c5a0d)](_0xb05077(_0x83995)),this['_colorize']());},'_updateGradient':function(_0x4fb322){this['_palette']=_0x4cbea7(_0x4fb322);},'updateConfig':function(_0x4546d2){_0x4546d2['gradient']&&this['_updateGradient'](_0x4546d2),this['_setStyles'](_0x4546d2);},'setDimensions':function(_0x46b5e1,_0x3342ee){var _0x1f32a7=_0x59e04d;this[_0x1f32a7(0x220)]=_0x46b5e1,this['_height']=_0x3342ee,this['canvas'][_0x1f32a7(0x260)]=this[_0x1f32a7(_0x21cb72._0x1236a6)][_0x1f32a7(0x260)]=_0x46b5e1,this['canvas']['height']=this['shadowCanvas']['height']=_0x3342ee;},'_clear':function(){var _0x10cdfe=_0x59e04d;this['shadowCtx']['clearRect'](0x0,0x0,this[_0x10cdfe(_0x1e2b9c._0xc111ae)],this[_0x10cdfe(0x25b)]),this['ctx'][_0x10cdfe(0x232)](0x0,0x0,this['_width'],this['_height']);},'_setStyles':function(_0x12e4ea){var _0x382271=_0x59e04d;this['_blur']=_0x12e4ea['blur']==0x0?0x0:_0x12e4ea[_0x382271(0x1d9)]||_0x12e4ea[_0x382271(_0x21a866._0x4af68c)],_0x12e4ea['backgroundColor']&&(this['canvas']['style'][_0x382271(0x1f8)]=_0x12e4ea[_0x382271(0x1f8)]),this['_width']=this['canvas'][_0x382271(0x260)]=this['shadowCanvas']['width']=_0x12e4ea['width']||this[_0x382271(0x220)],this['_height']=this['canvas'][_0x382271(_0x21a866._0x261535)]=this[_0x382271(_0x21a866._0x154629)]['height']=_0x12e4ea['height']||this['_height'],this['_opacity']=(_0x12e4ea['opacity']||0x0)*0xff,this['_maxOpacity']=(_0x12e4ea['maxOpacity']||_0x12e4ea['defaultMaxOpacity'])*0xff,this['_minOpacity']=(_0x12e4ea['minOpacity']||_0x12e4ea['defaultMinOpacity'])*0xff,this['_useGradientOpacity']=!!_0x12e4ea[_0x382271(_0x21a866._0x599746)];},'_drawAlpha':function(_0x387734){var _0x876260=_0x59e04d,_0x53e87a=this[_0x876260(0x246)]=_0x387734['min'],_0x3cbaff=this['_max']=_0x387734['max'],_0x387734=_0x387734['data']||[],_0x216093=_0x387734['length'],_0x417d42=0x1-this[_0x876260(_0x27d335._0x59557a)];while(_0x216093--){var _0x17e06d=_0x387734[_0x216093],_0x547573=_0x17e06d['x'],_0x267fbe=_0x17e06d['y'],_0x2c513e=_0x17e06d['radius'],_0x5e1cf5=Math[_0x876260(0x254)](_0x17e06d['value'],_0x3cbaff),_0x10a616=_0x547573-_0x2c513e,_0x377b6f=_0x267fbe-_0x2c513e,_0x233745=this[_0x876260(0x200)],_0x22545b;!this['_templates'][_0x2c513e]?this['_templates'][_0x2c513e]=_0x22545b=_0x336eab(_0x2c513e,_0x417d42):_0x22545b=this['_templates'][_0x2c513e];var _0x5f3284=(_0x5e1cf5-_0x53e87a)/(_0x3cbaff-_0x53e87a);_0x233745['globalAlpha']=_0x5f3284<0.01?0.01:_0x5f3284,_0x233745['drawImage'](_0x22545b,_0x10a616,_0x377b6f),_0x10a616<this['_renderBoundaries'][0x0]&&(this['_renderBoundaries'][0x0]=_0x10a616),_0x377b6f<this[_0x876260(0x265)][0x1]&&(this['_renderBoundaries'][0x1]=_0x377b6f),_0x10a616+0x2*_0x2c513e>this['_renderBoundaries'][0x2]&&(this['_renderBoundaries'][0x2]=_0x10a616+0x2*_0x2c513e),_0x377b6f+0x2*_0x2c513e>this['_renderBoundaries'][0x3]&&(this['_renderBoundaries'][0x3]=_0x377b6f+0x2*_0x2c513e);}},'_colorize':function(){var _0x297078=_0x59e04d,_0x57bfbd=this[_0x297078(_0x16c157._0x2ba2fd)][0x0],_0x3c65eb=this['_renderBoundaries'][0x1],_0x11b3f7=this[_0x297078(0x265)][0x2]-_0x57bfbd,_0x4fd5cd=this['_renderBoundaries'][0x3]-_0x3c65eb,_0xeb9899=this['_width'],_0x4a716e=this[_0x297078(0x25b)],_0x7a8581=this['_opacity'],_0x35a539=this[_0x297078(0x206)],_0x100bd2=this['_minOpacity'],_0xaefcae=this['_useGradientOpacity'];_0x57bfbd<0x0&&(_0x57bfbd=0x0);_0x3c65eb<0x0&&(_0x3c65eb=0x0);_0x57bfbd+_0x11b3f7>_0xeb9899&&(_0x11b3f7=_0xeb9899-_0x57bfbd);_0x3c65eb+_0x4fd5cd>_0x4a716e&&(_0x4fd5cd=_0x4a716e-_0x3c65eb);var _0x35a356=this['shadowCtx'][_0x297078(_0x16c157._0xcbe509)](_0x57bfbd,_0x3c65eb,_0x11b3f7,_0x4fd5cd),_0x6dd68d=_0x35a356[_0x297078(0x252)],_0x4a80bc=_0x6dd68d['length'],_0xec6bbb=this['_palette'];for(var _0x48798a=0x3;_0x48798a<_0x4a80bc;_0x48798a+=0x4){var _0x28e2fd=_0x6dd68d[_0x48798a],_0x581253=_0x28e2fd*0x4;if(!_0x581253)continue;var _0xd08200;_0x7a8581>0x0?_0xd08200=_0x7a8581:_0x28e2fd<_0x35a539?_0x28e2fd<_0x100bd2?_0xd08200=_0x100bd2:_0xd08200=_0x28e2fd:_0xd08200=_0x35a539,_0x6dd68d[_0x48798a-0x3]=_0xec6bbb[_0x581253],_0x6dd68d[_0x48798a-0x2]=_0xec6bbb[_0x581253+0x1],_0x6dd68d[_0x48798a-0x1]=_0xec6bbb[_0x581253+0x2],_0x6dd68d[_0x48798a]=_0xaefcae?_0xec6bbb[_0x581253+0x3]:_0xd08200;}this[_0x297078(0x23c)]['putImageData'](_0x35a356,_0x57bfbd,_0x3c65eb),this[_0x297078(_0x16c157._0x2ba2fd)]=[0x3e8,0x3e8,0x0,0x0];},'getValueAt':function(_0x520816){var _0x1ab0f0=_0x59e04d,_0x257e88,_0x193a8d=this['shadowCtx'],_0x91f777=_0x193a8d['getImageData'](_0x520816['x'],_0x520816['y'],0x1,0x1),_0x1c1348=_0x91f777['data'][0x3],_0x15f8fe=this['_max'],_0x566062=this[_0x1ab0f0(0x246)];return _0x257e88=Math['abs'](_0x15f8fe-_0x566062)*(_0x1c1348/0xff)>>0x0,_0x257e88;},'getDataURL':function(){var _0x152300=_0x59e04d;return this[_0x152300(_0x8f0f80._0x2b757f)]['toDataURL']();}},_0x389711;}(),_0x5af0db=function _0x19d2a3(){var _0x2ab6dd=_0x2545e6,_0x3e0fcb=![];return _0x2d7e54[_0x2ab6dd(_0x45d29b._0x1ca625)]==='canvas2d'&&(_0x3e0fcb=_0x7afbec),_0x3e0fcb;}(),_0x458701={'merge':function(){var _0x174e97=_0x2545e6,_0x555f70={},_0xe9e718=arguments[_0x174e97(_0x579cd5._0x2f794)];for(var _0x43f326=0x0;_0x43f326<_0xe9e718;_0x43f326++){var _0xcbbdb2=arguments[_0x43f326];for(var _0x50af4e in _0xcbbdb2){_0x555f70[_0x50af4e]=_0xcbbdb2[_0x50af4e];}}return _0x555f70;}},_0x266d51=function _0x29c342(){var _0x41288d={_0x3a0cb5:0x22b,_0x17b8d6:0x24b},_0x884fdc={_0x3932b3:0x24b},_0x5923da={_0x1135fb:0x25e,_0x28586b:0x22a},_0x3dfa4c=function _0x1e7396(){function _0x468617(){this['cStore']={};}return _0x468617['prototype']={'on':function(_0x243148,_0x473ad2,_0x33b967){var _0x6ad823=this['cStore'];!_0x6ad823[_0x243148]&&(_0x6ad823[_0x243148]=[]),_0x6ad823[_0x243148]['push'](function(_0x203002){return _0x473ad2['call'](_0x33b967,_0x203002);});},'emit':function(_0x83ee7f,_0x52e344){var _0x4c7894=_0x2fe8,_0x1edfa6=this[_0x4c7894(0x207)];if(_0x1edfa6[_0x83ee7f]){var _0x59f1af=_0x1edfa6[_0x83ee7f]['length'];for(var _0x69a965=0x0;_0x69a965<_0x59f1af;_0x69a965++){var _0x1549c8=_0x1edfa6[_0x83ee7f][_0x69a965];_0x1549c8(_0x52e344);}}}},_0x468617;}(),_0x156423=function(_0x23c797){var _0x331d9b={_0x5cccb5:0x1e2},_0x227f33=_0x2fe8,_0x19fbe7=_0x23c797['_renderer'],_0x324850=_0x23c797[_0x227f33(0x25e)],_0xf5cbf1=_0x23c797['_store'];_0x324850['on'](_0x227f33(0x216),_0x19fbe7['renderPartial'],_0x19fbe7),_0x324850['on'](_0x227f33(_0x3c00ee._0x3b9a5a),_0x19fbe7[_0x227f33(_0x3c00ee._0x1a4fbc)],_0x19fbe7),_0x324850['on']('extremachange',function(_0x4832af){var _0x25960a=_0x227f33;_0x23c797['_config']['onExtremaChange']&&_0x23c797['_config']['onExtremaChange']({'min':_0x4832af['min'],'max':_0x4832af['max'],'gradient':_0x23c797['_config'][_0x25960a(_0x331d9b._0x5cccb5)]||_0x23c797[_0x25960a(0x204)]['defaultGradient']});}),_0xf5cbf1[_0x227f33(0x266)](_0x324850);};function _0x5ad960(){var _0x4f0450=_0x2fe8,_0x4a3285=this['_config']=_0x458701[_0x4f0450(0x230)](_0x2d7e54,arguments[0x0]||{});this[_0x4f0450(_0x5923da._0x1135fb)]=new _0x3dfa4c();if(_0x4a3285['plugin']){var _0x515099=_0x4a3285['plugin'];if(!_0x2d7e54['plugins'][_0x515099])throw new Error('Plugin\x20\x27'+_0x515099+_0x4f0450(_0x5923da._0x28586b));else{var _0xf71fed=_0x2d7e54['plugins'][_0x515099];this['_renderer']=new _0xf71fed[(_0x4f0450(0x25f))](_0x4a3285),this['_store']=new _0xf71fed['store'](_0x4a3285);}}else this['_renderer']=new _0x5af0db(_0x4a3285),this['_store']=new _0x39690e(_0x4a3285);_0x156423(this);}return _0x5ad960['prototype']={'addData':function(){return this['_store']['addData']['apply'](this['_store'],arguments),this;},'removeData':function(){return this['_store']['removeData']&&this['_store']['removeData']['apply'](this['_store'],arguments),this;},'setData':function(){var _0x4f455c=_0x2fe8;return this['_store']['setData']['apply'](this[_0x4f455c(0x24b)],arguments),this;},'setDataMax':function(){var _0x1bbd91=_0x2fe8;return this[_0x1bbd91(_0x3bb51c._0x4672ae)]['setDataMax']['apply'](this['_store'],arguments),this;},'setDataMin':function(){var _0x34fcac=_0x2fe8;return this[_0x34fcac(_0x884fdc._0x3932b3)]['setDataMin'][_0x34fcac(0x202)](this['_store'],arguments),this;},'configure':function(_0x270620){var _0x3c7706=_0x2fe8;return this['_config']=_0x458701['merge'](this['_config'],_0x270620),this['_renderer']['updateConfig'](this['_config']),this['_coordinator'][_0x3c7706(_0x41288d._0x3a0cb5)]('renderall',this[_0x3c7706(_0x41288d._0x17b8d6)][_0x3c7706(0x1f6)]()),this;},'repaint':function(){var _0x816694=_0x2fe8;return this['_coordinator'][_0x816694(_0x16407c._0x8b8cb9)]('renderall',this['_store'][_0x816694(_0x16407c._0x3004aa)]()),this;},'getData':function(){var _0x1efcc8=_0x2fe8;return this[_0x1efcc8(_0x38938e._0x5aea2c)][_0x1efcc8(0x1e8)]();},'getDataURL':function(){var _0x5b999e=_0x2fe8;return this['_renderer'][_0x5b999e(0x235)]();},'getValueAt':function(_0xb22fc5){var _0x31cbc7=_0x2fe8;if(this['_store']['getValueAt'])return this['_store']['getValueAt'](_0xb22fc5);else return this['_renderer']['getValueAt']?this[_0x31cbc7(_0x411b0d._0x3b5d8c)]['getValueAt'](_0xb22fc5):null;}},_0x5ad960;}(),_0x3ffa5d={'create':function(_0x342cd6){return new _0x266d51(_0x342cd6);},'register':function(_0x3794e6,_0x5c9e47){_0x2d7e54['plugins'][_0x3794e6]=_0x5c9e47;}};return _0x3ffa5d;}));}(heatmap$1));var heatmap=heatmap$1[_0x3eb2ff(0x231)],h337=_mergeNamespaces({'__proto__':null,'default':heatmap},[heatmap$1[_0x3eb2ff(0x231)]]),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 _0x9956(){var _0x811d30=['RenderState','rgb(255,255,255)','heatmap-canvas','shadowCtx','createElement','apply','lat','_config','3842110cKQedw','_maxOpacity','cStore','_graphic','position:absolute;left:0;top:0;','rgb(0,255,0)','image','push','removeLayer','radius','_scale','h337','getContext','style','positions','_last_mBounds','blue','renderpartial','graphic','removeGraphic','length','defaultRenderer','_rectangle','create','floor','lonlat2mercator','value','_width','configure','_heat','defaultBlur','RectanglePrimitive','_data','replace','diffHeight','gradientArc','valueField','\x27\x20not\x20found.\x20Maybe\x20it\x20was\x20not\x20registered.','emit','KEEP','xmax','shadowCanvas','parse','merge','exports','clearRect','_max','uniforms','getDataURL','PointTrans','REPLACE','_container','isFormat','_drawAlpha','HeatLayer','ctx','useGradientOpacity','getOwnPropertyDescriptor','prototype','420098VXYedH','addGraphic','_valueField','height','_getHeatCanvas','_map','_min','addLayer','toDataURL','VERTEX_FORMAT','beginPath','_store','21447RCBlMy','_renderer','6CIDXLm','rgb(0,0,0)','options','978324asJeST','data','setOptions','min','1928WmziHS','__esModule','remove','_blur','rectangle','renderAll','_height','renderall','maxCanvasSize','_coordinator','renderer','width','DomUtil','keys','addColorStop','6025560eOLDgZ','_renderBoundaries','setCoordinator','_updatePositionsHook','EPSG:3857','round','image/png','minCanvasSize','opacity','_addedHook','15235rLtjJV','xField','_radi','14krQmXG','arcBlurScale','blur','px;height:','clear','1219128GChRQO','arcDirection','PolyUtil','_layer','xmin','lng','gradient','heatStyle','cssText','fillStyle','_graphic2','_createArcGraphic','getData','isArray','green','ymin','createLinearGradient','Cesium','defaultGradient','canvas','getRectangle','show','get','width:','container','ymax','_getInternalData','getImageData','backgroundColor','_onExtremaChange','max','layer','div'];_0x9956=function(){return _0x811d30;};return _0x9956();}if(!heatmap$1['exports']['create'])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace[_0x3eb2ff(0x1ed)],BaseLayer=mars3d__namespace['layer']['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:_0x3eb2ff(0x215),0.6:_0x3eb2ff(0x1ea),0.8:'yellow',0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance'][_0x3eb2ff(0x249)]};class HeatLayer extends BaseLayer{constructor(_0x8a2d95={}){var _0x2dd648={_0x101f4d:0x25d,_0x40f6ec:0x1d1,_0x50b004:0x1fa,_0x6bf3d0:0x250},_0x5009b5=_0x3eb2ff;super(_0x8a2d95),this[_0x5009b5(0x250)][_0x5009b5(_0x2dd648._0x101f4d)]=this['options']['maxCanvasSize']??document['body']['clientWidth'],this['options']['maxCanvasSize']=Math['min'](this['options']['maxCanvasSize'],0x1388),this['options'][_0x5009b5(_0x2dd648._0x40f6ec)]=this['options']['minCanvasSize']??document['body']['clientHeight'],this['options'][_0x5009b5(0x1d1)]=Math[_0x5009b5(_0x2dd648._0x50b004)](this['options']['minCanvasSize'],0x2bc),this[_0x5009b5(0x250)][_0x5009b5(0x1e3)]={...DEF_HEATSTYLE,...this['options']['heatStyle']},this['options']['style']={...DEF_STYLE,...this[_0x5009b5(_0x2dd648._0x6bf3d0)]['style']};}get[_0x3eb2ff(0x1fb)](){return this['_layer'];}get[_0x3eb2ff(0x1e3)](){return this['options']['heatStyle'];}set['heatStyle'](_0x91f303){var _0x1deb25={_0x361bdf:0x1e3,_0xca2e91:0x230,_0x5299a6:0x221,_0x2db1b4:0x1e3,_0x52ab18:0x267},_0x584036=_0x3eb2ff;this[_0x584036(0x250)][_0x584036(_0x1deb25._0x361bdf)]=mars3d__namespace['Util'][_0x584036(_0x1deb25._0xca2e91)](this['options']['heatStyle'],_0x91f303),this['_heat']&&(this['_heat'][_0x584036(_0x1deb25._0x5299a6)](this[_0x584036(0x250)][_0x584036(_0x1deb25._0x2db1b4)]),this[_0x584036(_0x1deb25._0x52ab18)](!![]));}get['style'](){var _0x21dc67=_0x3eb2ff;return this['options'][_0x21dc67(0x212)];}set['style'](_0x1d098d){var _0x1b7716=_0x3eb2ff;this['options'][_0x1b7716(0x212)]=mars3d__namespace['Util']['merge'](this['options']['style'],_0x1d098d);}get[_0x3eb2ff(0x213)](){return this['_positions'];}set['positions'](_0x400c81){this['setPositions'](_0x400c81);}get['coordinates'](){const _0x49c664=[];return this['points']['forEach'](_0x457781=>{_0x49c664['push'](_0x457781['toArray']());}),_0x49c664;}get[_0x3eb2ff(0x259)](){var _0x22fcfa={_0x415ba0:0x21b},_0x339594=_0x3eb2ff;return this[_0x339594(_0x22fcfa._0x415ba0)];}['_setOptionsHook'](_0x2e5b98,_0x12443d){var _0x1abab5={_0x72142f:0x213},_0x5679d6=_0x3eb2ff;_0x2e5b98[_0x5679d6(0x213)]&&(this['positions']=_0x2e5b98[_0x5679d6(_0x1abab5._0x72142f)]);}['_mountedHook'](){var _0x1c8b46={_0x5397df:0x212,_0xf3ed7d:0x268},_0x597203=_0x3eb2ff;this[_0x597203(_0x1c8b46._0x5397df)]['type']===_0x597203(0x20b)?this['_layer']=new mars3d__namespace[(_0x597203(0x1fb))]['ImageLayer']({'crs':_0x597203(_0x1c8b46._0xf3ed7d),'private':!![]}):this['_layer']=new mars3d__namespace['layer']['GraphicLayer']({'private':!![]});}[_0x3eb2ff(0x1d3)](){var _0x2be1e6={_0x111d5c:0x247,_0x1628d8:0x261,_0x230ff6:0x1fc},_0x1dd961=_0x3eb2ff;this[_0x1dd961(0x245)][_0x1dd961(_0x2be1e6._0x111d5c)](this[_0x1dd961(0x1df)]),this['_container']=mars3d__namespace[_0x1dd961(_0x2be1e6._0x1628d8)]['create'](_0x1dd961(_0x2be1e6._0x230ff6),'mars3d-heatmap\x20mars3d-hideDiv',this['_map']['container']),this['options']['positions']&&(this['positions']=this['options'][_0x1dd961(0x213)]),this['options']['flyTo']&&this['flyToByAnimationEnd']();}['_removedHook'](){var _0x5032aa={_0x5c6083:0x261,_0x2aec29:0x257,_0x1a6fdd:0x1db,_0x154ffe:0x20d,_0x328a1a:0x1df},_0x5d00be=_0x3eb2ff;this[_0x5d00be(0x238)]&&(mars3d__namespace[_0x5d00be(_0x5032aa._0x5c6083)][_0x5d00be(_0x5032aa._0x2aec29)](this['_container']),delete this['_container']),this[_0x5d00be(_0x5032aa._0x1a6fdd)](),this[_0x5d00be(0x245)][_0x5d00be(_0x5032aa._0x154ffe)](this[_0x5d00be(_0x5032aa._0x328a1a)]);}['addPosition'](_0x12d3c4,_0xc34c2d){var _0x43533c=_0x3eb2ff;this['_positions']=this['_positions']||[],this['_positions'][_0x43533c(0x20c)](_0x12d3c4),this['_updatePositionsHook'](_0xc34c2d);}['setPositions'](_0x285f0b,_0x195831){this['_positions']=_0x285f0b,this['_updatePositionsHook'](_0x195831);}['clear'](){var _0x2649e9={_0x1d3625:0x218,_0x349b7f:0x208,_0x5a2156:0x1df},_0x1c3ad8=_0x3eb2ff;this[_0x1c3ad8(0x208)]&&(this['_layer'][_0x1c3ad8(_0x2649e9._0x1d3625)](this[_0x1c3ad8(_0x2649e9._0x349b7f)],!![]),delete this['_graphic']),this['_graphic2']&&(this[_0x1c3ad8(_0x2649e9._0x5a2156)]['removeGraphic'](this['_graphic2'],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x20f19c){var _0x2d627a={_0x18eb34:0x1f1,_0x35bd8e:0x20b,_0x2dc29a:0x253,_0x11343f:0x1d0,_0x47e326:0x1e7},_0x2b27b9=_0x3eb2ff;if(!this[_0x2b27b9(_0x2d627a._0x18eb34)]||!this['_map']||!this['positions']||this['positions']['length']===0x0)return this;const _0x385fa4=this[_0x2b27b9(0x244)]();if(this['style']['type']===_0x2b27b9(_0x2d627a._0x35bd8e))this[_0x2b27b9(0x1df)][_0x2b27b9(_0x2d627a._0x2dc29a)]({'url':_0x385fa4[_0x2b27b9(0x248)](_0x2b27b9(_0x2d627a._0x11343f),0x1),'rectangle':this['_rectangle'],'opacity':this['style'][_0x2b27b9(0x1d2)]});else this[_0x2b27b9(0x212)]['arc']?this['_graphic']&&_0x20f19c?(this['_graphic']['uniforms']['image']=_0x385fa4,this['_graphic']['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x385fa4,this[_0x2b27b9(0x1e6)][_0x2b27b9(0x234)]['bumpMap']=this['_graphic'][_0x2b27b9(0x234)]['bumpMap'])):this[_0x2b27b9(_0x2d627a._0x47e326)](_0x385fa4):this['_graphic']&&_0x20f19c?this['_graphic']['uniforms']['image']=_0x385fa4:this['_createGraphic'](_0x385fa4);return this;}['_createGraphic'](_0x2238d5){var _0x369569={_0x43be1e:0x250,_0x324666:0x241},_0x39b56=_0x3eb2ff;this['clear'](),this[_0x39b56(0x208)]=new mars3d__namespace['graphic'][(_0x39b56(0x224))]({...this[_0x39b56(_0x369569._0x43be1e)],'rectangle':this[_0x39b56(0x21b)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x2238d5},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x39b56(0x1df)][_0x39b56(_0x369569._0x324666)](this['_graphic']);}['_createArcGraphic'](_0x203d8f){var _0x1225bf={_0x40ade8:0x1db,_0x4692e2:0x1fd,_0x1e6a9c:0x22c,_0x400906:0x21d,_0x335577:0x227,_0x5b46d7:0x212,_0x1f39e9:0x212,_0x51e362:0x21b,_0x57e6bf:0x243,_0x18726b:0x241,_0x566323:0x250,_0x2a2f89:0x1df},_0x509315=_0x3eb2ff;this[_0x509315(_0x1225bf._0x40ade8)]();const _0x8ecf02=Cesium[_0x509315(_0x1225bf._0x4692e2)]['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation'][_0x509315(_0x1225bf._0x1e6a9c)],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation'][_0x509315(0x237)]},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation'][_0x509315(0x22c)],'zFail':Cesium['StencilOperation'][_0x509315(0x22c)],'zPass':Cesium['StencilOperation']['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x531133=Math[_0x509315(_0x1225bf._0x400906)](this[_0x509315(0x212)][_0x509315(_0x1225bf._0x335577)]??this['_mBoundsMax']*0.02)+0.1;this[_0x509315(_0x1225bf._0x5b46d7)]['diffHeight']&&delete this[_0x509315(_0x1225bf._0x1f39e9)]['diffHeight'];const _0xd95633=(this['style']['splitNum'],0x64);let _0x2a0662=Math['max'](this[_0x509315(_0x1225bf._0x51e362)][_0x509315(_0x1225bf._0x57e6bf)],this['_rectangle']['width']);this[_0x509315(0x212)]['granularity']=_0x2a0662/=_0xd95633;const _0x5eba14=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x203d8f,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x1ea04f=this['style'][_0x509315(0x1dd)]||0x1;this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x8ecf02,'material':_0x5eba14,'vertexShaderSource':getVertexShaderSource(_0x531133*_0x1ea04f)})}),this['_layer'][_0x509315(_0x1225bf._0x18726b)](this['_graphic']),this[_0x509315(0x212)]['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace[(_0x509315(0x217))]['RectanglePrimitive']({...this[_0x509315(_0x1225bf._0x566323)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x8ecf02,'material':_0x5eba14,'vertexShaderSource':getVertexShaderSource(-_0x531133)})}),this[_0x509315(_0x1225bf._0x2a2f89)][_0x509315(0x241)](this['_graphic2']));}[_0x3eb2ff(0x1f0)](_0x51ac65){var _0x3346f6={_0x2bc128:0x1de},_0x31ef99=_0x3eb2ff;return _0x51ac65!==null&&_0x51ac65!==void 0x0&&_0x51ac65[_0x31ef99(0x239)]&&this['_rectangle']?mars3d__namespace[_0x31ef99(_0x3346f6._0x2bc128)]['formatRectangle'](this['_rectangle']):this['_rectangle'];}[_0x3eb2ff(0x244)](){var _0x2ef897={_0x52e58d:0x1e0,_0x198b04:0x21f,_0x201f95:0x1e0,_0xe61dab:0x22d,_0x340a7d:0x214,_0x1d0819:0x214,_0x2fbed4:0x1f3,_0x16a215:0x222,_0x3e8011:0x1ef},_0xdd2b12={_0x32f334:0x21e,_0x4b0c4f:0x203,_0x1802a7:0x1e0},_0x7f70f8={_0x18e3ee:0x22f,_0x538894:0x1e1,_0x110bcc:0x1e1,_0x292c12:0x20c},_0xe725dc=_0x3eb2ff;const _0x5f14fa=this['_positions'],_0x4b1bf3=[];let _0x122593,_0x481afb,_0x4235e6,_0x323767;_0x5f14fa['forEach'](_0x469b48=>{var _0x24022d=_0x2fe8;const _0x43f1f0=mars3d__namespace['LngLatPoint'][_0x24022d(_0x7f70f8._0x18e3ee)](_0x469b48);if(!_0x43f1f0)return;_0x43f1f0['value']=_0x469b48['value']||0x1,!this[_0x24022d(0x250)]['rectangle']&&(_0x122593===undefined?(_0x122593=_0x43f1f0[_0x24022d(0x1e1)],_0x481afb=_0x43f1f0[_0x24022d(_0x7f70f8._0x538894)],_0x4235e6=_0x43f1f0[_0x24022d(0x203)],_0x323767=_0x43f1f0[_0x24022d(0x203)]):(_0x122593=Math['min'](_0x122593,_0x43f1f0[_0x24022d(_0x7f70f8._0x110bcc)]),_0x481afb=Math['max'](_0x481afb,_0x43f1f0[_0x24022d(0x1e1)]),_0x4235e6=Math['min'](_0x4235e6,_0x43f1f0['lat']),_0x323767=Math['max'](_0x323767,_0x43f1f0['lat']))),_0x4b1bf3[_0x24022d(_0x7f70f8._0x292c12)](_0x43f1f0);});_0x122593===_0x481afb&&(_0x122593-=0.000001,_0x481afb+=0.000001);_0x4235e6===_0x323767&&(_0x4235e6-=0.000001,_0x323767+=0.000001);let _0xd72220=this['options']['rectangle']||{'xmin':_0x122593,'xmax':_0x481afb,'ymin':_0x4235e6,'ymax':_0x323767};const _0x1b6c09=getMercatorBounds(_0xd72220),_0x40966d=Math['abs'](_0x1b6c09['xmax']-_0x1b6c09[_0xe725dc(0x1e0)]),_0x5aa1ca=Math['abs'](_0x1b6c09['ymax']-_0x1b6c09[_0xe725dc(0x1eb)]),_0xfd264c=Math['max'](_0x40966d,_0x5aa1ca),_0x18af41=Math[_0xe725dc(0x254)](_0x40966d,_0x5aa1ca);this['_mBoundsMax']=_0xfd264c;let _0x3b6b28=0x1;if(_0xfd264c>this['options']['maxCanvasSize'])_0x3b6b28=_0xfd264c/this['options']['maxCanvasSize'],_0x18af41/_0x3b6b28<this[_0xe725dc(0x250)]['minCanvasSize']&&(_0x3b6b28=_0x18af41/this['options']['minCanvasSize']);else _0x18af41<this[_0xe725dc(0x250)]['minCanvasSize']&&(_0x3b6b28=_0x18af41/this['options']['minCanvasSize'],_0xfd264c/_0x3b6b28>this['options']['maxCanvasSize']&&(_0x3b6b28=_0xfd264c/this[_0xe725dc(0x250)]['maxCanvasSize']));const _0x214433=this['heatStyle'][_0xe725dc(0x20e)]*1.5,_0x18a8ea=_0x40966d/_0x3b6b28+_0x214433*0x2,_0x24803a=_0x5aa1ca/_0x3b6b28+_0x214433*0x2,_0x1732b8=_0x214433*_0x3b6b28;_0x1b6c09[_0xe725dc(_0x2ef897._0x52e58d)]-=_0x1732b8,_0x1b6c09['ymin']-=_0x1732b8,_0x1b6c09['xmax']+=_0x1732b8,_0x1b6c09[_0xe725dc(0x1f5)]+=_0x1732b8,this['_scale']=_0x3b6b28,_0xd72220=geLatLngBounds(_0x1b6c09),this['_rectangle']=Cesium['Rectangle']['fromDegrees'](_0xd72220[_0xe725dc(_0x2ef897._0x52e58d)],_0xd72220['ymin'],_0xd72220['xmax'],_0xd72220['ymax']);let _0x5613fa=_0x4b1bf3[0x0][_0xe725dc(_0x2ef897._0x198b04)]??0x1,_0x20ab96=_0x4b1bf3[0x0]['value']??0x0;const _0x44a425=[];_0x4b1bf3['forEach'](_0x17a559=>{var _0x26e8cb=_0xe725dc;const _0x2d1055=mars3d__namespace['PointTrans'][_0x26e8cb(_0xdd2b12._0x32f334)]([_0x17a559['lng'],_0x17a559[_0x26e8cb(_0xdd2b12._0x4b0c4f)]]),_0x4b756f=_0x17a559['value']||0x1,_0x4e01df=Math[_0x26e8cb(0x1cf)]((_0x2d1055[0x0]-_0x1b6c09[_0x26e8cb(_0xdd2b12._0x1802a7)])/_0x3b6b28),_0x33f70c=Math['round']((_0x1b6c09['ymax']-_0x2d1055[0x1])/_0x3b6b28);_0x5613fa=Math['max'](_0x5613fa,_0x4b756f),_0x20ab96=Math['min'](_0x20ab96,_0x4b756f),_0x44a425['push']({'x':_0x4e01df,'y':_0x33f70c,'value':_0x4b756f});});const _0x3af336={'min':this['options']['min']??_0x20ab96,'max':this['options']['max']??_0x5613fa,'data':_0x44a425};this['_last_heatData']=_0x3af336;if(!this['_last_mBounds']||_0x1b6c09[_0xe725dc(_0x2ef897._0x201f95)]!==this['_last_mBounds']['xmin']||_0x1b6c09['ymin']!==this['_last_mBounds']['ymin']||_0x1b6c09[_0xe725dc(_0x2ef897._0xe61dab)]!==this[_0xe725dc(_0x2ef897._0x340a7d)]['xmax']||_0x1b6c09['ymax']!==this[_0xe725dc(_0x2ef897._0x1d0819)]['ymax']){this['_last_mBounds']=_0x1b6c09,this[_0xe725dc(0x238)]['style']['cssText']=_0xe725dc(_0x2ef897._0x2fbed4)+_0x18a8ea+_0xe725dc(0x1da)+_0x24803a+'px;';const _0x268b91={...this['heatStyle'],'container':this['_container']};!this['_heat']?this['_heat']=heatmap$1['exports']['create'](_0x268b91):this[_0xe725dc(_0x2ef897._0x16a215)]['configure'](_0x268b91);}this['_heat']['setData'](_0x3af336);const _0x2d0324=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer'][_0xe725dc(_0x2ef897._0x3e8011)]);return _0x2d0324;}['_getArcHeatCanvas'](){var _0xaba88b={_0x31a524:0x1e3,_0xbe6e7:0x1d8,_0x304a86:0x1ef,_0x2ec934:0x222},_0x4b2e01=_0x3eb2ff;this[_0x4b2e01(0x222)]['configure']({'radius':this[_0x4b2e01(_0xaba88b._0x31a524)]['radius']*this['style']['arcRadiusScale'],'blur':this['heatStyle']['blur']*this[_0x4b2e01(0x212)][_0x4b2e01(_0xaba88b._0xbe6e7)],'gradient':this[_0x4b2e01(_0xaba88b._0x31a524)][_0x4b2e01(0x228)]||{0.25:_0x4b2e01(0x24f),0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:_0x4b2e01(0x1fe)}});const _0x19d8ea=mars3d__namespace[_0x4b2e01(0x261)]['copyCanvas'](this['_heat']['_renderer'][_0x4b2e01(_0xaba88b._0x304a86)]);return this[_0x4b2e01(_0xaba88b._0x2ec934)]['configure'](this['options']['heatStyle']),_0x19d8ea;}['getPointData'](_0x4555a8){var _0x2dc69c={_0x42a3b2:0x21e,_0x2fcd2b:0x1e0},_0x24caa2=_0x3eb2ff;const _0x3948ce=mars3d__namespace['LngLatPoint']['parse'](_0x4555a8);if(!_0x3948ce)return{};const _0x2953f2=mars3d__namespace['PointTrans'][_0x24caa2(_0x2dc69c._0x42a3b2)]([_0x3948ce[_0x24caa2(0x1e1)],_0x3948ce['lat']]),_0x3e0cec=this['_last_mBounds'],_0x4a487c=Math[_0x24caa2(0x1cf)]((_0x2953f2[0x0]-_0x3e0cec[_0x24caa2(_0x2dc69c._0x2fcd2b)])/this[_0x24caa2(0x20f)]),_0xa5bcfe=Math[_0x24caa2(0x1cf)]((_0x3e0cec['ymax']-_0x2953f2[0x1])/this['_scale']),_0x367ac6=this['_heat']['getValueAt']({'x':_0x4a487c,'y':_0xa5bcfe}),_0x5011c7=this['_heat']['_renderer']['ctx']['getImageData'](_0x4a487c-0x1,_0xa5bcfe-0x1,0x1,0x1)['data'];return{'x':_0x4a487c,'y':_0xa5bcfe,'value':_0x367ac6,'color':'rgba('+_0x5011c7[0x0]+','+_0x5011c7[0x1]+','+_0x5011c7[0x2]+','+_0x5011c7[0x3]+')'};}}mars3d__namespace['LayerUtil']['register']('heat',HeatLayer),mars3d__namespace['layer'][_0x3eb2ff(0x23b)]=HeatLayer,mars3d__namespace['h337']=h337;function getMercatorBounds(_0x1c6ce0){var _0x26506a=_0x3eb2ff;const _0x4da95a=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x1c6ce0['xmin'],_0x1c6ce0[_0x26506a(0x1eb)]]),_0x4d06c0=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x1c6ce0['xmax'],_0x1c6ce0['ymax']]);return{'xmin':_0x4da95a[0x0],'ymin':_0x4da95a[0x1],'xmax':_0x4d06c0[0x0],'ymax':_0x4d06c0[0x1]};}function geLatLngBounds(_0x2f952e){var _0x352078={_0x37dc02:0x236,_0x4204c8:0x22d},_0x4beddf=_0x3eb2ff;const _0x366d75=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x2f952e['xmin'],_0x2f952e[_0x4beddf(0x1eb)]]),_0x55c157=mars3d__namespace[_0x4beddf(_0x352078._0x37dc02)]['mercator2lonlat']([_0x2f952e[_0x4beddf(_0x352078._0x4204c8)],_0x2f952e['ymax']]);return{'xmin':_0x366d75[0x0],'ymin':_0x366d75[0x1],'xmax':_0x55c157[0x0],'ymax':_0x55c157[0x1]};}function _0x2fe8(_0x3f2c4a,_0x20dc0e){var _0x99568f=_0x9956();return _0x2fe8=function(_0x2fe8f8,_0x390ed9){_0x2fe8f8=_0x2fe8f8-0x1cf;var _0x29c820=_0x99568f[_0x2fe8f8];return _0x29c820;},_0x2fe8(_0x3f2c4a,_0x20dc0e);}function getVertexShaderSource(_0x2365da){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'+_0x2365da+';\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[_0x3eb2ff(0x23b)]=HeatLayer,Object['defineProperty'](exports,_0x3eb2ff(0x256),{'value':!![]}); | ||
})); |
{ | ||
"name": "mars3d-heatmap", | ||
"version": "3.7.1", | ||
"version": "3.7.2", | ||
"description": "Mars3D平台插件,结合heatmap可视化功能插件", | ||
@@ -9,7 +9,5 @@ "main": "dist/mars3d-heatmap.js", | ||
], | ||
"peerDependencies": { | ||
"@mars3d/heatmap.js": "^2.0.7" | ||
}, | ||
"peerDependencies": {}, | ||
"devDependencies": { | ||
"mars3d": "~3.7.1" | ||
"mars3d": "~3.7.2" | ||
}, | ||
@@ -43,6 +41,3 @@ "scripts": { | ||
"globals": { | ||
"@turf/turf": "turf", | ||
"mars3d-cesium": "Cesium", | ||
"mars3d": "mars3d", | ||
"@mars3d/heatmap.js": "h337" | ||
"mars3d": "mars3d" | ||
}, | ||
@@ -49,0 +44,0 @@ "minify": "obfuscator" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Obfuscated code
Supply chain riskObfuscated files are intentionally packed to hide their behavior. This could be a sign of malware.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Obfuscated code
Supply chain riskObfuscated files are intentionally packed to hide their behavior. This could be a sign of malware.
Found 1 instance in 1 package
45089
0
173
1