mars3d-heatmap 3.6.12 → 3.6.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap
3
3
  *
4
- * 版本信息:v3.6.12
5
- * 编译日期:2023-11-13 20:56:14
4
+ * 版本信息:v3.6.14
5
+ * 编译日期:2023-11-27 22:14:18
6
6
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
7
7
  * 使用单位:免费公开版 ,2023-03-17
8
8
  */
@@ -11,5 +11,5 @@
11
11
  typeof define === 'function' && define.amd ? define(['exports', 'mars3d', '@mars3d/heatmap.js'], factory) :
12
12
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-heatmap"] = {}, global.mars3d, global.h337));
13
13
  })(this, (function (exports, mars3d, h337) {
14
- 'use strict';const _0x1192e4=_0x598f;function _0x598f(_0x347781,_0x3f68f2){const _0x586dc9=_0x586d();return _0x598f=function(_0x598fc6,_0x301f7c){_0x598fc6=_0x598fc6-0x7f;let _0x29d602=_0x586dc9[_0x598fc6];return _0x29d602;},_0x598f(_0x347781,_0x3f68f2);}(function(_0x3aa60c,_0x1a1bb7){const _0x471506={_0x33d535:0xc5,_0x403dcb:0x90,_0x54531e:0xc8},_0x345be4=_0x598f,_0x47d359=_0x3aa60c();while(!![]){try{const _0x192192=parseInt(_0x345be4(_0x471506._0x33d535))/0x1*(parseInt(_0x345be4(0xb5))/0x2)+parseInt(_0x345be4(_0x471506._0x403dcb))/0x3+parseInt(_0x345be4(0xa5))/0x4*(-parseInt(_0x345be4(0xb9))/0x5)+parseInt(_0x345be4(0xb6))/0x6*(-parseInt(_0x345be4(0xd1))/0x7)+-parseInt(_0x345be4(0xa3))/0x8*(-parseInt(_0x345be4(0xdd))/0x9)+-parseInt(_0x345be4(0xd8))/0xa+-parseInt(_0x345be4(_0x471506._0x54531e))/0xb*(parseInt(_0x345be4(0xd4))/0xc);if(_0x192192===_0x1a1bb7)break;else _0x47d359['push'](_0x47d359['shift']());}catch(_0x12f478){_0x47d359['push'](_0x47d359['shift']());}}}(_0x586d,0xf38d2));function _0x586d(){const _0x324623=['create','options','lng','2macfAK','102132FDUnxc','StencilFunction','EllipsoidSurfaceAppearance','527210FASpLl','Util','defineProperty','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','gradientArc','arcRadiusScale','body','style','__esModule','_getArcHeatCanvas','LayerUtil','positions','1945549ilmRBb','Material','canvas','33BfjozF','Cartesian2','_addedHook','_graphic','ymax','setData','push','xmin','ImageLayer','112naVMoO','uniforms','PointTrans','8179836pNeLJj','BaseLayer','maxCanvasSize','arc','1213950veNcVy','default','flyToByAnimationEnd','heatStyle','_map','18MzTMyP','register','cssText','forEach','_positions','_mBoundsMax','xmax','ymin','arcDirection','length','StencilOperation','clientHeight','getPointData','removeGraphic','_createGraphic','clear','RectanglePrimitive','merge','value','getRectangle','floor','_layer','isFormat','1947435xHFqld','minCanvasSize','lat','show','HeatLayer','div','_createArcGraphic','_getHeatCanvas','getValueAt','parse','layer','min','removeLayer','rgba(','copyCanvas','_last_mBounds','_graphic2','image','_renderer','4209928RWzWdA','bumpMap','8atMSws','max','_scale','_container','keys','_heat','EPSG:3857','heat','width:','configure','coordinates','rectangle','getOwnPropertyDescriptor'];_0x586d=function(){return _0x324623;};return _0x586d();}function _interopNamespace(_0x5186bd){const _0x40c780={_0x54719d:0xc1,_0x5f0385:0xb2,_0x34758a:0xa9,_0x39d4b5:0xd9},_0x3575dd=_0x598f;if(_0x5186bd&&_0x5186bd[_0x3575dd(_0x40c780._0x54719d)])return _0x5186bd;var _0x3e3d8a=Object[_0x3575dd(_0x40c780._0x5f0385)](null);return _0x5186bd&&Object[_0x3575dd(_0x40c780._0x34758a)](_0x5186bd)[_0x3575dd(0xe0)](function(_0x1b1446){const _0x47c664=_0x3575dd;if(_0x1b1446!=='default'){var _0x347141=Object[_0x47c664(0xb1)](_0x5186bd,_0x1b1446);Object['defineProperty'](_0x3e3d8a,_0x1b1446,_0x347141['get']?_0x347141:{'enumerable':!![],'get':function(){return _0x5186bd[_0x1b1446];}});}}),_0x3e3d8a[_0x3575dd(_0x40c780._0x39d4b5)]=_0x5186bd,_0x3e3d8a;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial=_0x1192e4(0xbc);if(!h337__namespace['create'])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer'][_0x1192e4(0xd5)],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(_0x3b851b={}){const _0x372d1e={_0x4a6abf:0xd6,_0x518ea5:0xb3,_0x25f9f3:0x91,_0x4ee3f1:0xbf,_0x5e2b5b:0x84,_0x2f850e:0xb3,_0x159ace:0xa6,_0x4ddb15:0xc0},_0x25b04f=_0x1192e4;super(_0x3b851b),this['options'][_0x25b04f(_0x372d1e._0x4a6abf)]=this[_0x25b04f(_0x372d1e._0x518ea5)]['maxCanvasSize']??document['body']['clientWidth'],this['options'][_0x25b04f(0xd6)]=Math['min'](this['options']['maxCanvasSize'],0x1388),this[_0x25b04f(0xb3)]['minCanvasSize']=this[_0x25b04f(0xb3)][_0x25b04f(_0x372d1e._0x25f9f3)]??document[_0x25b04f(_0x372d1e._0x4ee3f1)][_0x25b04f(_0x372d1e._0x5e2b5b)],this[_0x25b04f(_0x372d1e._0x2f850e)][_0x25b04f(0x91)]=Math[_0x25b04f(_0x372d1e._0x159ace)](this['options']['minCanvasSize'],0x2bc),this['options']['heatStyle']={...DEF_HEATSTYLE,...this['options']['heatStyle']},this['options'][_0x25b04f(0xc0)]={...DEF_STYLE,...this['options'][_0x25b04f(_0x372d1e._0x4ddb15)]};}get['layer'](){const _0x2b692d={_0x11fa37:0x8e},_0x335dc3=_0x1192e4;return this[_0x335dc3(_0x2b692d._0x11fa37)];}get['heatStyle'](){const _0x1ffcb8={_0x5e2de9:0xb3,_0x582e05:0xdb},_0x2a62d5=_0x1192e4;return this[_0x2a62d5(_0x1ffcb8._0x5e2de9)][_0x2a62d5(_0x1ffcb8._0x582e05)];}set['heatStyle'](_0xcbabb0){const _0x1fd062={_0x19dbed:0xba},_0x4e57b8=_0x1192e4;this['options']['heatStyle']=mars3d__namespace[_0x4e57b8(_0x1fd062._0x19dbed)]['merge'](this['options']['heatStyle'],_0xcbabb0),this['_heat']&&(this['_heat']['configure'](this['options'][_0x4e57b8(0xdb)]),this['_updatePositionsHook'](!![]));}get['style'](){const _0x365141={_0x43f848:0xb3},_0x10fec1=_0x1192e4;return this[_0x10fec1(_0x365141._0x43f848)]['style'];}set['style'](_0x5e2708){const _0x480b12={_0x2e8b8f:0x8a,_0x6d27ee:0xb3},_0x26858d=_0x1192e4;this['options']['style']=mars3d__namespace[_0x26858d(0xba)][_0x26858d(_0x480b12._0x2e8b8f)](this[_0x26858d(_0x480b12._0x6d27ee)]['style'],_0x5e2708);}get['positions'](){return this['_positions'];}set['positions'](_0x22e1bb){this['setPositions'](_0x22e1bb);}get[_0x1192e4(0xaf)](){const _0x403d47=[];return this['points']['forEach'](_0x4d399=>{_0x403d47['push'](_0x4d399['toArray']());}),_0x403d47;}get[_0x1192e4(0xb0)](){return this['_rectangle'];}['_setOptionsHook'](_0xebbb04,_0x254e37){const _0x445e30={_0x2365ed:0xc4},_0x4c0919=_0x1192e4;_0xebbb04['positions']&&(this['positions']=_0xebbb04[_0x4c0919(_0x445e30._0x2365ed)]);}['_mountedHook'](){const _0x1ae980={_0xf4c139:0x8e,_0x12b122:0x9a},_0x1efcdf=_0x1192e4;this[_0x1efcdf(0xc0)]['type']==='image'?this[_0x1efcdf(_0x1ae980._0xf4c139)]=new mars3d__namespace['layer'][(_0x1efcdf(0xd0))]({'crs':_0x1efcdf(0xab),'private':!![]}):this[_0x1efcdf(0x8e)]=new mars3d__namespace[(_0x1efcdf(_0x1ae980._0x12b122))]['GraphicLayer']({'private':!![]});}[_0x1192e4(0xca)](){const _0x8fbde2={_0x19ef54:0x95,_0x2bb3cc:0xb3},_0x638271=_0x1192e4;this['_map']['addLayer'](this['_layer']),this[_0x638271(0xa8)]=mars3d__namespace['DomUtil']['create'](_0x638271(_0x8fbde2._0x19ef54),'mars3d-heatmap\x20mars3d-hideDiv',this['_map']['container']),this[_0x638271(0xb3)]['positions']&&(this['positions']=this['options'][_0x638271(0xc4)]),this[_0x638271(_0x8fbde2._0x2bb3cc)]['flyTo']&&this[_0x638271(0xda)]();}['_removedHook'](){const _0x2b4b9c=_0x1192e4;this['_container']&&(mars3d__namespace['DomUtil']['remove'](this['_container']),delete this[_0x2b4b9c(0xa8)]),this['clear'](),this['_map'][_0x2b4b9c(0x9c)](this['_layer']);}['addPosition'](_0x1262b1,_0x3362e0){const _0x24ec37=_0x1192e4;this[_0x24ec37(0xe1)]=this[_0x24ec37(0xe1)]||[],this['_positions'][_0x24ec37(0xce)](_0x1262b1),this['_updatePositionsHook'](_0x3362e0);}['setPositions'](_0x22c4e1,_0x142d25){const _0x36bc0f={_0x382a23:0xe1},_0x5f27aa=_0x1192e4;this[_0x5f27aa(_0x36bc0f._0x382a23)]=_0x22c4e1,this['_updatePositionsHook'](_0x142d25);}['clear'](){const _0x35a257={_0x25b1d1:0xcb,_0x4d554f:0x8e,_0x50c972:0x86},_0x172eff=_0x1192e4;this[_0x172eff(_0x35a257._0x25b1d1)]&&(this[_0x172eff(_0x35a257._0x4d554f)][_0x172eff(_0x35a257._0x50c972)](this[_0x172eff(0xcb)],!![]),delete this['_graphic']),this['_graphic2']&&(this[_0x172eff(0x8e)]['removeGraphic'](this['_graphic2'],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x13d176){const _0x24ac43={_0x14b1ab:0x93,_0x424bd9:0x8e,_0x2e9f2b:0xd7,_0x290f54:0xcb,_0x4edd94:0xc2,_0x5b724c:0xa0,_0x568ec1:0xa1,_0x871466:0x96,_0xd6a02f:0xd2},_0x4ba339=_0x1192e4;if(!this[_0x4ba339(_0x24ac43._0x14b1ab)]||!this[_0x4ba339(0xdc)]||!this['positions']||this['positions'][_0x4ba339(0x82)]===0x0)return this;const _0x5cfbea=this[_0x4ba339(0x97)]();if(this['style']['type']==='image')this[_0x4ba339(_0x24ac43._0x424bd9)]['setOptions']({'url':_0x5cfbea['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style'][_0x4ba339(_0x24ac43._0x2e9f2b)]?this['_graphic']&&_0x13d176?(this['_graphic']['uniforms']['image']=_0x5cfbea,this[_0x4ba339(_0x24ac43._0x290f54)]['uniforms']['bumpMap']=this[_0x4ba339(_0x24ac43._0x4edd94)](),this[_0x4ba339(_0x24ac43._0x5b724c)]&&(this['_graphic2'][_0x4ba339(0xd2)][_0x4ba339(_0x24ac43._0x568ec1)]=_0x5cfbea,this['_graphic2'][_0x4ba339(0xd2)]['bumpMap']=this['_graphic']['uniforms'][_0x4ba339(0xa4)])):this[_0x4ba339(_0x24ac43._0x871466)](_0x5cfbea):this['_graphic']&&_0x13d176?this['_graphic'][_0x4ba339(_0x24ac43._0xd6a02f)]['image']=_0x5cfbea:this[_0x4ba339(0x87)](_0x5cfbea);return this;}['_createGraphic'](_0x436649){const _0x422479={_0x3452e1:0x88,_0x5715b5:0xb3,_0x294898:0xb8,_0x3e28c5:0xc6,_0x507a8c:0x8e},_0xfe72c6=_0x1192e4;this[_0xfe72c6(_0x422479._0x3452e1)](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0xfe72c6(_0x422479._0x5715b5)],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0xfe72c6(_0x422479._0x294898))]({'material':new Cesium[(_0xfe72c6(_0x422479._0x3e28c5))]({'fabric':{'uniforms':{'image':_0x436649},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0xfe72c6(_0x422479._0x507a8c)]['addGraphic'](this['_graphic']);}['_createArcGraphic'](_0x30fa53){const _0x1b8be5={_0x18fbe4:0xb7,_0x4cd28d:0xc6,_0x2e9f9d:0xc9,_0x4399f2:0xc2,_0x58488b:0xc0,_0x2b5008:0xb8,_0x8e6fd:0xa0,_0xbfb7ca:0x89},_0x6ce040=_0x1192e4;this['clear']();const _0x3a0525=Cesium['RenderState']['fromCache']({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium[_0x6ce040(_0x1b8be5._0x18fbe4)]['ALWAYS'],'backOperation':{'fail':Cesium[_0x6ce040(0x83)]['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium[_0x6ce040(0x83)]['REPLACE']},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState']['ALPHA_BLEND']}),_0x27d1bf=Math[_0x6ce040(0x8d)](this['style']['diffHeight']??this['_mBoundsMax']*0.02)+0.1;this['style']['diffHeight']&&delete this['style']['diffHeight'];const _0x14a538=(this['style']['splitNum'],0x64);let _0x58670a=Math['max'](this['_rectangle']['height'],this['_rectangle']['width']);this['style']['granularity']=_0x58670a/=_0x14a538;const _0x43e49e=new Cesium[(_0x6ce040(_0x1b8be5._0x4cd28d))]({'fabric':{'uniforms':{'image':_0x30fa53,'repeat':new Cesium[(_0x6ce040(_0x1b8be5._0x2e9f9d))](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this[_0x6ce040(_0x1b8be5._0x4399f2)]()},'source':HeatMaterial},'translucent':!![]}),_0x377bd5=this[_0x6ce040(_0x1b8be5._0x58488b)]['arcDirection']||0x1;this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x6ce040(_0x1b8be5._0x2b5008))]({'flat':!![],'aboveGround':!![],'renderState':_0x3a0525,'material':_0x43e49e,'vertexShaderSource':getVertexShaderSource(_0x27d1bf*_0x377bd5)})}),this['_layer']['addGraphic'](this['_graphic']),this['style'][_0x6ce040(0x81)]===0x0&&(this[_0x6ce040(_0x1b8be5._0x8e6fd)]=new mars3d__namespace['graphic'][(_0x6ce040(_0x1b8be5._0xbfb7ca))]({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x3a0525,'material':_0x43e49e,'vertexShaderSource':getVertexShaderSource(-_0x27d1bf)})}),this['_layer']['addGraphic'](this['_graphic2']));}[_0x1192e4(0x8c)](_0x8d8e7f){const _0x2ffc9a={_0x2ac34f:0x8f},_0x23c09b=_0x1192e4;return _0x8d8e7f!==null&&_0x8d8e7f!==void 0x0&&_0x8d8e7f[_0x23c09b(_0x2ffc9a._0x2ac34f)]&&this['_rectangle']?mars3d__namespace['PolyUtil']['formatRectangle'](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x486b04={_0x54c1ec:0x9b,_0x19f3bf:0xe2,_0x3ff190:0x80,_0x2c3a26:0xcf,_0x233d50:0x9f,_0x598c01:0xcc,_0x8a3079:0xa8,_0x3e7a44:0xad,_0x3f8df5:0xaa,_0x462f44:0xcd},_0x15cd21={_0xd2ae99:0xb4},_0x2488c4=_0x1192e4,_0x106491=this['_positions'],_0x40e652=[];let _0x572f1c,_0x219590,_0xd50aaf,_0x42134a;_0x106491['forEach'](_0x9a0b53=>{const _0x50e150=_0x598f,_0x212aaf=mars3d__namespace['LngLatPoint'][_0x50e150(0x99)](_0x9a0b53);if(!_0x212aaf)return;_0x212aaf[_0x50e150(0x8b)]=_0x9a0b53['value']||0x1,!this['options']['rectangle']&&(_0x572f1c===undefined?(_0x572f1c=_0x212aaf['lng'],_0x219590=_0x212aaf['lng'],_0xd50aaf=_0x212aaf['lat'],_0x42134a=_0x212aaf['lat']):(_0x572f1c=Math['min'](_0x572f1c,_0x212aaf['lng']),_0x219590=Math[_0x50e150(0xa6)](_0x219590,_0x212aaf['lng']),_0xd50aaf=Math['min'](_0xd50aaf,_0x212aaf[_0x50e150(0x92)]),_0x42134a=Math['max'](_0x42134a,_0x212aaf['lat']))),_0x40e652['push'](_0x212aaf);});_0x572f1c===_0x219590&&(_0x572f1c-=0.000001,_0x219590+=0.000001);_0xd50aaf===_0x42134a&&(_0xd50aaf-=0.000001,_0x42134a+=0.000001);let _0x5a69ae=this['options'][_0x2488c4(0xb0)]||{'xmin':_0x572f1c,'xmax':_0x219590,'ymin':_0xd50aaf,'ymax':_0x42134a};const _0x3914a8=getMercatorBounds(_0x5a69ae),_0x427d05=Math['abs'](_0x3914a8['xmax']-_0x3914a8['xmin']),_0x579baf=Math['abs'](_0x3914a8['ymax']-_0x3914a8['ymin']),_0x44ddf4=Math['max'](_0x427d05,_0x579baf),_0x2de1f6=Math[_0x2488c4(_0x486b04._0x54c1ec)](_0x427d05,_0x579baf);this[_0x2488c4(_0x486b04._0x19f3bf)]=_0x44ddf4;let _0x369b91=0x1;if(_0x44ddf4>this['options']['maxCanvasSize'])_0x369b91=_0x44ddf4/this['options']['maxCanvasSize'],_0x2de1f6/_0x369b91<this['options']['minCanvasSize']&&(_0x369b91=_0x2de1f6/this['options']['minCanvasSize']);else _0x2de1f6<this['options']['minCanvasSize']&&(_0x369b91=_0x2de1f6/this['options'][_0x2488c4(0x91)],_0x44ddf4/_0x369b91>this['options'][_0x2488c4(0xd6)]&&(_0x369b91=_0x44ddf4/this['options']['maxCanvasSize']));const _0x15da41=this['heatStyle']['radius']*1.5,_0x404faf=_0x427d05/_0x369b91+_0x15da41*0x2,_0x45bd21=_0x579baf/_0x369b91+_0x15da41*0x2,_0x96d06a=_0x15da41*_0x369b91;_0x3914a8['xmin']-=_0x96d06a,_0x3914a8[_0x2488c4(_0x486b04._0x3ff190)]-=_0x96d06a,_0x3914a8['xmax']+=_0x96d06a,_0x3914a8[_0x2488c4(0xcc)]+=_0x96d06a,this[_0x2488c4(0xa7)]=_0x369b91,_0x5a69ae=geLatLngBounds(_0x3914a8),this['_rectangle']=Cesium['Rectangle']['fromDegrees'](_0x5a69ae[_0x2488c4(_0x486b04._0x2c3a26)],_0x5a69ae['ymin'],_0x5a69ae['xmax'],_0x5a69ae['ymax']);let _0x5723bb=_0x40e652[0x0]['value']??0x1,_0x1e08b7=_0x40e652[0x0]['value']??0x0;const _0x3e6198=[];_0x40e652['forEach'](_0x458983=>{const _0x6e095=_0x2488c4,_0x390dfb=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x458983[_0x6e095(_0x15cd21._0xd2ae99)],_0x458983['lat']]),_0x669eb6=_0x458983['value']||0x1,_0x5d78b4=Math['round']((_0x390dfb[0x0]-_0x3914a8['xmin'])/_0x369b91),_0x1958fa=Math['round']((_0x3914a8['ymax']-_0x390dfb[0x1])/_0x369b91);_0x5723bb=Math['max'](_0x5723bb,_0x669eb6),_0x1e08b7=Math['min'](_0x1e08b7,_0x669eb6),_0x3e6198['push']({'x':_0x5d78b4,'y':_0x1958fa,'value':_0x669eb6});});const _0x2444e0={'min':this['options'][_0x2488c4(0x9b)]??_0x1e08b7,'max':this['options']['max']??_0x5723bb,'data':_0x3e6198};this['_last_heatData']=_0x2444e0;if(!this[_0x2488c4(0x9f)]||_0x3914a8['xmin']!==this[_0x2488c4(_0x486b04._0x233d50)]['xmin']||_0x3914a8['ymin']!==this['_last_mBounds']['ymin']||_0x3914a8['xmax']!==this['_last_mBounds']['xmax']||_0x3914a8[_0x2488c4(_0x486b04._0x598c01)]!==this['_last_mBounds']['ymax']){this['_last_mBounds']=_0x3914a8,this[_0x2488c4(_0x486b04._0x8a3079)]['style'][_0x2488c4(0xdf)]=_0x2488c4(_0x486b04._0x3e7a44)+_0x404faf+'px;height:'+_0x45bd21+'px;';const _0x5b853b={...this['heatStyle'],'container':this[_0x2488c4(_0x486b04._0x8a3079)]};!this[_0x2488c4(_0x486b04._0x3f8df5)]?this[_0x2488c4(0xaa)]=h337__namespace['create'](_0x5b853b):this[_0x2488c4(0xaa)]['configure'](_0x5b853b);}this['_heat'][_0x2488c4(_0x486b04._0x462f44)](_0x2444e0);const _0x398b47=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return _0x398b47;}[_0x1192e4(0xc2)](){const _0x1f9a4e={_0x262934:0xaa,_0x3704c4:0xbe,_0x183007:0xbd,_0x36ad82:0x9e,_0x1d86f7:0xc7},_0x400576=_0x1192e4;this[_0x400576(_0x1f9a4e._0x262934)]['configure']({'radius':this['heatStyle']['radius']*this['style'][_0x400576(_0x1f9a4e._0x3704c4)],'blur':this['heatStyle']['blur']*this['style']['arcBlurScale'],'gradient':this['heatStyle'][_0x400576(_0x1f9a4e._0x183007)]||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x26480f=mars3d__namespace['DomUtil'][_0x400576(_0x1f9a4e._0x36ad82)](this['_heat'][_0x400576(0xa2)][_0x400576(_0x1f9a4e._0x1d86f7)]);return this['_heat'][_0x400576(0xae)](this['options']['heatStyle']),_0x26480f;}[_0x1192e4(0x85)](_0x1c9f9c){const _0x36e194={_0x6126f3:0xb4,_0x29daf0:0xcf,_0x5c596e:0x98},_0x55cfef=_0x1192e4,_0xb9061d=mars3d__namespace['LngLatPoint']['parse'](_0x1c9f9c);if(!_0xb9061d)return{};const _0x22cf53=mars3d__namespace['PointTrans']['lonlat2mercator']([_0xb9061d[_0x55cfef(_0x36e194._0x6126f3)],_0xb9061d[_0x55cfef(0x92)]]),_0x25d6ab=this['_last_mBounds'],_0x970f36=Math['round']((_0x22cf53[0x0]-_0x25d6ab[_0x55cfef(_0x36e194._0x29daf0)])/this['_scale']),_0x3744e8=Math['round']((_0x25d6ab['ymax']-_0x22cf53[0x1])/this['_scale']),_0x4790b3=this['_heat'][_0x55cfef(_0x36e194._0x5c596e)]({'x':_0x970f36,'y':_0x3744e8}),_0x20bcc6=this['_heat']['_renderer']['ctx']['getImageData'](_0x970f36-0x1,_0x3744e8-0x1,0x1,0x1)['data'];return{'x':_0x970f36,'y':_0x3744e8,'value':_0x4790b3,'color':_0x55cfef(0x9d)+_0x20bcc6[0x0]+','+_0x20bcc6[0x1]+','+_0x20bcc6[0x2]+','+_0x20bcc6[0x3]+')'};}}mars3d__namespace[_0x1192e4(0xc3)][_0x1192e4(0xde)](_0x1192e4(0xac),HeatLayer),mars3d__namespace['layer'][_0x1192e4(0x94)]=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x46baa5){const _0x38f34c={_0x2adf97:0xd3,_0x56f2ea:0xd3},_0x5877d8=_0x1192e4,_0xa41642=mars3d__namespace[_0x5877d8(_0x38f34c._0x2adf97)]['lonlat2mercator']([_0x46baa5[_0x5877d8(0xcf)],_0x46baa5['ymin']]),_0xfd7a36=mars3d__namespace[_0x5877d8(_0x38f34c._0x56f2ea)]['lonlat2mercator']([_0x46baa5[_0x5877d8(0x7f)],_0x46baa5['ymax']]);return{'xmin':_0xa41642[0x0],'ymin':_0xa41642[0x1],'xmax':_0xfd7a36[0x0],'ymax':_0xfd7a36[0x1]};}function geLatLngBounds(_0x47125d){const _0x14ce35={_0x4850ff:0xd3,_0x59407e:0xcc},_0x425be7=_0x1192e4,_0x2e1a3c=mars3d__namespace[_0x425be7(_0x14ce35._0x4850ff)]['mercator2lonlat']([_0x47125d['xmin'],_0x47125d['ymin']]),_0x389bbf=mars3d__namespace['PointTrans']['mercator2lonlat']([_0x47125d['xmax'],_0x47125d[_0x425be7(_0x14ce35._0x59407e)]]);return{'xmin':_0x2e1a3c[0x0],'ymin':_0x2e1a3c[0x1],'xmax':_0x389bbf[0x0],'ymax':_0x389bbf[0x1]};}function getVertexShaderSource(_0x5561aa){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'+_0x5561aa+';\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[_0x1192e4(0x94)]=HeatLayer,Object[_0x1192e4(0xbb)](exports,'__esModule',{'value':!![]});
14
+ 'use strict';const _0x165c22=_0x18a4;(function(_0x8be27d,_0x1de568){const _0x16975c={_0x4bfd37:0x11d,_0x1d5ac2:0x111,_0x2c08f3:0x125,_0xf00de5:0xf2,_0x5a316b:0xff,_0x4af6be:0x11a,_0xfe5902:0x11c},_0x39c2e6=_0x18a4,_0x226b2f=_0x8be27d();while(!![]){try{const _0x4b8614=parseInt(_0x39c2e6(_0x16975c._0x4bfd37))/0x1+-parseInt(_0x39c2e6(_0x16975c._0x1d5ac2))/0x2*(parseInt(_0x39c2e6(0x126))/0x3)+-parseInt(_0x39c2e6(0x128))/0x4+-parseInt(_0x39c2e6(_0x16975c._0x2c08f3))/0x5*(-parseInt(_0x39c2e6(_0x16975c._0xf00de5))/0x6)+parseInt(_0x39c2e6(_0x16975c._0x5a316b))/0x7+parseInt(_0x39c2e6(0xf0))/0x8*(parseInt(_0x39c2e6(0x129))/0x9)+-parseInt(_0x39c2e6(_0x16975c._0x4af6be))/0xa*(parseInt(_0x39c2e6(_0x16975c._0xfe5902))/0xb);if(_0x4b8614===_0x1de568)break;else _0x226b2f['push'](_0x226b2f['shift']());}catch(_0x17f710){_0x226b2f['push'](_0x226b2f['shift']());}}}(_0x1841,0xf17fd));function _interopNamespace(_0x2439fe){const _0x5f5d5c=_0x18a4;if(_0x2439fe&&_0x2439fe['__esModule'])return _0x2439fe;var _0x2d12d3=Object['create'](null);return _0x2439fe&&Object[_0x5f5d5c(0x13e)](_0x2439fe)['forEach'](function(_0x4b10e1){const _0x379210=_0x5f5d5c;if(_0x4b10e1!=='default'){var _0x1dacf0=Object['getOwnPropertyDescriptor'](_0x2439fe,_0x4b10e1);Object['defineProperty'](_0x2d12d3,_0x4b10e1,_0x1dacf0[_0x379210(0x120)]?_0x1dacf0:{'enumerable':!![],'get':function(){return _0x2439fe[_0x4b10e1];}});}}),_0x2d12d3['default']=_0x2439fe,_0x2d12d3;}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');function _0x18a4(_0x103529,_0x4415aa){const _0x1841bb=_0x1841();return _0x18a4=function(_0x18a410,_0x133279){_0x18a410=_0x18a410-0xeb;let _0x46cada=_0x1841bb[_0x18a410];return _0x46cada;},_0x18a4(_0x103529,_0x4415aa);}const Cesium=mars3d__namespace[_0x165c22(0x140)],BaseLayer=mars3d__namespace['layer'][_0x165c22(0x108)],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:'blue',0.6:_0x165c22(0x10e),0.8:'yellow',0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium[_0x165c22(0x13b)][_0x165c22(0x11f)]};class HeatLayer extends BaseLayer{constructor(_0x29b668={}){const _0x5b4b07={_0x43a6e5:0x10f,_0x9d381a:0x10f,_0x3ff128:0xfe},_0x4f2e1c=_0x165c22;super(_0x29b668),this['options']['maxCanvasSize']=this['options']['maxCanvasSize']??document['body'][_0x4f2e1c(0x100)],this[_0x4f2e1c(_0x5b4b07._0x43a6e5)][_0x4f2e1c(0xef)]=Math[_0x4f2e1c(0xee)](this[_0x4f2e1c(_0x5b4b07._0x9d381a)][_0x4f2e1c(0xef)],0x1388),this[_0x4f2e1c(0x10f)]['minCanvasSize']=this['options'][_0x4f2e1c(_0x5b4b07._0x3ff128)]??document['body']['clientHeight'],this['options']['minCanvasSize']=Math['max'](this['options'][_0x4f2e1c(0xfe)],0x2bc),this[_0x4f2e1c(_0x5b4b07._0x9d381a)][_0x4f2e1c(0x132)]={...DEF_HEATSTYLE,...this['options']['heatStyle']},this['options']['style']={...DEF_STYLE,...this['options']['style']};}get['layer'](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set[_0x165c22(0x132)](_0x277986){const _0x40d6da={_0x3fb05f:0x10f},_0x41d9c6=_0x165c22;this[_0x41d9c6(0x10f)]['heatStyle']=mars3d__namespace[_0x41d9c6(0x13f)]['merge'](this['options']['heatStyle'],_0x277986),this['_heat']&&(this['_heat']['configure'](this[_0x41d9c6(_0x40d6da._0x3fb05f)]['heatStyle']),this['_updatePositionsHook'](!![]));}get['style'](){return this['options']['style'];}set[_0x165c22(0x138)](_0xeb690d){const _0x564b5f={_0xf1685b:0x13f},_0x59b9e6=_0x165c22;this['options'][_0x59b9e6(0x138)]=mars3d__namespace[_0x59b9e6(_0x564b5f._0xf1685b)]['merge'](this['options']['style'],_0xeb690d);}get['positions'](){return this['_positions'];}set['positions'](_0x23bdcf){this['setPositions'](_0x23bdcf);}get['coordinates'](){const _0x58a5a2={_0x2754bb:0x12b},_0x41fb42=[];return this['points']['forEach'](_0x243012=>{const _0x844348=_0x18a4;_0x41fb42['push'](_0x243012[_0x844348(_0x58a5a2._0x2754bb)]());}),_0x41fb42;}get[_0x165c22(0x122)](){return this['_rectangle'];}['_setOptionsHook'](_0x3ab4fd,_0x264f9b){_0x3ab4fd['positions']&&(this['positions']=_0x3ab4fd['positions']);}[_0x165c22(0xeb)](){const _0x3f91e6={_0x53e81b:0x138},_0x2c41f6=_0x165c22;this[_0x2c41f6(_0x3f91e6._0x53e81b)]['type']==='image'?this['_layer']=new mars3d__namespace['layer']['ImageLayer']({'crs':_0x2c41f6(0x106),'private':!![]}):this['_layer']=new mars3d__namespace[(_0x2c41f6(0xf6))][(_0x2c41f6(0x12a))]({'private':!![]});}['_addedHook'](){const _0xc72435={_0x579d54:0x10b,_0xed23ec:0xf9,_0x2fc661:0x13c},_0x1c873d=_0x165c22;this['_map']['addLayer'](this['_layer']),this['_container']=mars3d__namespace['DomUtil'][_0x1c873d(0x107)]('div',_0x1c873d(_0xc72435._0x579d54),this[_0x1c873d(_0xc72435._0xed23ec)]['container']),this['options']['positions']&&(this['positions']=this[_0x1c873d(0x10f)][_0x1c873d(_0xc72435._0x2fc661)]),this['options'][_0x1c873d(0x124)]&&this['flyToByAnimationEnd']();}[_0x165c22(0x139)](){const _0x16d555={_0x22d879:0x12d},_0x27e06a=_0x165c22;this[_0x27e06a(_0x16d555._0x22d879)]&&(mars3d__namespace['DomUtil']['remove'](this['_container']),delete this['_container']),this['clear'](),this['_map']['removeLayer'](this['_layer']);}['addPosition'](_0xc96b60,_0x1c0bfb){const _0x3e47b9=_0x165c22;this['_positions']=this['_positions']||[],this['_positions'][_0x3e47b9(0x113)](_0xc96b60),this['_updatePositionsHook'](_0x1c0bfb);}['setPositions'](_0x5f21a9,_0x3c140d){const _0x3ec2ec=_0x165c22;this['_positions']=_0x5f21a9,this[_0x3ec2ec(0x102)](_0x3c140d);}['clear'](){const _0x1345ba={_0x460894:0x13d},_0x5e5e5d=_0x165c22;this['_graphic']&&(this['_layer']['removeGraphic'](this['_graphic'],!![]),delete this['_graphic']),this[_0x5e5e5d(_0x1345ba._0x460894)]&&(this['_layer']['removeGraphic'](this[_0x5e5e5d(0x13d)],!![]),delete this['_graphic2']);}['_updatePositionsHook'](_0x1cf302){const _0x3a602f={_0x169588:0xf9,_0x106086:0xf1,_0x3cb737:0x101,_0x1ea5ec:0x12f},_0x4ec698=_0x165c22;if(!this['show']||!this[_0x4ec698(_0x3a602f._0x169588)]||!this['positions']||this['positions'][_0x4ec698(_0x3a602f._0x106086)]===0x0)return this;const _0x7183b1=this['_getHeatCanvas']();if(this[_0x4ec698(0x138)][_0x4ec698(0x11e)]===_0x4ec698(0x127))this['_layer']['setOptions']({'url':_0x7183b1['toDataURL']('image/png'),'rectangle':this['_rectangle'],'opacity':this['style']['opacity']});else this['style']['arc']?this['_graphic']&&_0x1cf302?(this[_0x4ec698(_0x3a602f._0x3cb737)]['uniforms']['image']=_0x7183b1,this[_0x4ec698(0x101)]['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this['_graphic2']['uniforms']['image']=_0x7183b1,this['_graphic2'][_0x4ec698(_0x3a602f._0x1ea5ec)][_0x4ec698(0x123)]=this[_0x4ec698(0x101)]['uniforms']['bumpMap'])):this['_createArcGraphic'](_0x7183b1):this['_graphic']&&_0x1cf302?this[_0x4ec698(0x101)]['uniforms']['image']=_0x7183b1:this['_createGraphic'](_0x7183b1);return this;}['_createGraphic'](_0xb8983e){const _0x27c70c={_0x5c3e52:0x11b,_0x2a65e2:0x135},_0x392b36=_0x165c22;this['clear'](),this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this['options'],'rectangle':this[_0x392b36(0xed)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'material':new Cesium[(_0x392b36(_0x27c70c._0x5c3e52))]({'fabric':{'uniforms':{'image':_0xb8983e},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this[_0x392b36(_0x27c70c._0x2a65e2)]['addGraphic'](this['_graphic']);}['_createArcGraphic'](_0x14b969){const _0x19bdbb={_0x41bfc3:0x10c,_0x39c48:0x105,_0x515bc8:0x116,_0x19e676:0x138,_0x238dc6:0xed,_0x284d65:0x117,_0x48b7b9:0xf5,_0x5acf23:0x135,_0x5af661:0x112},_0x7f9028=_0x165c22;this[_0x7f9028(_0x19bdbb._0x41bfc3)]();const _0x465ab4=Cesium['RenderState'][_0x7f9028(0xfa)]({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium[_0x7f9028(0x10a)]['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation']['REPLACE']},'backFunction':Cesium['StencilFunction']['ALWAYS'],'backOperation':{'fail':Cesium['StencilOperation']['KEEP'],'zFail':Cesium['StencilOperation']['KEEP'],'zPass':Cesium['StencilOperation'][_0x7f9028(_0x19bdbb._0x39c48)]},'reference':0x2,'mask':0x2},'blending':Cesium['BlendingState'][_0x7f9028(0x109)]}),_0x172e76=Math['floor'](this[_0x7f9028(0x138)][_0x7f9028(_0x19bdbb._0x515bc8)]??this['_mBoundsMax']*0.02)+0.1;this[_0x7f9028(0x138)][_0x7f9028(_0x19bdbb._0x515bc8)]&&delete this[_0x7f9028(_0x19bdbb._0x19e676)]['diffHeight'];const _0x536f0f=(this['style']['splitNum'],0x64);let _0x48b459=Math[_0x7f9028(0x136)](this['_rectangle']['height'],this[_0x7f9028(_0x19bdbb._0x238dc6)]['width']);this[_0x7f9028(0x138)]['granularity']=_0x48b459/=_0x536f0f;const _0x23dbfd=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x14b969,'repeat':new Cesium[(_0x7f9028(_0x19bdbb._0x284d65))](0x1,0x1),'color':new Cesium[(_0x7f9028(_0x19bdbb._0x48b7b9))](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x2c7bd8=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace[(_0x7f9028(0xf3))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0x465ab4,'material':_0x23dbfd,'vertexShaderSource':getVertexShaderSource(_0x172e76*_0x2c7bd8)})}),this[_0x7f9028(_0x19bdbb._0x5acf23)][_0x7f9028(0x110)](this['_graphic']),this[_0x7f9028(0x138)]['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace[(_0x7f9028(0xf3))][(_0x7f9028(_0x19bdbb._0x5af661))]({...this['options'],'rectangle':this[_0x7f9028(_0x19bdbb._0x238dc6)],'appearance':new Cesium[(_0x7f9028(0x13b))]({'flat':!![],'aboveGround':!![],'renderState':_0x465ab4,'material':_0x23dbfd,'vertexShaderSource':getVertexShaderSource(-_0x172e76)})}),this['_layer']['addGraphic'](this[_0x7f9028(0x13d)]));}['getRectangle'](_0x2fc7b2){const _0x22d1ad=_0x165c22;return _0x2fc7b2!==null&&_0x2fc7b2!==void 0x0&&_0x2fc7b2['isFormat']&&this['_rectangle']?mars3d__namespace[_0x22d1ad(0xec)][_0x22d1ad(0x114)](this['_rectangle']):this['_rectangle'];}['_getHeatCanvas'](){const _0x5b9c6d={_0xd79602:0x12e,_0x419d2c:0x137,_0x4e9d75:0xef,_0x2633ab:0xef,_0x2d1455:0x10f,_0x1cf865:0x137,_0x494a3c:0x115,_0x293b48:0x130,_0x177ed6:0x10d,_0x1258eb:0x136,_0x103a37:0xf4,_0x4ecac8:0x103,_0x269d4c:0x107,_0x5545cd:0x104},_0x6859c3={_0x5523d7:0x121,_0x1f7496:0x10d,_0x37f636:0x12e},_0x399606={_0x56dd71:0xf7,_0x5db745:0xee,_0x3bb5d7:0x119},_0x1926da=_0x165c22,_0x3791b9=this['_positions'],_0x2522bf=[];let _0x463f7d,_0x3f820c,_0x36d1c8,_0x39a7b7;_0x3791b9['forEach'](_0x203ce3=>{const _0x348e60=_0x18a4,_0x1a1ac4=mars3d__namespace['LngLatPoint']['parse'](_0x203ce3);if(!_0x1a1ac4)return;_0x1a1ac4['value']=_0x203ce3['value']||0x1,!this[_0x348e60(0x10f)][_0x348e60(0x122)]&&(_0x463f7d===undefined?(_0x463f7d=_0x1a1ac4['lng'],_0x3f820c=_0x1a1ac4[_0x348e60(_0x399606._0x56dd71)],_0x36d1c8=_0x1a1ac4['lat'],_0x39a7b7=_0x1a1ac4['lat']):(_0x463f7d=Math[_0x348e60(_0x399606._0x5db745)](_0x463f7d,_0x1a1ac4['lng']),_0x3f820c=Math['max'](_0x3f820c,_0x1a1ac4['lng']),_0x36d1c8=Math['min'](_0x36d1c8,_0x1a1ac4[_0x348e60(_0x399606._0x3bb5d7)]),_0x39a7b7=Math[_0x348e60(0x136)](_0x39a7b7,_0x1a1ac4['lat']))),_0x2522bf['push'](_0x1a1ac4);});_0x463f7d===_0x3f820c&&(_0x463f7d-=0.000001,_0x3f820c+=0.000001);_0x36d1c8===_0x39a7b7&&(_0x36d1c8-=0.000001,_0x39a7b7+=0.000001);let _0x35e7eb=this['options']['rectangle']||{'xmin':_0x463f7d,'xmax':_0x3f820c,'ymin':_0x36d1c8,'ymax':_0x39a7b7};const _0x1088e7=getMercatorBounds(_0x35e7eb),_0x3cbe07=Math['abs'](_0x1088e7['xmax']-_0x1088e7['xmin']),_0xb3ec38=Math['abs'](_0x1088e7[_0x1926da(_0x5b9c6d._0xd79602)]-_0x1088e7[_0x1926da(_0x5b9c6d._0x419d2c)]),_0x125891=Math['max'](_0x3cbe07,_0xb3ec38),_0x1348db=Math[_0x1926da(0xee)](_0x3cbe07,_0xb3ec38);this['_mBoundsMax']=_0x125891;let _0x39b3ab=0x1;if(_0x125891>this['options'][_0x1926da(_0x5b9c6d._0x4e9d75)])_0x39b3ab=_0x125891/this[_0x1926da(0x10f)][_0x1926da(_0x5b9c6d._0x2633ab)],_0x1348db/_0x39b3ab<this['options']['minCanvasSize']&&(_0x39b3ab=_0x1348db/this['options']['minCanvasSize']);else _0x1348db<this['options'][_0x1926da(0xfe)]&&(_0x39b3ab=_0x1348db/this[_0x1926da(_0x5b9c6d._0x2d1455)]['minCanvasSize'],_0x125891/_0x39b3ab>this[_0x1926da(_0x5b9c6d._0x2d1455)]['maxCanvasSize']&&(_0x39b3ab=_0x125891/this['options'][_0x1926da(0xef)]));const _0x443014=this['heatStyle']['radius']*1.5,_0xfa1143=_0x3cbe07/_0x39b3ab+_0x443014*0x2,_0x24e295=_0xb3ec38/_0x39b3ab+_0x443014*0x2,_0x4e326d=_0x443014*_0x39b3ab;_0x1088e7['xmin']-=_0x4e326d,_0x1088e7[_0x1926da(_0x5b9c6d._0x1cf865)]-=_0x4e326d,_0x1088e7['xmax']+=_0x4e326d,_0x1088e7['ymax']+=_0x4e326d,this[_0x1926da(_0x5b9c6d._0x494a3c)]=_0x39b3ab,_0x35e7eb=geLatLngBounds(_0x1088e7),this[_0x1926da(0xed)]=Cesium[_0x1926da(_0x5b9c6d._0x293b48)][_0x1926da(0x134)](_0x35e7eb[_0x1926da(_0x5b9c6d._0x177ed6)],_0x35e7eb['ymin'],_0x35e7eb['xmax'],_0x35e7eb['ymax']);let _0x253301=_0x2522bf[0x0][_0x1926da(0xfb)]??0x1,_0x1fbba6=_0x2522bf[0x0]['value']??0x0;const _0x3d201b=[];_0x2522bf['forEach'](_0x581cf0=>{const _0x299f70=_0x1926da,_0x4b622d=mars3d__namespace[_0x299f70(_0x6859c3._0x5523d7)]['lonlat2mercator']([_0x581cf0['lng'],_0x581cf0[_0x299f70(0x119)]]),_0x5ac0ed=_0x581cf0['value']||0x1,_0x59391d=Math['round']((_0x4b622d[0x0]-_0x1088e7[_0x299f70(_0x6859c3._0x1f7496)])/_0x39b3ab),_0x5bc216=Math['round']((_0x1088e7[_0x299f70(_0x6859c3._0x37f636)]-_0x4b622d[0x1])/_0x39b3ab);_0x253301=Math[_0x299f70(0x136)](_0x253301,_0x5ac0ed),_0x1fbba6=Math['min'](_0x1fbba6,_0x5ac0ed),_0x3d201b['push']({'x':_0x59391d,'y':_0x5bc216,'value':_0x5ac0ed});});const _0x2ffc0c={'min':this['options']['min']??_0x1fbba6,'max':this['options'][_0x1926da(_0x5b9c6d._0x1258eb)]??_0x253301,'data':_0x3d201b};this['_last_heatData']=_0x2ffc0c;if(!this['_last_mBounds']||_0x1088e7['xmin']!==this['_last_mBounds']['xmin']||_0x1088e7['ymin']!==this['_last_mBounds']['ymin']||_0x1088e7['xmax']!==this[_0x1926da(_0x5b9c6d._0x103a37)]['xmax']||_0x1088e7['ymax']!==this['_last_mBounds'][_0x1926da(0x12e)]){this['_last_mBounds']=_0x1088e7,this[_0x1926da(0x12d)]['style']['cssText']='width:'+_0xfa1143+'px;height:'+_0x24e295+'px;';const _0x388285={...this[_0x1926da(0x132)],'container':this['_container']};!this[_0x1926da(_0x5b9c6d._0x4ecac8)]?this['_heat']=h337__namespace[_0x1926da(_0x5b9c6d._0x269d4c)](_0x388285):this['_heat']['configure'](_0x388285);}this['_heat']['setData'](_0x2ffc0c);const _0xc631ee=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat'][_0x1926da(0x118)][_0x1926da(_0x5b9c6d._0x5545cd)]);return _0xc631ee;}[_0x165c22(0x131)](){const _0x18f72d={_0x3c154a:0x12c,_0x310138:0xfd},_0x288d73=_0x165c22;this[_0x288d73(0x103)]['configure']({'radius':this['heatStyle'][_0x288d73(_0x18f72d._0x3c154a)]*this['style']['arcRadiusScale'],'blur':this[_0x288d73(0x132)]['blur']*this['style']['arcBlurScale'],'gradient':this['heatStyle']['gradientArc']||{0.25:'rgb(0,0,0)',0.55:'rgb(140,140,140)',0.85:_0x288d73(_0x18f72d._0x310138),0x1:'rgb(255,255,255)'}});const _0x50e63d=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return this['_heat']['configure'](this['options']['heatStyle']),_0x50e63d;}['getPointData'](_0x36eab8){const _0x10af99={_0x33023e:0x118},_0x369016=_0x165c22,_0x5aaad4=mars3d__namespace[_0x369016(0x133)]['parse'](_0x36eab8);if(!_0x5aaad4)return{};const _0x5e3b50=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5aaad4['lng'],_0x5aaad4['lat']]),_0x5a291b=this['_last_mBounds'],_0x5edec5=Math['round']((_0x5e3b50[0x0]-_0x5a291b[_0x369016(0x10d)])/this[_0x369016(0x115)]),_0x5076b7=Math['round']((_0x5a291b['ymax']-_0x5e3b50[0x1])/this['_scale']),_0x37712e=this['_heat']['getValueAt']({'x':_0x5edec5,'y':_0x5076b7}),_0x22b61a=this['_heat'][_0x369016(_0x10af99._0x33023e)]['ctx']['getImageData'](_0x5edec5-0x1,_0x5076b7-0x1,0x1,0x1)['data'];return{'x':_0x5edec5,'y':_0x5076b7,'value':_0x37712e,'color':'rgba('+_0x22b61a[0x0]+','+_0x22b61a[0x1]+','+_0x22b61a[0x2]+','+_0x22b61a[0x3]+')'};}}mars3d__namespace['LayerUtil']['register']('heat',HeatLayer),mars3d__namespace[_0x165c22(0xf6)]['HeatLayer']=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x5eef29){const _0x25cf70=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5eef29['xmin'],_0x5eef29['ymin']]),_0xc15b0f=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5eef29['xmax'],_0x5eef29['ymax']]);return{'xmin':_0x25cf70[0x0],'ymin':_0x25cf70[0x1],'xmax':_0xc15b0f[0x0],'ymax':_0xc15b0f[0x1]};}function _0x1841(){const _0x1acdf7=['Color','layer','lng','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','_map','fromCache','value','xmax','rgb(216,216,216)','minCanvasSize','6400331UWADax','clientWidth','_graphic','_updatePositionsHook','_heat','canvas','REPLACE','EPSG:3857','create','BaseLayer','ALPHA_BLEND','StencilOperation','mars3d-heatmap\x20mars3d-hideDiv','clear','xmin','green','options','addGraphic','18VoVhwO','RectanglePrimitive','push','formatRectangle','_scale','diffHeight','Cartesian2','_renderer','lat','14302970vGmWHb','Material','11UBCLCe','349540Easofk','type','VERTEX_FORMAT','get','PointTrans','rectangle','bumpMap','flyTo','8590ctCoLB','212082mzcTZY','image','6434768OmUvko','549ipkdin','GraphicLayer','toArray','radius','_container','ymax','uniforms','Rectangle','_getArcHeatCanvas','heatStyle','LngLatPoint','fromDegrees','_layer','max','ymin','style','_removedHook','HeatLayer','EllipsoidSurfaceAppearance','positions','_graphic2','keys','Util','Cesium','_mountedHook','PolyUtil','_rectangle','min','maxCanvasSize','193624gnULDJ','length','6720jkGyYS','graphic','_last_mBounds'];_0x1841=function(){return _0x1acdf7;};return _0x1841();}function geLatLngBounds(_0xeb7bf){const _0x38cf4a=_0x165c22,_0x9633a=mars3d__namespace['PointTrans']['mercator2lonlat']([_0xeb7bf['xmin'],_0xeb7bf['ymin']]),_0x43e90a=mars3d__namespace['PointTrans']['mercator2lonlat']([_0xeb7bf[_0x38cf4a(0xfc)],_0xeb7bf['ymax']]);return{'xmin':_0x9633a[0x0],'ymin':_0x9633a[0x1],'xmax':_0x43e90a[0x0],'ymax':_0x43e90a[0x1]};}function getVertexShaderSource(_0x2dfcb0){const _0x4d8e9f={_0x209c7d:0xf8},_0x3be015=_0x165c22;return _0x3be015(_0x4d8e9f._0x209c7d)+_0x2dfcb0+';\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[_0x165c22(0x13a)]=HeatLayer,Object['defineProperty'](exports,'__esModule',{'value':!![]});
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mars3d-heatmap",
3
- "version": "3.6.12",
3
+ "version": "3.6.14",
4
4
  "description": "Mars3D平台插件,结合heatmap可视化功能插件",
5
5
  "main": "dist/mars3d-heatmap.js",
6
6
  "files": [
@@ -10,7 +10,7 @@
10
10
  "@mars3d/heatmap.js": "^2.0.7"
11
11
  },
12
12
  "devDependencies": {
13
- "mars3d": "~3.6.12"
13
+ "mars3d": "~3.6.14"
14
14
  },
15
15
  "scripts": {
16
16
  "lint": "eslint ./src/**/*.{js,ts} --fix"