mars3d-heatmap
Advanced tools
Comparing version 3.6.13 to 3.6.14
/** | ||
* Mars3D平台插件,结合heatmap可视化功能插件 mars3d-heatmap | ||
* | ||
* 版本信息:v3.6.13 | ||
* 编译日期:2023-11-21 09:41:55 | ||
* 版本信息:v3.6.14 | ||
* 编译日期:2023-11-27 22:14:18 | ||
* 版权所有:Copyright by 火星科技 http://mars3d.cn | ||
@@ -14,3 +14,3 @@ * 使用单位:免费公开版 ,2023-03-17 | ||
})(this, (function (exports, mars3d, h337) { | ||
'use strict';const _0x3f895f=_0x483a;(function(_0x4fc505,_0x30c950){const _0x271f25={_0x1f185a:0xe5,_0x1a1fdd:0xd2,_0x287c99:0xdc,_0x91dbd7:0xc3,_0x5f1273:0xe9},_0x18895e=_0x483a,_0x455b35=_0x4fc505();while(!![]){try{const _0xf53346=parseInt(_0x18895e(_0x271f25._0x1f185a))/0x1+parseInt(_0x18895e(0xc2))/0x2+-parseInt(_0x18895e(_0x271f25._0x1a1fdd))/0x3+-parseInt(_0x18895e(0xb6))/0x4*(-parseInt(_0x18895e(_0x271f25._0x287c99))/0x5)+-parseInt(_0x18895e(_0x271f25._0x91dbd7))/0x6+-parseInt(_0x18895e(0xa8))/0x7+-parseInt(_0x18895e(0x9d))/0x8*(-parseInt(_0x18895e(_0x271f25._0x5f1273))/0x9);if(_0xf53346===_0x30c950)break;else _0x455b35['push'](_0x455b35['shift']());}catch(_0x1227c3){_0x455b35['push'](_0x455b35['shift']());}}}(_0x2e0a,0xab847));function _0x483a(_0x5c43d3,_0x39ee2f){const _0x2e0a9f=_0x2e0a();return _0x483a=function(_0x483a1c,_0x505c87){_0x483a1c=_0x483a1c-0x9b;let _0x2ee07e=_0x2e0a9f[_0x483a1c];return _0x2ee07e;},_0x483a(_0x5c43d3,_0x39ee2f);}function _interopNamespace(_0x268931){const _0x1bf0a4=_0x483a;if(_0x268931&&_0x268931['__esModule'])return _0x268931;var _0x57519b=Object[_0x1bf0a4(0xc5)](null);return _0x268931&&Object[_0x1bf0a4(0xac)](_0x268931)['forEach'](function(_0x30ab6d){const _0x47bfbb=_0x1bf0a4;if(_0x30ab6d!==_0x47bfbb(0xcf)){var _0x2efc17=Object['getOwnPropertyDescriptor'](_0x268931,_0x30ab6d);Object['defineProperty'](_0x57519b,_0x30ab6d,_0x2efc17['get']?_0x2efc17:{'enumerable':!![],'get':function(){return _0x268931[_0x30ab6d];}});}}),_0x57519b['default']=_0x268931,_0x57519b;}var mars3d__namespace=_interopNamespace(mars3d),h337__namespace=_interopNamespace(h337),HeatMaterial='uniform\x20sampler2D\x20image;\x0a\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput)\x20{\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20vec4\x20colorImage\x20=\x20texture(image,\x20st);\x0a\x20\x20if(colorImage.rgb\x20==\x20vec3(1.0)\x20||\x20colorImage.rgb\x20==\x20vec3(0.0))\x20{\x0a\x20\x20\x20\x20discard;\x0a\x20\x20}\x0a\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0a\x20\x20material.alpha\x20=\x20colorImage.a;\x0a\x20\x20return\x20material;\x0a}\x0a';function _0x2e0a(){const _0x176820=['fromCache','Rectangle','clientHeight','remove','Util','options','_layer','16WexChu','_last_heatData','forEach','HeatLayer','ctx','container','ALWAYS','EllipsoidSurfaceAppearance','KEEP','xmin','type','6403033GZGgdJ','_updatePositionsHook','flyTo','_mBoundsMax','keys','bumpMap','GraphicLayer','min','removeGraphic','lat','StencilOperation','diffHeight','_graphic2','_last_mBounds','4hswaaB','graphic','_getHeatCanvas','_scale','max','uniforms','floor','yellow','layer','points','_positions','maxCanvasSize','2195920hthISL','7403070FoxpIJ','xmax','create','positions','_container','rgb(140,140,140)','value','style','configure','push','LngLatPoint','splitNum','default','opacity','rectangle','1202682ZrHLZq','BlendingState','round','RenderState','arcRadiusScale','setOptions','REPLACE','PolyUtil','_map','minCanvasSize','1295215JCNDKo','ImageLayer','_heat','canvas','lng','StencilFunction','ymax','heatStyle','_rectangle','799950IbuuPs','_setOptionsHook','addGraphic','_graphic','4927680bJguOB','PointTrans','_renderer','DomUtil'];_0x2e0a=function(){return _0x176820;};return _0x2e0a();}if(!h337__namespace[_0x3f895f(0xc5)])throw new Error('请引入\x20heatmap.js\x20库\x20');const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace[_0x3f895f(0xbe)]['BaseLayer'],DEF_HEATSTYLE={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'radius':0x19,'gradient':{0.4:'blue',0.6:'green',0.8:_0x3f895f(0xbd),0.9:'red'}},DEF_STYLE={'arcRadiusScale':1.5,'arcBlurScale':1.5,'vertexFormat':Cesium['EllipsoidSurfaceAppearance']['VERTEX_FORMAT']};class HeatLayer extends BaseLayer{constructor(_0x2d2620={}){const _0x211ded={_0x5e0882:0x9b,_0x41a0cd:0xef,_0x399390:0xba},_0x54c712=_0x3f895f;super(_0x2d2620),this[_0x54c712(_0x211ded._0x5e0882)][_0x54c712(0xc1)]=this['options']['maxCanvasSize']??document['body']['clientWidth'],this['options']['maxCanvasSize']=Math['min'](this['options']['maxCanvasSize'],0x1388),this[_0x54c712(0x9b)]['minCanvasSize']=this['options'][_0x54c712(0xdb)]??document['body'][_0x54c712(_0x211ded._0x41a0cd)],this['options'][_0x54c712(0xdb)]=Math[_0x54c712(_0x211ded._0x399390)](this['options']['minCanvasSize'],0x2bc),this['options'][_0x54c712(0xe3)]={...DEF_HEATSTYLE,...this['options']['heatStyle']},this[_0x54c712(_0x211ded._0x5e0882)]['style']={...DEF_STYLE,...this['options']['style']};}get['layer'](){return this['_layer'];}get['heatStyle'](){return this['options']['heatStyle'];}set[_0x3f895f(0xe3)](_0x5954dd){const _0x3c6129={_0x373d6f:0xe3},_0x50002b=_0x3f895f;this['options']['heatStyle']=mars3d__namespace[_0x50002b(0xf1)]['merge'](this['options'][_0x50002b(_0x3c6129._0x373d6f)],_0x5954dd),this['_heat']&&(this['_heat'][_0x50002b(0xcb)](this['options']['heatStyle']),this['_updatePositionsHook'](!![]));}get['style'](){return this['options']['style'];}set['style'](_0x2fbfd9){const _0x12fdda={_0xe673f9:0x9b,_0x1cc19d:0x9b,_0x3494c9:0xca},_0x25e770=_0x3f895f;this[_0x25e770(_0x12fdda._0xe673f9)]['style']=mars3d__namespace['Util']['merge'](this[_0x25e770(_0x12fdda._0x1cc19d)][_0x25e770(_0x12fdda._0x3494c9)],_0x2fbfd9);}get['positions'](){const _0x2dc9a9=_0x3f895f;return this[_0x2dc9a9(0xc0)];}set[_0x3f895f(0xc6)](_0x28ada7){this['setPositions'](_0x28ada7);}get['coordinates'](){const _0xd0ab09={_0x3bcdb7:0xbf},_0x3600a6=_0x3f895f,_0x3866a2=[];return this[_0x3600a6(_0xd0ab09._0x3bcdb7)]['forEach'](_0x3a99ca=>{const _0x5bee06=_0x3600a6;_0x3866a2[_0x5bee06(0xcc)](_0x3a99ca['toArray']());}),_0x3866a2;}get['rectangle'](){const _0x2ce07f=_0x3f895f;return this[_0x2ce07f(0xe4)];}[_0x3f895f(0xe6)](_0x727d5a,_0xcd9e13){_0x727d5a['positions']&&(this['positions']=_0x727d5a['positions']);}['_mountedHook'](){const _0x1036c8={_0x507f48:0xdd,_0x301258:0xbe,_0x2ea59e:0xae},_0xa021d2=_0x3f895f;this['style']['type']==='image'?this['_layer']=new mars3d__namespace['layer'][(_0xa021d2(_0x1036c8._0x507f48))]({'crs':'EPSG:3857','private':!![]}):this['_layer']=new mars3d__namespace[(_0xa021d2(_0x1036c8._0x301258))][(_0xa021d2(_0x1036c8._0x2ea59e))]({'private':!![]});}['_addedHook'](){const _0x3fd1f3={_0x2ae579:0xa2,_0x2852a1:0xaa},_0x571254=_0x3f895f;this['_map']['addLayer'](this['_layer']),this['_container']=mars3d__namespace['DomUtil'][_0x571254(0xc5)]('div','mars3d-heatmap\x20mars3d-hideDiv',this['_map'][_0x571254(_0x3fd1f3._0x2ae579)]),this['options']['positions']&&(this['positions']=this['options']['positions']),this[_0x571254(0x9b)][_0x571254(_0x3fd1f3._0x2852a1)]&&this['flyToByAnimationEnd']();}['_removedHook'](){const _0x39e87c={_0x33b338:0xf0},_0x38551f=_0x3f895f;this['_container']&&(mars3d__namespace[_0x38551f(0xec)][_0x38551f(_0x39e87c._0x33b338)](this[_0x38551f(0xc7)]),delete this['_container']),this['clear'](),this['_map']['removeLayer'](this[_0x38551f(0x9c)]);}['addPosition'](_0x1f910b,_0x487eca){const _0xfb8bfd={_0x1e50b8:0xc0,_0x2e154d:0xcc},_0x3c9244=_0x3f895f;this['_positions']=this['_positions']||[],this[_0x3c9244(_0xfb8bfd._0x1e50b8)][_0x3c9244(_0xfb8bfd._0x2e154d)](_0x1f910b),this[_0x3c9244(0xa9)](_0x487eca);}['setPositions'](_0x50c000,_0x313917){const _0x2dec0f={_0x58217b:0xc0},_0x361b41=_0x3f895f;this[_0x361b41(_0x2dec0f._0x58217b)]=_0x50c000,this['_updatePositionsHook'](_0x313917);}['clear'](){const _0x8d161d={_0x5b3dfd:0xb0,_0x574040:0xe8},_0x5b2128=_0x3f895f;this['_graphic']&&(this['_layer'][_0x5b2128(_0x8d161d._0x5b3dfd)](this[_0x5b2128(_0x8d161d._0x574040)],!![]),delete this['_graphic']),this['_graphic2']&&(this[_0x5b2128(0x9c)][_0x5b2128(_0x8d161d._0x5b3dfd)](this['_graphic2'],!![]),delete this[_0x5b2128(0xb4)]);}['_updatePositionsHook'](_0x4f7008){const _0x508a94={_0x2f4eb1:0xc6,_0x19a9f7:0xb8,_0x27b394:0xa7,_0x583c26:0xd7,_0x299476:0xbb},_0x44bc20=_0x3f895f;if(!this['show']||!this[_0x44bc20(0xda)]||!this['positions']||this[_0x44bc20(_0x508a94._0x2f4eb1)]['length']===0x0)return this;const _0x665ece=this[_0x44bc20(_0x508a94._0x19a9f7)]();if(this['style'][_0x44bc20(_0x508a94._0x27b394)]==='image')this['_layer'][_0x44bc20(_0x508a94._0x583c26)]({'url':_0x665ece['toDataURL']('image/png'),'rectangle':this[_0x44bc20(0xe4)],'opacity':this['style'][_0x44bc20(0xd0)]});else this[_0x44bc20(0xca)]['arc']?this['_graphic']&&_0x4f7008?(this['_graphic']['uniforms']['image']=_0x665ece,this['_graphic']['uniforms']['bumpMap']=this['_getArcHeatCanvas'](),this['_graphic2']&&(this[_0x44bc20(0xb4)][_0x44bc20(_0x508a94._0x299476)]['image']=_0x665ece,this[_0x44bc20(0xb4)]['uniforms']['bumpMap']=this['_graphic']['uniforms'][_0x44bc20(0xad)])):this['_createArcGraphic'](_0x665ece):this['_graphic']&&_0x4f7008?this['_graphic']['uniforms']['image']=_0x665ece:this['_createGraphic'](_0x665ece);return this;}['_createGraphic'](_0x4927d4){const _0x1a6149={_0x5cf5cb:0xe8},_0x5f4796=_0x3f895f;this['clear'](),this[_0x5f4796(_0x1a6149._0x5cf5cb)]=new mars3d__namespace[(_0x5f4796(0xb7))]['RectanglePrimitive']({...this['options'],'rectangle':this['_rectangle'],'appearance':new Cesium[(_0x5f4796(0xa4))]({'material':new Cesium['Material']({'fabric':{'uniforms':{'image':_0x4927d4},'source':HeatMaterial},'translucent':!![]}),'flat':!![]})}),this['_layer']['addGraphic'](this['_graphic']);}['_createArcGraphic'](_0x1003a8){const _0x338709={_0xe914d2:0xd5,_0x4072c0:0xb2,_0x51edb3:0xe1,_0x5db90a:0xa5,_0x13040d:0xb2,_0x1a281e:0xb2,_0x3350ce:0xbc,_0x58cb4a:0xca,_0x5794f1:0xab,_0x2fdd4e:0xb3,_0x2c2287:0xe4,_0x4a81cb:0x9b},_0x13a3c1=_0x3f895f;this['clear']();const _0xdecc5d=Cesium[_0x13a3c1(_0x338709._0xe914d2)][_0x13a3c1(0xed)]({'cull':{'enabled':!![]},'depthTest':{'enabled':!![]},'stencilTest':{'enabled':!![],'frontFunction':Cesium['StencilFunction']['ALWAYS'],'frontOperation':{'fail':Cesium['StencilOperation'][_0x13a3c1(0xa5)],'zFail':Cesium[_0x13a3c1(0xb2)]['KEEP'],'zPass':Cesium[_0x13a3c1(_0x338709._0x4072c0)]['REPLACE']},'backFunction':Cesium[_0x13a3c1(_0x338709._0x51edb3)][_0x13a3c1(0xa3)],'backOperation':{'fail':Cesium['StencilOperation'][_0x13a3c1(_0x338709._0x5db90a)],'zFail':Cesium[_0x13a3c1(_0x338709._0x13040d)]['KEEP'],'zPass':Cesium[_0x13a3c1(_0x338709._0x1a281e)][_0x13a3c1(0xd8)]},'reference':0x2,'mask':0x2},'blending':Cesium[_0x13a3c1(0xd3)]['ALPHA_BLEND']}),_0x218b25=Math[_0x13a3c1(_0x338709._0x3350ce)](this[_0x13a3c1(_0x338709._0x58cb4a)]['diffHeight']??this[_0x13a3c1(_0x338709._0x5794f1)]*0.02)+0.1;this['style'][_0x13a3c1(_0x338709._0x2fdd4e)]&&delete this['style']['diffHeight'];const _0x5f028d=(this['style'][_0x13a3c1(0xce)],0x64);let _0x49aaf2=Math['max'](this['_rectangle']['height'],this[_0x13a3c1(_0x338709._0x2c2287)]['width']);this['style']['granularity']=_0x49aaf2/=_0x5f028d;const _0x147dc2=new Cesium['Material']({'fabric':{'uniforms':{'image':_0x1003a8,'repeat':new Cesium['Cartesian2'](0x1,0x1),'color':new Cesium['Color'](0x1,0x1,0x1,0x0),'bumpMap':this['_getArcHeatCanvas']()},'source':HeatMaterial},'translucent':!![]}),_0x24772d=this['style']['arcDirection']||0x1;this['_graphic']=new mars3d__namespace['graphic']['RectanglePrimitive']({...this[_0x13a3c1(_0x338709._0x4a81cb)],'rectangle':this['_rectangle'],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0xdecc5d,'material':_0x147dc2,'vertexShaderSource':getVertexShaderSource(_0x218b25*_0x24772d)})}),this[_0x13a3c1(0x9c)]['addGraphic'](this[_0x13a3c1(0xe8)]),this['style']['arcDirection']===0x0&&(this['_graphic2']=new mars3d__namespace[(_0x13a3c1(0xb7))]['RectanglePrimitive']({...this['options'],'rectangle':this[_0x13a3c1(_0x338709._0x2c2287)],'appearance':new Cesium['EllipsoidSurfaceAppearance']({'flat':!![],'aboveGround':!![],'renderState':_0xdecc5d,'material':_0x147dc2,'vertexShaderSource':getVertexShaderSource(-_0x218b25)})}),this['_layer'][_0x13a3c1(0xe7)](this['_graphic2']));}['getRectangle'](_0x544f04){const _0x296002={_0x1063ea:0xd9},_0x1dfe78=_0x3f895f;return _0x544f04!==null&&_0x544f04!==void 0x0&&_0x544f04['isFormat']&&this['_rectangle']?mars3d__namespace[_0x1dfe78(_0x296002._0x1063ea)]['formatRectangle'](this['_rectangle']):this[_0x1dfe78(0xe4)];}['_getHeatCanvas'](){const _0x5dd56f={_0x394cf6:0x9f,_0x45e95b:0x9b,_0x56eb1e:0xdb,_0x28c389:0xc4,_0x2f7773:0xe2,_0x3754d0:0xee,_0x520aba:0xb5,_0x1e6798:0xca,_0x4c86c5:0xde},_0x2e5efe={_0x143bba:0xc9,_0x4d20ff:0xd4},_0xdd9537={_0x515156:0x9b,_0x203e03:0xe0,_0x274ff3:0xaf,_0x31f6ea:0xb1},_0x621413=_0x3f895f,_0x34998f=this['_positions'],_0x1bb928=[];let _0x2d3068,_0x398f4b,_0x1fe76e,_0x4f62d1;_0x34998f[_0x621413(_0x5dd56f._0x394cf6)](_0x1114fd=>{const _0x4273ac=_0x621413,_0xbefec1=mars3d__namespace[_0x4273ac(0xcd)]['parse'](_0x1114fd);if(!_0xbefec1)return;_0xbefec1[_0x4273ac(0xc9)]=_0x1114fd['value']||0x1,!this[_0x4273ac(_0xdd9537._0x515156)][_0x4273ac(0xd1)]&&(_0x2d3068===undefined?(_0x2d3068=_0xbefec1[_0x4273ac(_0xdd9537._0x203e03)],_0x398f4b=_0xbefec1['lng'],_0x1fe76e=_0xbefec1['lat'],_0x4f62d1=_0xbefec1['lat']):(_0x2d3068=Math[_0x4273ac(0xaf)](_0x2d3068,_0xbefec1['lng']),_0x398f4b=Math['max'](_0x398f4b,_0xbefec1['lng']),_0x1fe76e=Math[_0x4273ac(_0xdd9537._0x274ff3)](_0x1fe76e,_0xbefec1[_0x4273ac(_0xdd9537._0x31f6ea)]),_0x4f62d1=Math[_0x4273ac(0xba)](_0x4f62d1,_0xbefec1[_0x4273ac(0xb1)]))),_0x1bb928['push'](_0xbefec1);});_0x2d3068===_0x398f4b&&(_0x2d3068-=0.000001,_0x398f4b+=0.000001);_0x1fe76e===_0x4f62d1&&(_0x1fe76e-=0.000001,_0x4f62d1+=0.000001);let _0x4d97bd=this[_0x621413(_0x5dd56f._0x45e95b)][_0x621413(0xd1)]||{'xmin':_0x2d3068,'xmax':_0x398f4b,'ymin':_0x1fe76e,'ymax':_0x4f62d1};const _0x45e5ea=getMercatorBounds(_0x4d97bd),_0x3ed537=Math['abs'](_0x45e5ea['xmax']-_0x45e5ea['xmin']),_0x249d03=Math['abs'](_0x45e5ea[_0x621413(0xe2)]-_0x45e5ea['ymin']),_0x23024f=Math['max'](_0x3ed537,_0x249d03),_0x504953=Math['min'](_0x3ed537,_0x249d03);this[_0x621413(0xab)]=_0x23024f;let _0x20002c=0x1;if(_0x23024f>this['options']['maxCanvasSize'])_0x20002c=_0x23024f/this['options']['maxCanvasSize'],_0x504953/_0x20002c<this['options']['minCanvasSize']&&(_0x20002c=_0x504953/this[_0x621413(0x9b)][_0x621413(_0x5dd56f._0x56eb1e)]);else _0x504953<this['options']['minCanvasSize']&&(_0x20002c=_0x504953/this['options']['minCanvasSize'],_0x23024f/_0x20002c>this['options']['maxCanvasSize']&&(_0x20002c=_0x23024f/this[_0x621413(0x9b)]['maxCanvasSize']));const _0x5ce4ab=this['heatStyle']['radius']*1.5,_0x525d4d=_0x3ed537/_0x20002c+_0x5ce4ab*0x2,_0x5cf9de=_0x249d03/_0x20002c+_0x5ce4ab*0x2,_0x103259=_0x5ce4ab*_0x20002c;_0x45e5ea['xmin']-=_0x103259,_0x45e5ea['ymin']-=_0x103259,_0x45e5ea[_0x621413(_0x5dd56f._0x28c389)]+=_0x103259,_0x45e5ea[_0x621413(_0x5dd56f._0x2f7773)]+=_0x103259,this[_0x621413(0xb9)]=_0x20002c,_0x4d97bd=geLatLngBounds(_0x45e5ea),this['_rectangle']=Cesium[_0x621413(_0x5dd56f._0x3754d0)]['fromDegrees'](_0x4d97bd['xmin'],_0x4d97bd['ymin'],_0x4d97bd['xmax'],_0x4d97bd['ymax']);let _0x5f0a15=_0x1bb928[0x0]['value']??0x1,_0x2913f3=_0x1bb928[0x0]['value']??0x0;const _0xb6cba9=[];_0x1bb928['forEach'](_0x5d39e2=>{const _0x775eae=_0x621413,_0x4632d3=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x5d39e2['lng'],_0x5d39e2[_0x775eae(0xb1)]]),_0x2558ba=_0x5d39e2[_0x775eae(_0x2e5efe._0x143bba)]||0x1,_0x52f600=Math[_0x775eae(_0x2e5efe._0x4d20ff)]((_0x4632d3[0x0]-_0x45e5ea['xmin'])/_0x20002c),_0x5064af=Math['round']((_0x45e5ea['ymax']-_0x4632d3[0x1])/_0x20002c);_0x5f0a15=Math[_0x775eae(0xba)](_0x5f0a15,_0x2558ba),_0x2913f3=Math['min'](_0x2913f3,_0x2558ba),_0xb6cba9['push']({'x':_0x52f600,'y':_0x5064af,'value':_0x2558ba});});const _0x4e8eff={'min':this['options']['min']??_0x2913f3,'max':this['options']['max']??_0x5f0a15,'data':_0xb6cba9};this[_0x621413(0x9e)]=_0x4e8eff;if(!this['_last_mBounds']||_0x45e5ea[_0x621413(0xa6)]!==this['_last_mBounds']['xmin']||_0x45e5ea['ymin']!==this['_last_mBounds']['ymin']||_0x45e5ea[_0x621413(0xc4)]!==this[_0x621413(_0x5dd56f._0x520aba)]['xmax']||_0x45e5ea['ymax']!==this['_last_mBounds'][_0x621413(0xe2)]){this[_0x621413(_0x5dd56f._0x520aba)]=_0x45e5ea,this['_container'][_0x621413(_0x5dd56f._0x1e6798)]['cssText']='width:'+_0x525d4d+'px;height:'+_0x5cf9de+'px;';const _0x431863={...this['heatStyle'],'container':this['_container']};!this[_0x621413(_0x5dd56f._0x4c86c5)]?this['_heat']=h337__namespace[_0x621413(0xc5)](_0x431863):this['_heat']['configure'](_0x431863);}this['_heat']['setData'](_0x4e8eff);const _0x43c278=mars3d__namespace['DomUtil']['copyCanvas'](this['_heat']['_renderer']['canvas']);return _0x43c278;}['_getArcHeatCanvas'](){const _0x128fb7={_0x39228e:0xd6,_0x4ca548:0xec,_0x5038a5:0xde},_0x2ffb98=_0x3f895f;this['_heat']['configure']({'radius':this['heatStyle']['radius']*this['style'][_0x2ffb98(_0x128fb7._0x39228e)],'blur':this['heatStyle']['blur']*this['style']['arcBlurScale'],'gradient':this['heatStyle']['gradientArc']||{0.25:'rgb(0,0,0)',0.55:_0x2ffb98(0xc8),0.85:'rgb(216,216,216)',0x1:'rgb(255,255,255)'}});const _0x47d230=mars3d__namespace[_0x2ffb98(_0x128fb7._0x4ca548)]['copyCanvas'](this[_0x2ffb98(_0x128fb7._0x5038a5)]['_renderer'][_0x2ffb98(0xdf)]);return this['_heat']['configure'](this['options']['heatStyle']),_0x47d230;}['getPointData'](_0x401e26){const _0x15210c={_0x1af363:0xea,_0xa64d01:0xb1,_0x2594b0:0xa1},_0x127ed3=_0x3f895f,_0x12f544=mars3d__namespace['LngLatPoint']['parse'](_0x401e26);if(!_0x12f544)return{};const _0x37b6ec=mars3d__namespace[_0x127ed3(_0x15210c._0x1af363)]['lonlat2mercator']([_0x12f544['lng'],_0x12f544[_0x127ed3(_0x15210c._0xa64d01)]]),_0x2a36ce=this['_last_mBounds'],_0x5ea580=Math['round']((_0x37b6ec[0x0]-_0x2a36ce[_0x127ed3(0xa6)])/this['_scale']),_0x4dad41=Math['round']((_0x2a36ce['ymax']-_0x37b6ec[0x1])/this['_scale']),_0x2dcac9=this['_heat']['getValueAt']({'x':_0x5ea580,'y':_0x4dad41}),_0x5be5eb=this['_heat'][_0x127ed3(0xeb)][_0x127ed3(_0x15210c._0x2594b0)]['getImageData'](_0x5ea580-0x1,_0x4dad41-0x1,0x1,0x1)['data'];return{'x':_0x5ea580,'y':_0x4dad41,'value':_0x2dcac9,'color':'rgba('+_0x5be5eb[0x0]+','+_0x5be5eb[0x1]+','+_0x5be5eb[0x2]+','+_0x5be5eb[0x3]+')'};}}mars3d__namespace['LayerUtil']['register']('heat',HeatLayer),mars3d__namespace['layer'][_0x3f895f(0xa0)]=HeatLayer,mars3d__namespace['h337']=h337__namespace;function getMercatorBounds(_0x592814){const _0x2bc4ba=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x592814['xmin'],_0x592814['ymin']]),_0x3c5f2b=mars3d__namespace['PointTrans']['lonlat2mercator']([_0x592814['xmax'],_0x592814['ymax']]);return{'xmin':_0x2bc4ba[0x0],'ymin':_0x2bc4ba[0x1],'xmax':_0x3c5f2b[0x0],'ymax':_0x3c5f2b[0x1]};}function geLatLngBounds(_0x5b5d03){const _0x354c5d={_0x3c3500:0xea,_0x1d1e94:0xa6},_0x3a96d2=_0x3f895f,_0x2999db=mars3d__namespace[_0x3a96d2(_0x354c5d._0x3c3500)]['mercator2lonlat']([_0x5b5d03[_0x3a96d2(_0x354c5d._0x1d1e94)],_0x5b5d03['ymin']]),_0x267489=mars3d__namespace[_0x3a96d2(_0x354c5d._0x3c3500)]['mercator2lonlat']([_0x5b5d03[_0x3a96d2(0xc4)],_0x5b5d03['ymax']]);return{'xmin':_0x2999db[0x0],'ymin':_0x2999db[0x1],'xmax':_0x267489[0x0],'ymax':_0x267489[0x1]};}function getVertexShaderSource(_0x189e89){return'in\x20vec3\x20position3DHigh;\x0a\x20\x20in\x20vec3\x20position3DLow;\x0a\x20\x20in\x20vec2\x20st;\x0a\x20\x20in\x20float\x20batchId;\x0a\x20\x20uniform\x20sampler2D\x20bumpMap_3;\x0a\x20\x20out\x20vec3\x20v_positionMC;\x0a\x20\x20out\x20vec3\x20v_positionEC;\x0a\x20\x20out\x20vec2\x20v_st;\x0a\x0a\x20\x20void\x20main()\x0a\x20\x20{\x0a\x20\x20\x20\x20vec4\x20p\x20=\x20czm_computePosition();\x0a\x20\x20\x20\x20v_positionMC\x20=\x20position3DHigh\x20+\x20position3DLow;\x0a\x20\x20\x20\x20v_positionEC\x20=\x20(czm_modelViewRelativeToEye\x20*\x20p).xyz;\x0a\x20\x20\x20\x20v_st\x20=\x20st;\x0a\x20\x20\x20\x20vec4\x20color\x20=\x20texture(bumpMap_3,\x20v_st);\x0a\x20\x20\x20\x20float\x20centerBump\x20=\x20distance(vec3(0.0),color.rgb);\x0a\x20\x20\x20\x20vec3\x20upDir\x20=\x20normalize(v_positionMC.xyz);\x0a\x20\x20\x20\x20vec3\x20disPos\x20=\x20upDir\x20*\x20centerBump\x20*\x20'+_0x189e89+';\x0a\x20\x20\x20\x20p\x20+=vec4(disPos,0.0);\x0a\x20\x20\x20\x20gl_Position\x20=\x20czm_modelViewProjectionRelativeToEye\x20*\x20p;\x0a\x20\x20}\x0a';}exports[_0x3f895f(0xa0)]=HeatLayer,Object['defineProperty'](exports,'__esModule',{'value':!![]}); | ||
'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':!![]}); | ||
})); |
{ | ||
"name": "mars3d-heatmap", | ||
"version": "3.6.13", | ||
"version": "3.6.14", | ||
"description": "Mars3D平台插件,结合heatmap可视化功能插件", | ||
@@ -13,3 +13,3 @@ "main": "dist/mars3d-heatmap.js", | ||
"devDependencies": { | ||
"mars3d": "~3.6.13" | ||
"mars3d": "~3.6.14" | ||
}, | ||
@@ -16,0 +16,0 @@ "scripts": { |
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
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
24354
92