mars3d-mapv 3.7.3 → 3.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mars3d-mapv.js +3 -3
- package/package.json +2 -2
package/dist/mars3d-mapv.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mars3D平台插件,结合mapv可视化功能插件 mars3d-mapv
|
|
3
3
|
*
|
|
4
|
-
* 版本信息:v3.7.
|
|
5
|
-
* 编译日期:2024-02-
|
|
4
|
+
* 版本信息:v3.7.4
|
|
5
|
+
* 编译日期:2024-02-23 17:33:54
|
|
6
6
|
* 版权所有:Copyright by 火星科技 http://mars3d.cn
|
|
7
7
|
* 使用单位:免费公开版 ,2024-01-15
|
|
8
8
|
*/
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
typeof define === 'function' && define.amd ? define(['exports', 'mapv', 'mars3d'], factory) :
|
|
12
12
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["mars3d-mapv"] = {}, global.mapv, global.mars3d));
|
|
13
13
|
})(this, (function (exports, mapv, mars3d) {
|
|
14
|
-
'use strict';const _0x5d17ab=_0xdc8d;function _0x5b3c(){const _0x162394=['canvas','transferCoordinate','restore','mousemoveEvent','Cesium','forEach','destroy','steps','filter','isPointVisible','Util','click','update','_data','width','12RIvMjv','6430801vszedY','auto','methods','8pVCDGd','mouseMove','fromDegrees','set','mars3d-mapv','block','__esModule','absolute','trails','308ydJZqF','top','fillStyle','558KlMGZm','removeData','map','canvasLayer','EventType','2499519tJxnrp','updateData','push','addData','geometry','dataSet','DomUtil','0px','function','mousemove','Cartesian3','_onMapClick','_size','Point','pointerEvents','length','camera','register','off','cartesianToCanvasCoordinates','mapvDepthTest','COLOR_BUFFER_BIT','cameraMoveEnd','_mapVRenderer','_onMapMouseMove','MultiPolygon','bind','init','defineProperty','Rectangle','mapvFixedHeight','_map','positionWC','context','none','isEnabledTime','535266dxKcVX','argCheck','48lugmPj','xmax','animator','mapv','_pointerEvents','MapVLayer','50YsbOBZ','getContext','getData','_reset','style','51252JSoTlx','_removedHook','211910ZAwoVt','unbindEvent','2559382xiuSIB','3516MCIClX','animatorMoveendEvent','_setOptionsHook','hasOwnProperty','clickEvent','animation','height','options','create','get','_canvasUpdate','clearRect','animatorMovestartEvent','display','initDataRange','_onMoveEndEvent','DataSet'];_0x5b3c=function(){return _0x162394;};return _0x5b3c();}(function(_0x148770,_0x3339ae){const _0x1fecc0={_0x235446:0x1a2,_0x1215b3:0x19d,_0x4d11dc:0x19f,_0x5e8016:0x192,_0x464e45:0x15b,_0x47bcf2:0x190,_0x491e63:0x198},_0x241ce9=_0xdc8d,_0x5472bd=_0x148770();while(!![]){try{const _0x5023cb=-parseInt(_0x241ce9(0x167))/0x1*(parseInt(_0x241ce9(_0x1fecc0._0x235446))/0x2)+-parseInt(_0x241ce9(_0x1fecc0._0x1215b3))/0x3*(-parseInt(_0x241ce9(0x164))/0x4)+-parseInt(_0x241ce9(_0x1fecc0._0x4d11dc))/0x5*(-parseInt(_0x241ce9(_0x1fecc0._0x5e8016))/0x6)+parseInt(_0x241ce9(0x1a1))/0x7*(-parseInt(_0x241ce9(_0x1fecc0._0x464e45))/0x8)+-parseInt(_0x241ce9(_0x1fecc0._0x47bcf2))/0x9*(parseInt(_0x241ce9(_0x1fecc0._0x491e63))/0xa)+parseInt(_0x241ce9(0x16c))/0xb+-parseInt(_0x241ce9(0x1c2))/0xc*(-parseInt(_0x241ce9(0x1c3))/0xd);if(_0x5023cb===_0x3339ae)break;else _0x5472bd['push'](_0x5472bd['shift']());}catch(_0x40313d){_0x5472bd['push'](_0x5472bd['shift']());}}}(_0x5b3c,0xb2d36));function _interopNamespace(_0x26ac0d){const _0x35b8b6={_0x47038f:0x161},_0x20d6c2={_0x4ff5d2:0x188},_0x248c76=_0xdc8d;if(_0x26ac0d&&_0x26ac0d[_0x248c76(_0x35b8b6._0x47038f)])return _0x26ac0d;var _0x5ac382=Object['create'](null);return _0x26ac0d&&Object['keys'](_0x26ac0d)['forEach'](function(_0x127c54){const _0x4b0889=_0x248c76;if(_0x127c54!=='default'){var _0x5b3019=Object['getOwnPropertyDescriptor'](_0x26ac0d,_0x127c54);Object[_0x4b0889(_0x20d6c2._0x4ff5d2)](_0x5ac382,_0x127c54,_0x5b3019['get']?_0x5b3019:{'enumerable':!![],'get':function(){return _0x26ac0d[_0x127c54];}});}}),_0x5ac382['default']=_0x26ac0d,_0x5ac382;}var mapv__namespace=_interopNamespace(mapv),mars3d__namespace=_interopNamespace(mars3d);const Cesium$1=mars3d__namespace[_0x5d17ab(0x1b7)],baiduMapLayer=mapv__namespace?mapv__namespace['baiduMapLayer']:null,BaseLayer$1=baiduMapLayer?baiduMapLayer['__proto__']:Function;class MapVRenderer extends BaseLayer$1{constructor(_0x5e03ae,_0x1516c7,_0x3e6182,_0x1b13d4){const _0x262fe8={_0x1fc1a0:0x191,_0x315928:0x1a7},_0x45c781=_0x5d17ab;super(_0x5e03ae,_0x1516c7,_0x3e6182);if(!BaseLayer$1)return;this[_0x45c781(0x169)]=_0x5e03ae,this['scene']=_0x5e03ae['scene'],this['dataSet']=_0x1516c7,_0x3e6182=_0x3e6182||{},this['init'](_0x3e6182),this[_0x45c781(_0x262fe8._0x1fc1a0)](_0x3e6182),this['initDevicePixelRatio'](),this['canvasLayer']=_0x1b13d4,this['stopAniamation']=!0x1,this[_0x45c781(_0x262fe8._0x315928)]=_0x3e6182['animation'];}['initDevicePixelRatio'](){this['devicePixelRatio']=window['devicePixelRatio']||0x1;}['addAnimatorEvent'](){}['animatorMovestartEvent'](){const _0x59a9ea=_0x5d17ab,_0x47590f=this['options']['animation'];this['isEnabledTime']()&&this[_0x59a9ea(0x194)]&&(this[_0x59a9ea(0x1ba)]['step']=_0x47590f['stepsRange']['start']);}[_0x5d17ab(0x1a3)](){const _0x165d1b=_0x5d17ab;this[_0x165d1b(0x18f)]()&&this[_0x165d1b(0x194)];}['getContext'](){const _0x3efa7d=_0x5d17ab;return this[_0x3efa7d(0x16a)]['canvas']['getContext'](this['context']);}[_0x5d17ab(0x187)](_0x139ed3){const _0x2855d4=_0x5d17ab;this['options']=_0x139ed3,this[_0x2855d4(0x1b0)](_0x139ed3),this['context']=this['options']['context']||'2d',Cesium$1['defined'](this['options']['zIndex'])&&this['canvasLayer']&&this['canvasLayer']['setZIndex']&&this['canvasLayer']['setZIndex'](this['options']['zIndex']),this['initAnimator']();}[_0x5d17ab(0x1ac)](_0x34b28f){const _0x252889={_0x4ea08f:0x199,_0x21ea89:0x1b5,_0x12c7f:0x178},_0x40c878={_0x2366af:0x18a,_0x21f231:0x176,_0x51d1e0:0x17f},_0x219af5=_0x5d17ab,_0x585156=this['scene'];if(this['canvasLayer']&&!this['stopAniamation']){const _0x161cfd=this[_0x219af5(0x1a9)]['animation'],_0x539f09=this[_0x219af5(_0x252889._0x4ea08f)]();if(this['isEnabledTime']()){if(void 0x0===_0x34b28f)return void this['clear'](_0x539f09);this['context']==='2d'&&(_0x539f09['save'](),_0x539f09['globalCompositeOperation']='destination-out',_0x539f09[_0x219af5(0x166)]='rgba(0,\x200,\x200,\x20.1)',_0x539f09['fillRect'](0x0,0x0,_0x539f09['canvas']['width'],_0x539f09['canvas']['height']),_0x539f09[_0x219af5(_0x252889._0x21ea89)]());}else this['clear'](_0x539f09);if(this['context']==='2d')for(const _0x54421f in this['options']){_0x539f09[_0x54421f]=this[_0x219af5(0x1a9)][_0x54421f];}else _0x539f09['clear'](_0x539f09[_0x219af5(0x181)]);const _0xac00b5={'transferCoordinate':function(_0x528504){const _0x51d99b=_0x219af5,_0x102647=null;let _0x24dbfb=_0x585156[_0x51d99b(_0x40c878._0x2366af)];_0x585156['mapvAutoHeight']&&(_0x24dbfb=_0x585156['getHeight'](Cesium$1['Cartographic'][_0x51d99b(0x15d)](_0x528504[0x0],_0x528504[0x1])));const _0x55424a=Cesium$1[_0x51d99b(_0x40c878._0x21f231)]['fromDegrees'](_0x528504[0x0],_0x528504[0x1],_0x24dbfb);if(!_0x55424a)return _0x102647;const _0x22f85a=_0x585156[_0x51d99b(_0x40c878._0x51d1e0)](_0x55424a);if(!_0x22f85a)return _0x102647;if(_0x585156['mapvDepthTest']&&_0x585156['mode']===Cesium$1['SceneMode']['SCENE3D']){const _0x9c4005=new Cesium$1['EllipsoidalOccluder'](_0x585156['globe']['ellipsoid'],_0x585156[_0x51d99b(0x17c)][_0x51d99b(0x18c)]),_0xdc3597=_0x9c4005[_0x51d99b(0x1bc)](_0x55424a);if(!_0xdc3597)return _0x102647;}return[_0x22f85a['x'],_0x22f85a['y']];}};void 0x0!==_0x34b28f&&(_0xac00b5[_0x219af5(0x1bb)]=function(_0x1682ca){const _0x2f4da0=_0x219af5,_0x2b8599=_0x161cfd[_0x2f4da0(0x163)]||0xa;return!!(_0x34b28f&&_0x1682ca['time']>_0x34b28f-_0x2b8599&&_0x1682ca['time']<_0x34b28f);});const _0x4e099e=this['dataSet']['get'](_0xac00b5);this['processData'](_0x4e099e),this['options']['unit']==='m'&&this['options']['size'],this['options'][_0x219af5(_0x252889._0x12c7f)]=this['options']['size'];const _0x28dfba=_0x585156['cartesianToCanvasCoordinates'](Cesium$1['Cartesian3']['fromDegrees'](0x0,0x0));if(!_0x28dfba)return;this['drawContext'](_0x539f09,new mapv__namespace['DataSet'](_0x4e099e),this['options'],_0x28dfba),this['options']['updateCallback']&&this[_0x219af5(0x1a9)]['updateCallback'](_0x34b28f);}}['updateData'](_0xd2e4f7,_0x5acd3d){const _0x452e15=_0x5d17ab;let _0x2c45b6=_0xd2e4f7;_0x2c45b6&&_0x2c45b6['get']&&(_0x2c45b6=_0x2c45b6['get']()),void 0x0!==_0x2c45b6&&this[_0x452e15(0x171)]['set'](_0x2c45b6),super['update']({'options':_0x5acd3d});}['addData'](_0x149c09,_0x12ee7a){const _0x4f754c={_0x3d7409:0x1bf},_0x22c006=_0x5d17ab;let _0x126f7a=_0x149c09;_0x149c09&&_0x149c09[_0x22c006(0x1ab)]&&(_0x126f7a=_0x149c09['get']()),this['dataSet']['add'](_0x126f7a),this[_0x22c006(_0x4f754c._0x3d7409)]({'options':_0x12ee7a});}['getData'](){return this['dataSet'];}['removeData'](_0x5e948d){const _0x145a4c=_0x5d17ab;if(this['dataSet']){const _0x266d09=this[_0x145a4c(0x171)]['get']({'filter':function(_0x28655f){const _0x347f02=_0x145a4c;return _0x5e948d==null||typeof _0x5e948d!==_0x347f02(0x174)||!_0x5e948d(_0x28655f);}});this['dataSet'][_0x145a4c(0x15e)](_0x266d09),this['update']({'options':null});}}['clearData'](){const _0xcd0815=_0x5d17ab;this['dataSet']&&this[_0xcd0815(0x171)]['clear'](),this['update']({'options':null});}['draw'](){this['canvasLayer']['draw']();}['clear'](_0x45d828){const _0x4e85ae={_0xea3333:0x1ad},_0x26c94c=_0x5d17ab;_0x45d828&&_0x45d828[_0x26c94c(_0x4e85ae._0xea3333)]&&_0x45d828[_0x26c94c(0x1ad)](0x0,0x0,_0x45d828['canvas'][_0x26c94c(0x1c1)],_0x45d828['canvas'][_0x26c94c(0x1a8)]);}['destroy'](){const _0x489243={_0x387267:0x194},_0xae023a=_0x5d17ab;this['clear'](this['getContext']()),this['clearData'](),this['animator']&&this['animator']['stop'](),this[_0xae023a(_0x489243._0x387267)]=null,this[_0xae023a(0x16a)]=null;}}if(mapv__namespace!==null&&mapv__namespace!==void 0x0&&mapv__namespace['DataSet'])mapv__namespace['DataSet']['prototype'][_0x5d17ab(0x1b4)]=function(_0x11e8f5,_0x252402,_0x69489e,_0x479cc1){const _0x3d56a9={_0x9c4c11:0x170,_0x27baaf:0x179,_0x52aa63:0x16e},_0x3ecca2={_0x53866d:0x16e},_0x36fb87=_0x5d17ab;_0x479cc1=_0x479cc1||'_coordinates',_0x69489e=_0x69489e||'coordinates';for(let _0x304c43=0x0;_0x304c43<_0x11e8f5['length'];_0x304c43++){const _0x43121c=_0x11e8f5[_0x304c43][_0x36fb87(_0x3d56a9._0x9c4c11)],_0x101f84=_0x43121c[_0x69489e];switch(_0x43121c['type']){case _0x36fb87(_0x3d56a9._0x27baaf):{const _0x41263b=_0x252402(_0x101f84);_0x41263b?_0x43121c[_0x479cc1]=_0x41263b:_0x43121c[_0x479cc1]=[-0x3e7,-0x3e7];}break;case'LineString':{const _0x34a24c=[];for(let _0x4338f1=0x0;_0x4338f1<_0x101f84['length'];_0x4338f1++){const _0x2d986b=_0x252402(_0x101f84[_0x4338f1]);_0x2d986b&&_0x34a24c[_0x36fb87(0x16e)](_0x2d986b);}_0x43121c[_0x479cc1]=_0x34a24c;}break;case'MultiLineString':case'Polygon':{const _0x2d0142=_0x493e4a(_0x101f84);_0x43121c[_0x479cc1]=_0x2d0142;}break;case _0x36fb87(0x185):{const _0x176c3a=[];for(let _0x2c4df0=0x0;_0x2c4df0<_0x101f84[_0x36fb87(0x17b)];_0x2c4df0++){const _0x40f012=_0x493e4a(_0x101f84[_0x2c4df0]);_0x40f012['length']>0x0&&_0x176c3a[_0x36fb87(_0x3d56a9._0x52aa63)](_0x40f012);}_0x43121c[_0x479cc1]=_0x176c3a;}break;}}function _0x493e4a(_0x1db71c){const _0x18e617=_0x36fb87,_0x1d7046=[];for(let _0xcd7c66=0x0;_0xcd7c66<_0x1db71c[_0x18e617(0x17b)];_0xcd7c66++){const _0x4e2c98=_0x1db71c[_0xcd7c66],_0x2f5605=[];for(let _0x24e11d=0x0;_0x24e11d<_0x4e2c98[_0x18e617(0x17b)];_0x24e11d++){const _0x45ee61=_0x252402(_0x4e2c98[_0x24e11d]);_0x45ee61&&_0x2f5605[_0x18e617(_0x3ecca2._0x53866d)](_0x45ee61);}_0x2f5605[_0x18e617(0x17b)]>0x0&&_0x1d7046['push'](_0x2f5605);}return _0x1d7046;}return _0x11e8f5;};else throw new Error('请引入\x20mapv\x20库\x20');function _0xdc8d(_0x173e89,_0x1a2816){const _0x5b3ca3=_0x5b3c();return _0xdc8d=function(_0xdc8d86,_0x84cb7e){_0xdc8d86=_0xdc8d86-0x159;let _0x461d24=_0x5b3ca3[_0xdc8d86];return _0x461d24;},_0xdc8d(_0x173e89,_0x1a2816);}const Cesium=mars3d__namespace['Cesium'],BaseLayer=mars3d__namespace['layer']['BaseLayer'];class MapVLayer extends BaseLayer{constructor(_0x2497e3,_0x187e2c){const _0x2309f8=_0x5d17ab;super(_0x2497e3),this[_0x2309f8(0x196)]=this['options']['pointerEvents'],this['dataSet']=_0x187e2c||new mapv__namespace[(_0x2309f8(0x1b2))](_0x2497e3['data']),this['canvas']=null;}get[_0x5d17ab(0x17a)](){return this['_pointerEvents'];}set[_0x5d17ab(0x17a)](_0x4ab1df){const _0x55dfae={_0x5c9cfa:0x17a},_0x1cf990=_0x5d17ab;this['_pointerEvents']=_0x4ab1df,this[_0x1cf990(0x1b3)]&&(_0x4ab1df?this['canvas']['style']['pointerEvents']='all':this['canvas']['style'][_0x1cf990(_0x55dfae._0x5c9cfa)]=_0x1cf990(0x18e));}['_showHook'](_0x1111cc){const _0x4e49c1={_0x4214fb:0x160,_0x14d2d2:0x1b3},_0x159721=_0x5d17ab;_0x1111cc?this[_0x159721(0x1b3)]['style']['display']=_0x159721(_0x4e49c1._0x4214fb):this[_0x159721(_0x4e49c1._0x14d2d2)]['style'][_0x159721(0x1af)]='none';}['_mountedHook'](){const _0x181fd7=_0x5d17ab;this['_map']['scene'][_0x181fd7(0x180)]=this['options']['depthTest']??!![],this[_0x181fd7(0x18b)]['scene']['mapvAutoHeight']=this['options']['clampToGround']??![],this['_map']['scene'][_0x181fd7(0x18a)]=this['options']['fixedHeight']??0x0;}['_addedHook'](){const _0x2ec8f9={_0x1f867c:0x1c0,_0xc68135:0x1a9},_0x4f3034=_0x5d17ab;this['dataSet']&&(!this['dataSet']['_data']||this['dataSet'][_0x4f3034(_0x2ec8f9._0x1f867c)]['length']===0x0)&&(this['dataSet']['_data']=[]['concat'](this['dataSet']['_dataCache'])),this['_mapVRenderer']=new MapVRenderer(this['_map'],this['dataSet'],this[_0x4f3034(_0x2ec8f9._0xc68135)],this),this['initDevicePixelRatio'](),this['canvas']=this['_createCanvas'](),this['render']=this['render'][_0x4f3034(0x186)](this),this['bindEvent'](),this['_reset']();}[_0x5d17ab(0x19e)](){this['unbindEvent'](),this['_mapVRenderer']&&(this['_mapVRenderer']['destroy'](),this['_mapVRenderer']=null),this['canvas']['parentElement']['removeChild'](this['canvas']);}['initDevicePixelRatio'](){this['devicePixelRatio']=window['devicePixelRatio']||0x1;}['bindEvent'](){const _0x179663={_0x23bbaf:0x1a9,_0x27257e:0x1be,_0x265e66:0x15a,_0x32ea84:0x16b,_0x59ff23:0x184},_0xd97bff=_0x5d17ab;var _0x3b339b,_0xce0569;this['_map']['on'](mars3d__namespace['EventType']['mouseDown'],this['_onMoveStartEvent'],this),this['_map']['on'](mars3d__namespace['EventType']['cameraMoveStart'],this['_onMoveStartEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0xd97bff(0x182)],this['_onMoveEndEvent'],this),(_0x3b339b=this[_0xd97bff(_0x179663._0x23bbaf)])!==null&&_0x3b339b!==void 0x0&&(_0x3b339b=_0x3b339b['methods'])!==null&&_0x3b339b!==void 0x0&&_0x3b339b[_0xd97bff(_0x179663._0x27257e)]&&this['_map']['on'](mars3d__namespace['EventType']['click'],this['_onMapClick'],this),(_0xce0569=this['options'])!==null&&_0xce0569!==void 0x0&&(_0xce0569=_0xce0569[_0xd97bff(_0x179663._0x265e66)])!==null&&_0xce0569!==void 0x0&&_0xce0569['mousemove']&&this['_map']['on'](mars3d__namespace[_0xd97bff(_0x179663._0x32ea84)]['mouseMove'],this[_0xd97bff(_0x179663._0x59ff23)],this);}[_0x5d17ab(0x1a0)](){const _0x22f7bf={_0x26cbad:0x18b,_0x21c52d:0x18b,_0x1149cf:0x17e,_0x53025c:0x16b,_0x527ae9:0x19b,_0x5cbee3:0x175},_0x2f2ec6=_0x5d17ab;var _0x2af4a6,_0x2763e5;this['_map']['off'](mars3d__namespace['EventType']['mouseDown'],this['_onMoveStartEvent'],this),this[_0x2f2ec6(_0x22f7bf._0x26cbad)]['off'](mars3d__namespace[_0x2f2ec6(0x16b)]['cameraMoveStart'],this['_onMoveStartEvent'],this),this[_0x2f2ec6(_0x22f7bf._0x21c52d)][_0x2f2ec6(_0x22f7bf._0x1149cf)](mars3d__namespace['EventType']['cameraMoveEnd'],this[_0x2f2ec6(0x1b1)],this),this['_map'][_0x2f2ec6(0x17e)](mars3d__namespace[_0x2f2ec6(_0x22f7bf._0x53025c)]['postRender'],this[_0x2f2ec6(_0x22f7bf._0x527ae9)],this),(_0x2af4a6=this['options'])!==null&&_0x2af4a6!==void 0x0&&(_0x2af4a6=_0x2af4a6[_0x2f2ec6(0x15a)])!==null&&_0x2af4a6!==void 0x0&&_0x2af4a6['click']&&this['_map']['off'](mars3d__namespace['EventType']['click'],this[_0x2f2ec6(0x177)],this),(_0x2763e5=this['options'])!==null&&_0x2763e5!==void 0x0&&(_0x2763e5=_0x2763e5['methods'])!==null&&_0x2763e5!==void 0x0&&_0x2763e5[_0x2f2ec6(_0x22f7bf._0x5cbee3)]&&this['_map'][_0x2f2ec6(0x17e)](mars3d__namespace[_0x2f2ec6(_0x22f7bf._0x53025c)]['mouseMove'],this['_onMapMouseMove'],this);}['_onMoveStartEvent'](){const _0x245e8f={_0x43cb12:0x1ae,_0x5b8ce9:0x19b},_0x500851=_0x5d17ab;this['_mapVRenderer']&&(this[_0x500851(0x183)][_0x500851(_0x245e8f._0x43cb12)](),this['_map']['off'](mars3d__namespace[_0x500851(0x16b)]['postRender'],this[_0x500851(_0x245e8f._0x5b8ce9)],this),this['_map']['on'](mars3d__namespace['EventType']['postRender'],this[_0x500851(_0x245e8f._0x5b8ce9)],this));}[_0x5d17ab(0x1b1)](){const _0xdc5668={_0x51a9ad:0x16b},_0xc0937d=_0x5d17ab;this['_mapVRenderer']&&(this[_0xc0937d(0x18b)]['off'](mars3d__namespace[_0xc0937d(_0xdc5668._0x51a9ad)]['postRender'],this['_reset'],this),this[_0xc0937d(0x183)][_0xc0937d(0x1a3)](),this['_reset']());}[_0x5d17ab(0x1a4)](_0x474ddb,_0x56073a){this['_removedHook'](),this['_addedHook']();}[_0x5d17ab(0x16f)](_0x2ea9ff){this['_mapVRenderer']&&this['_mapVRenderer']['addData'](_0x2ea9ff,this['options']);}[_0x5d17ab(0x16d)](_0x26b047){const _0x128fe7={_0x29e098:0x183},_0x3e5d0b=_0x5d17ab;this['_mapVRenderer']&&this[_0x3e5d0b(_0x128fe7._0x29e098)]['updateData'](_0x26b047,this[_0x3e5d0b(0x1a9)]);}[_0x5d17ab(0x19a)](){const _0x581d3c={_0x2382c9:0x171},_0x3665ac=_0x5d17ab;return this['_mapVRenderer']&&(this[_0x3665ac(_0x581d3c._0x2382c9)]=this['_mapVRenderer']['getData']()),this['dataSet'];}[_0x5d17ab(0x168)](_0x4e6dff){const _0xe8a244=_0x5d17ab;this[_0xe8a244(0x183)]&&this['_mapVRenderer']['removeData'](_0x4e6dff);}['removeAllData'](){const _0x3f9fea={_0x25bf98:0x183},_0x228a10=_0x5d17ab;this['_mapVRenderer']&&this[_0x228a10(_0x3f9fea._0x25bf98)]['clearData']();}['_createCanvas'](){const _0x236b53={_0x439212:0x172,_0x18bf48:0x15f,_0x355320:0x162,_0x3620ae:0x19c,_0x4de46d:0x173,_0x477480:0x19c,_0x256d5b:0x18b,_0x4a51a5:0x1a8,_0x262e3c:0x159,_0x2bc23e:0x18d},_0x3f862d=_0x5d17ab,_0x358f42=mars3d__namespace[_0x3f862d(_0x236b53._0x439212)][_0x3f862d(0x1aa)]('canvas',_0x3f862d(_0x236b53._0x18bf48),this['_map']['container']);_0x358f42['id']=this['id'],_0x358f42['style']['position']=_0x3f862d(_0x236b53._0x355320),_0x358f42[_0x3f862d(_0x236b53._0x3620ae)][_0x3f862d(0x165)]='0px',_0x358f42['style']['left']=_0x3f862d(_0x236b53._0x4de46d),_0x358f42['width']=parseInt(this['_map']['canvas']['width']),_0x358f42['height']=parseInt(this['_map']['canvas']['height']),_0x358f42[_0x3f862d(_0x236b53._0x477480)]['width']=this[_0x3f862d(_0x236b53._0x256d5b)]['canvas']['style'][_0x3f862d(0x1c1)],_0x358f42['style']['height']=this[_0x3f862d(_0x236b53._0x256d5b)]['canvas']['style'][_0x3f862d(_0x236b53._0x4a51a5)],_0x358f42['style'][_0x3f862d(0x17a)]=this['_pointerEvents']?_0x3f862d(_0x236b53._0x262e3c):'none',_0x358f42['style']['zIndex']=this['options']['zIndex']??0x9;if(this['options'][_0x3f862d(_0x236b53._0x2bc23e)]==='2d'){const _0x51f4e1=this['devicePixelRatio'];_0x358f42['getContext'](this['options'][_0x3f862d(0x18d)])['scale'](_0x51f4e1,_0x51f4e1);}return _0x358f42;}['_reset'](){this['resize'](),this['render']();}['draw'](){this['_reset']();}['remove'](){const _0x365726={_0x59a0e1:0x183},_0x1c58eb=_0x5d17ab;this['_mapVRenderer']&&(this[_0x1c58eb(_0x365726._0x59a0e1)][_0x1c58eb(0x1b9)](),this['_mapVRenderer']=null),this['canvas']['parentElement']['removeChild'](this['canvas']);}['render'](){const _0x5613e1=_0x5d17ab;this[_0x5613e1(0x183)]['_canvasUpdate']();}['resize'](){const _0x532e93={_0x54bb19:0x165,_0x2c2406:0x1b3},_0x34925e=_0x5d17ab;if(this['canvas']){const _0x95bfb=this['canvas'];_0x95bfb[_0x34925e(0x19c)]['position']=_0x34925e(0x162),_0x95bfb[_0x34925e(0x19c)][_0x34925e(_0x532e93._0x54bb19)]='0px',_0x95bfb[_0x34925e(0x19c)]['left']='0px',_0x95bfb['width']=parseInt(this['_map']['canvas']['width']),_0x95bfb['height']=parseInt(this['_map']['canvas']['height']),_0x95bfb['style'][_0x34925e(0x1c1)]=this['_map'][_0x34925e(0x1b3)]['style']['width'],_0x95bfb['style']['height']=this['_map'][_0x34925e(_0x532e93._0x2c2406)]['style']['height'];}}['getRectangle'](_0xa46d29){const _0x10b689={_0x28ef07:0x171},_0x52b1f2=_0x5d17ab;if(!this['dataSet']||!this[_0x52b1f2(_0x10b689._0x28ef07)]['_data'])return;const _0x1b4be0=mars3d__namespace[_0x52b1f2(0x1bd)]['getExtentByGeoJSON']({'type':'FeatureCollection','features':this['dataSet']['_data']});if(!_0x1b4be0)return;return _0xa46d29!==null&&_0xa46d29!==void 0x0&&_0xa46d29['isFormat']?_0x1b4be0:Cesium[_0x52b1f2(0x189)]['fromDegrees'](_0x1b4be0['xmin'],_0x1b4be0['ymin'],_0x1b4be0[_0x52b1f2(0x193)],_0x1b4be0['ymax']);}[_0x5d17ab(0x177)](_0x1fd6fd){const _0x188e87=_0x5d17ab;this['_cache_event']=_0x1fd6fd,this[_0x188e87(0x183)]&&this['_mapVRenderer'][_0x188e87(0x1a6)](_0x1fd6fd['windowPosition'],_0x1fd6fd);}['_onMapMouseMove'](_0x5947ad){const _0x22f1b9={_0x10625e:0x183},_0x2c57bc=_0x5d17ab;this['_cache_event']=_0x5947ad,this[_0x2c57bc(_0x22f1b9._0x10625e)]&&this['_mapVRenderer'][_0x2c57bc(0x1b6)](_0x5947ad['windowPosition'],_0x5947ad);}['on'](_0x319abf,_0x23d1a8,_0xa60788){const _0x2786ac={_0x3b8575:0x1a9,_0x1ec59e:0x1be,_0x5663af:0x15a,_0x46b194:0x16b},_0x12eed5=_0x5d17ab;this['options']['methods']=this[_0x12eed5(_0x2786ac._0x3b8575)][_0x12eed5(0x15a)]||{};if(_0x319abf===mars3d__namespace['EventType'][_0x12eed5(_0x2786ac._0x1ec59e)])this['options'][_0x12eed5(_0x2786ac._0x5663af)]['click']=_0x2c8153=>{_0x2c8153&&_0x23d1a8['bind'](_0xa60788)({...this['_cache_event'],'layer':this,'data':_0x2c8153});},this['_map']['on'](mars3d__namespace[_0x12eed5(_0x2786ac._0x46b194)]['click'],this['_onMapClick'],this);else _0x319abf===mars3d__namespace['EventType']['mouseMove']&&(this['options'][_0x12eed5(_0x2786ac._0x5663af)]['mousemove']=_0x1616f7=>{_0x1616f7&&_0x23d1a8['bind'](_0xa60788)({...this['_cache_event'],'layer':this,'data':_0x1616f7});},this['_map']['on'](mars3d__namespace['EventType'][_0x12eed5(0x15c)],this['_onMapMouseMove'],this));return this;}['off'](_0x618d6,_0x1b2bb1){const _0x3f34ae={_0xcf7b06:0x1be,_0x5839cd:0x15c},_0x53aae5=_0x5d17ab;if(_0x618d6==='click'){var _0x360a48;this['_map']['off'](_0x618d6,this['_onMapClick'],this),(_0x360a48=this['options']['methods'])!==null&&_0x360a48!==void 0x0&&_0x360a48['mousemove']&&delete this[_0x53aae5(0x1a9)]['methods'][_0x53aae5(_0x3f34ae._0xcf7b06)];}else{if(_0x618d6===_0x53aae5(_0x3f34ae._0x5839cd)){var _0x500ffc;this['_map']['off'](_0x618d6,this[_0x53aae5(0x184)],this),(_0x500ffc=this['options']['methods'])!==null&&_0x500ffc!==void 0x0&&_0x500ffc['mousemove']&&delete this['options']['methods']['mousemove'];}}return this;}}mars3d__namespace['LayerUtil'][_0x5d17ab(0x17d)](_0x5d17ab(0x195),MapVLayer),mars3d__namespace['layer']['MapVLayer']=MapVLayer,mars3d__namespace['mapv']=mapv__namespace,exports[_0x5d17ab(0x197)]=MapVLayer,Object['keys'](mapv)[_0x5d17ab(0x1b8)](function(_0x5e4a49){const _0x162a89={_0x4076c7:0x1a5,_0x9d05e:0x188},_0x52833c=_0x5d17ab;if(_0x5e4a49!=='default'&&!exports[_0x52833c(_0x162a89._0x4076c7)](_0x5e4a49))Object[_0x52833c(_0x162a89._0x9d05e)](exports,_0x5e4a49,{'enumerable':!![],'get':function(){return mapv[_0x5e4a49];}});}),Object['defineProperty'](exports,'__esModule',{'value':!![]});
|
|
14
|
+
'use strict';function _0x4006(_0x19eb3f,_0x3dd25d){const _0x7189e3=_0x7189();return _0x4006=function(_0x40060c,_0x464a08){_0x40060c=_0x40060c-0xff;let _0x45bfcb=_0x7189e3[_0x40060c];return _0x45bfcb;},_0x4006(_0x19eb3f,_0x3dd25d);}const _0x355512=_0x4006;(function(_0x4fa92c,_0x820112){const _0x1de405={_0x4ae13a:0x151,_0x535a37:0x114},_0x51094e=_0x4006,_0xeecfd4=_0x4fa92c();while(!![]){try{const _0x124f31=-parseInt(_0x51094e(0x10d))/0x1+parseInt(_0x51094e(_0x1de405._0x4ae13a))/0x2+-parseInt(_0x51094e(0x11a))/0x3*(-parseInt(_0x51094e(0x13b))/0x4)+parseInt(_0x51094e(0x127))/0x5+parseInt(_0x51094e(_0x1de405._0x535a37))/0x6+parseInt(_0x51094e(0x146))/0x7*(parseInt(_0x51094e(0x13f))/0x8)+parseInt(_0x51094e(0x142))/0x9*(-parseInt(_0x51094e(0x155))/0xa);if(_0x124f31===_0x820112)break;else _0xeecfd4['push'](_0xeecfd4['shift']());}catch(_0x4ac60f){_0xeecfd4['push'](_0xeecfd4['shift']());}}}(_0x7189,0x56056));function _interopNamespace(_0x2d6862){const _0x250961={_0x336cd2:0x134};if(_0x2d6862&&_0x2d6862['__esModule'])return _0x2d6862;var _0x4f20cc=Object['create'](null);return _0x2d6862&&Object['keys'](_0x2d6862)['forEach'](function(_0x3eecc3){const _0x1ab5b0=_0x4006;if(_0x3eecc3!=='default'){var _0x33e1bf=Object[_0x1ab5b0(_0x250961._0x336cd2)](_0x2d6862,_0x3eecc3);Object['defineProperty'](_0x4f20cc,_0x3eecc3,_0x33e1bf['get']?_0x33e1bf:{'enumerable':!![],'get':function(){return _0x2d6862[_0x3eecc3];}});}}),_0x4f20cc['default']=_0x2d6862,_0x4f20cc;}var mapv__namespace=_interopNamespace(mapv),mars3d__namespace=_interopNamespace(mars3d);const Cesium$1=mars3d__namespace['Cesium'],baiduMapLayer=mapv__namespace?mapv__namespace['baiduMapLayer']:null,BaseLayer$1=baiduMapLayer?baiduMapLayer['__proto__']:Function;class MapVRenderer extends BaseLayer$1{constructor(_0x57611c,_0xfe5634,_0x57682b,_0x398ba8){const _0x10e771={_0x3219ef:0x14e},_0x2cf61c=_0x4006;super(_0x57611c,_0xfe5634,_0x57682b);if(!BaseLayer$1)return;this['map']=_0x57611c,this['scene']=_0x57611c['scene'],this[_0x2cf61c(_0x10e771._0x3219ef)]=_0xfe5634,_0x57682b=_0x57682b||{},this['init'](_0x57682b),this['argCheck'](_0x57682b),this['initDevicePixelRatio'](),this['canvasLayer']=_0x398ba8,this['stopAniamation']=!0x1,this['animation']=_0x57682b['animation'];}['initDevicePixelRatio'](){this['devicePixelRatio']=window['devicePixelRatio']||0x1;}['addAnimatorEvent'](){}['animatorMovestartEvent'](){const _0x4d50d7={_0x366c0e:0x102},_0x2cbd83=_0x4006,_0x116ded=this['options']['animation'];this['isEnabledTime']()&&this['animator']&&(this[_0x2cbd83(0x113)]['step']=_0x116ded[_0x2cbd83(0x13e)][_0x2cbd83(_0x4d50d7._0x366c0e)]);}[_0x355512(0x117)](){this['isEnabledTime']()&&this['animator'];}['getContext'](){return this['canvasLayer']['canvas']['getContext'](this['context']);}['init'](_0x17c872){const _0x1f1b1b={_0x4d76fc:0x137,_0x222fda:0x123,_0x5e7da8:0x132},_0x636f91=_0x355512;this[_0x636f91(0x132)]=_0x17c872,this['initDataRange'](_0x17c872),this['context']=this['options'][_0x636f91(0x154)]||'2d',Cesium$1[_0x636f91(_0x1f1b1b._0x4d76fc)](this['options']['zIndex'])&&this[_0x636f91(0x123)]&&this[_0x636f91(0x123)]['setZIndex']&&this[_0x636f91(_0x1f1b1b._0x222fda)]['setZIndex'](this[_0x636f91(_0x1f1b1b._0x5e7da8)]['zIndex']),this['initAnimator']();}['_canvasUpdate'](_0x2cb120){const _0x4cbef2={_0x5d1bbc:0x14d,_0x4fe81a:0x121,_0x2b8db8:0x13c,_0x43be40:0x11b,_0x582335:0x108},_0x58a45c={_0x3b0c4e:0x126},_0x15de12=_0x355512,_0x2778bd=this['scene'];if(this['canvasLayer']&&!this[_0x15de12(0x135)]){const _0x1e6853=this['options']['animation'],_0x999126=this['getContext']();if(this['isEnabledTime']()){if(void 0x0===_0x2cb120)return void this['clear'](_0x999126);this['context']==='2d'&&(_0x999126['save'](),_0x999126['globalCompositeOperation']='destination-out',_0x999126['fillStyle']=_0x15de12(0x13a),_0x999126['fillRect'](0x0,0x0,_0x999126[_0x15de12(_0x4cbef2._0x5d1bbc)]['width'],_0x999126['canvas']['height']),_0x999126[_0x15de12(_0x4cbef2._0x4fe81a)]());}else this['clear'](_0x999126);if(this[_0x15de12(0x154)]==='2d')for(const _0x4dddde in this['options']){_0x999126[_0x4dddde]=this['options'][_0x4dddde];}else _0x999126['clear'](_0x999126['COLOR_BUFFER_BIT']);const _0x1782d3={'transferCoordinate':function(_0x143d22){const _0x3c9e04=_0x15de12,_0x4a6639=null;let _0x4a6ab4=_0x2778bd['mapvFixedHeight'];_0x2778bd['mapvAutoHeight']&&(_0x4a6ab4=_0x2778bd['getHeight'](Cesium$1[_0x3c9e04(_0x58a45c._0x3b0c4e)][_0x3c9e04(0x100)](_0x143d22[0x0],_0x143d22[0x1])));const _0x139e85=Cesium$1['Cartesian3']['fromDegrees'](_0x143d22[0x0],_0x143d22[0x1],_0x4a6ab4);if(!_0x139e85)return _0x4a6639;const _0x2896a9=_0x2778bd['cartesianToCanvasCoordinates'](_0x139e85);if(!_0x2896a9)return _0x4a6639;if(_0x2778bd['mapvDepthTest']&&_0x2778bd['mode']===Cesium$1['SceneMode']['SCENE3D']){const _0x58eff1=new Cesium$1['EllipsoidalOccluder'](_0x2778bd['globe']['ellipsoid'],_0x2778bd['camera']['positionWC']),_0x62b7f3=_0x58eff1['isPointVisible'](_0x139e85);if(!_0x62b7f3)return _0x4a6639;}return[_0x2896a9['x'],_0x2896a9['y']];}};void 0x0!==_0x2cb120&&(_0x1782d3[_0x15de12(_0x4cbef2._0x2b8db8)]=function(_0xd53028){const _0xc4a2b6=_0x1e6853['trails']||0xa;return!!(_0x2cb120&&_0xd53028['time']>_0x2cb120-_0xc4a2b6&&_0xd53028['time']<_0x2cb120);});const _0x3212d1=this['dataSet']['get'](_0x1782d3);this[_0x15de12(_0x4cbef2._0x43be40)](_0x3212d1),this['options']['unit']==='m'&&this['options']['size'],this['options']['_size']=this['options']['size'];const _0x444ff7=_0x2778bd['cartesianToCanvasCoordinates'](Cesium$1['Cartesian3']['fromDegrees'](0x0,0x0));if(!_0x444ff7)return;this[_0x15de12(_0x4cbef2._0x582335)](_0x999126,new mapv__namespace[(_0x15de12(0x10e))](_0x3212d1),this['options'],_0x444ff7),this['options']['updateCallback']&&this['options']['updateCallback'](_0x2cb120);}}['updateData'](_0xd91b57,_0x274559){const _0x4962d7=_0x355512;let _0x5904df=_0xd91b57;_0x5904df&&_0x5904df[_0x4962d7(0x14f)]&&(_0x5904df=_0x5904df['get']()),void 0x0!==_0x5904df&&this['dataSet']['set'](_0x5904df),super['update']({'options':_0x274559});}[_0x355512(0x106)](_0x468248,_0x406893){const _0x5784c3={_0x1753c0:0x14f},_0x41840a=_0x355512;let _0x5448f4=_0x468248;_0x468248&&_0x468248[_0x41840a(_0x5784c3._0x1753c0)]&&(_0x5448f4=_0x468248[_0x41840a(0x14f)]()),this['dataSet'][_0x41840a(0x112)](_0x5448f4),this[_0x41840a(0x158)]({'options':_0x406893});}['getData'](){return this['dataSet'];}['removeData'](_0x2cbfc6){const _0x4b750b={_0x1a55cf:0x138},_0x434d65=_0x355512;if(this['dataSet']){const _0x3b491d=this['dataSet']['get']({'filter':function(_0x250f4e){return _0x2cbfc6==null||typeof _0x2cbfc6!=='function'||!_0x2cbfc6(_0x250f4e);}});this['dataSet'][_0x434d65(_0x4b750b._0x1a55cf)](_0x3b491d),this[_0x434d65(0x158)]({'options':null});}}['clearData'](){const _0x5825e7=_0x355512;this['dataSet']&&this['dataSet']['clear'](),this[_0x5825e7(0x158)]({'options':null});}['draw'](){const _0x5993e5={_0x56435e:0x123},_0x37c573=_0x355512;this[_0x37c573(_0x5993e5._0x56435e)]['draw']();}['clear'](_0xd60c3e){const _0x114680={_0x726e4e:0x12d},_0xfb5784=_0x355512;_0xd60c3e&&_0xd60c3e[_0xfb5784(0x143)]&&_0xd60c3e['clearRect'](0x0,0x0,_0xd60c3e['canvas']['width'],_0xd60c3e['canvas'][_0xfb5784(_0x114680._0x726e4e)]);}['destroy'](){const _0x388b31={_0x238d70:0x119},_0x2554f8=_0x355512;this['clear'](this['getContext']()),this[_0x2554f8(0x103)](),this[_0x2554f8(_0x388b31._0x238d70)]&&this['animator']['stop'](),this['animator']=null,this['canvasLayer']=null;}}function _0x7189(){const _0x517c5d=['_addedHook','restore','prototype','canvasLayer','_setOptionsHook','length','Cartographic','2540970pHHQmA','getExtentByGeoJSON','cameraMoveStart','LineString','mouseMove','_onMoveStartEvent','height','mapvDepthTest','ymin','destroy','mouseDown','options','Cesium','getOwnPropertyDescriptor','stopAniamation','type','defined','set','click','rgba(0,\x200,\x200,\x20.1)','345616GCrPjG','filter','initDevicePixelRatio','stepsRange','4549136vPeoOZ','_coordinates','_reset','54LvfrCb','clearRect','ymax','scene','7dxCSHE','_canvasUpdate','LayerUtil','style','bind','display','_mapVRenderer','canvas','dataSet','get','animatorMovestartEvent','791280zaQpMm','default','top','context','3198540trSvTU','windowPosition','MapVLayer','update','transferCoordinate','devicePixelRatio','_data','_map','fromDegrees','FeatureCollection','start','clearData','mapv','_showHook','addData','forEach','drawContext','_onMapMouseMove','layer','block','methods','464448OXYuKB','DataSet','push','EventType','0px','add','steps','3433236boHlii','off','_cache_event','animatorMoveendEvent','bindEvent','animator','24jBdYIe','processData','render','width','mousemove','mapvAutoHeight'];_0x7189=function(){return _0x517c5d;};return _0x7189();}if(mapv__namespace!==null&&mapv__namespace!==void 0x0&&mapv__namespace[_0x355512(0x10e)])mapv__namespace['DataSet'][_0x355512(0x122)][_0x355512(0x159)]=function(_0x4ec509,_0x27c91c,_0xd89f84,_0x277865){const _0x49d792={_0x3df99f:0x125,_0x4f75f9:0x136,_0x832902:0x10f},_0x29f2c0=_0x355512;_0x277865=_0x277865||_0x29f2c0(0x140),_0xd89f84=_0xd89f84||'coordinates';for(let _0x5f08d0=0x0;_0x5f08d0<_0x4ec509[_0x29f2c0(_0x49d792._0x3df99f)];_0x5f08d0++){const _0x56aa32=_0x4ec509[_0x5f08d0]['geometry'],_0x374230=_0x56aa32[_0xd89f84];switch(_0x56aa32[_0x29f2c0(_0x49d792._0x4f75f9)]){case'Point':{const _0x33ae2a=_0x27c91c(_0x374230);_0x33ae2a?_0x56aa32[_0x277865]=_0x33ae2a:_0x56aa32[_0x277865]=[-0x3e7,-0x3e7];}break;case _0x29f2c0(0x12a):{const _0xd7360a=[];for(let _0x5b9281=0x0;_0x5b9281<_0x374230['length'];_0x5b9281++){const _0x34b1f6=_0x27c91c(_0x374230[_0x5b9281]);_0x34b1f6&&_0xd7360a[_0x29f2c0(_0x49d792._0x832902)](_0x34b1f6);}_0x56aa32[_0x277865]=_0xd7360a;}break;case'MultiLineString':case'Polygon':{const _0x16ecb9=_0x2781c2(_0x374230);_0x56aa32[_0x277865]=_0x16ecb9;}break;case'MultiPolygon':{const _0x58ca67=[];for(let _0x59b676=0x0;_0x59b676<_0x374230['length'];_0x59b676++){const _0x2760e0=_0x2781c2(_0x374230[_0x59b676]);_0x2760e0['length']>0x0&&_0x58ca67[_0x29f2c0(_0x49d792._0x832902)](_0x2760e0);}_0x56aa32[_0x277865]=_0x58ca67;}break;}}function _0x2781c2(_0x13c1a5){const _0x30b61b=[];for(let _0x461728=0x0;_0x461728<_0x13c1a5['length'];_0x461728++){const _0x27026e=_0x13c1a5[_0x461728],_0x4d4ea2=[];for(let _0x188a5b=0x0;_0x188a5b<_0x27026e['length'];_0x188a5b++){const _0x5ba2e6=_0x27c91c(_0x27026e[_0x188a5b]);_0x5ba2e6&&_0x4d4ea2['push'](_0x5ba2e6);}_0x4d4ea2['length']>0x0&&_0x30b61b['push'](_0x4d4ea2);}return _0x30b61b;}return _0x4ec509;};else throw new Error('请引入\x20mapv\x20库\x20');const Cesium=mars3d__namespace[_0x355512(0x133)],BaseLayer=mars3d__namespace['layer']['BaseLayer'];class MapVLayer extends BaseLayer{constructor(_0x54732b,_0x186bfd){const _0x2fad82={_0x221cf3:0x14e},_0x2548b9=_0x355512;super(_0x54732b),this['_pointerEvents']=this[_0x2548b9(0x132)]['pointerEvents'],this[_0x2548b9(_0x2fad82._0x221cf3)]=_0x186bfd||new mapv__namespace['DataSet'](_0x54732b['data']),this[_0x2548b9(0x14d)]=null;}get['pointerEvents'](){return this['_pointerEvents'];}set['pointerEvents'](_0xb0a06b){const _0x37371d={_0x23136a:0x14d},_0x28eb3d=_0x355512;this['_pointerEvents']=_0xb0a06b,this['canvas']&&(_0xb0a06b?this[_0x28eb3d(_0x37371d._0x23136a)]['style']['pointerEvents']='all':this['canvas']['style']['pointerEvents']='none');}[_0x355512(0x105)](_0x164e6b){const _0x194a3e={_0x327117:0x14b},_0x535431=_0x355512;_0x164e6b?this['canvas']['style'][_0x535431(0x14b)]=_0x535431(0x10b):this[_0x535431(0x14d)]['style'][_0x535431(_0x194a3e._0x327117)]='none';}['_mountedHook'](){const _0x1517ff={_0x4a19b7:0xff,_0x1932c4:0x12e},_0x5e4ddd=_0x355512;this[_0x5e4ddd(_0x1517ff._0x4a19b7)][_0x5e4ddd(0x145)][_0x5e4ddd(_0x1517ff._0x1932c4)]=this[_0x5e4ddd(0x132)]['depthTest']??!![],this['_map']['scene'][_0x5e4ddd(0x11f)]=this['options']['clampToGround']??![],this['_map']['scene']['mapvFixedHeight']=this['options']['fixedHeight']??0x0;}['_addedHook'](){const _0x479250={_0x39c97b:0x14e,_0x57d7ab:0x15b,_0x327e20:0x14d,_0x43fe23:0x118},_0x269e0f=_0x355512;this[_0x269e0f(_0x479250._0x39c97b)]&&(!this['dataSet']['_data']||this['dataSet'][_0x269e0f(_0x479250._0x57d7ab)]['length']===0x0)&&(this[_0x269e0f(0x14e)]['_data']=[]['concat'](this['dataSet']['_dataCache'])),this['_mapVRenderer']=new MapVRenderer(this['_map'],this['dataSet'],this['options'],this),this[_0x269e0f(0x13d)](),this[_0x269e0f(_0x479250._0x327e20)]=this['_createCanvas'](),this['render']=this['render']['bind'](this),this[_0x269e0f(_0x479250._0x43fe23)](),this['_reset']();}['_removedHook'](){const _0x5687ef=_0x355512;this['unbindEvent'](),this['_mapVRenderer']&&(this[_0x5687ef(0x14c)]['destroy'](),this['_mapVRenderer']=null),this['canvas']['parentElement']['removeChild'](this['canvas']);}[_0x355512(0x13d)](){this['devicePixelRatio']=window['devicePixelRatio']||0x1;}['bindEvent'](){const _0x3b4907={_0xe36ff4:0x129,_0x1cd21c:0x12c,_0x236a6a:0x132,_0x55d922:0x12b},_0x104bcb=_0x355512;var _0x4b900b,_0x1a0573;this['_map']['on'](mars3d__namespace[_0x104bcb(0x110)]['mouseDown'],this['_onMoveStartEvent'],this),this['_map']['on'](mars3d__namespace['EventType'][_0x104bcb(_0x3b4907._0xe36ff4)],this[_0x104bcb(_0x3b4907._0x1cd21c)],this),this['_map']['on'](mars3d__namespace['EventType']['cameraMoveEnd'],this['_onMoveEndEvent'],this),(_0x4b900b=this[_0x104bcb(_0x3b4907._0x236a6a)])!==null&&_0x4b900b!==void 0x0&&(_0x4b900b=_0x4b900b['methods'])!==null&&_0x4b900b!==void 0x0&&_0x4b900b['click']&&this['_map']['on'](mars3d__namespace['EventType']['click'],this['_onMapClick'],this),(_0x1a0573=this['options'])!==null&&_0x1a0573!==void 0x0&&(_0x1a0573=_0x1a0573['methods'])!==null&&_0x1a0573!==void 0x0&&_0x1a0573['mousemove']&&this[_0x104bcb(0xff)]['on'](mars3d__namespace['EventType'][_0x104bcb(_0x3b4907._0x55d922)],this['_onMapMouseMove'],this);}['unbindEvent'](){const _0x187970={_0x26e3dd:0x131,_0x8a66c0:0xff,_0x46d734:0x141,_0x291119:0x12b},_0x2e9271=_0x355512;var _0x33d51d,_0x13eac5;this[_0x2e9271(0xff)]['off'](mars3d__namespace['EventType'][_0x2e9271(_0x187970._0x26e3dd)],this['_onMoveStartEvent'],this),this[_0x2e9271(0xff)]['off'](mars3d__namespace['EventType']['cameraMoveStart'],this['_onMoveStartEvent'],this),this[_0x2e9271(_0x187970._0x8a66c0)][_0x2e9271(0x115)](mars3d__namespace['EventType']['cameraMoveEnd'],this['_onMoveEndEvent'],this),this['_map']['off'](mars3d__namespace['EventType']['postRender'],this[_0x2e9271(_0x187970._0x46d734)],this),(_0x33d51d=this['options'])!==null&&_0x33d51d!==void 0x0&&(_0x33d51d=_0x33d51d[_0x2e9271(0x10c)])!==null&&_0x33d51d!==void 0x0&&_0x33d51d[_0x2e9271(0x139)]&&this[_0x2e9271(0xff)]['off'](mars3d__namespace['EventType']['click'],this['_onMapClick'],this),(_0x13eac5=this['options'])!==null&&_0x13eac5!==void 0x0&&(_0x13eac5=_0x13eac5['methods'])!==null&&_0x13eac5!==void 0x0&&_0x13eac5['mousemove']&&this['_map'][_0x2e9271(0x115)](mars3d__namespace['EventType'][_0x2e9271(_0x187970._0x291119)],this[_0x2e9271(0x109)],this);}['_onMoveStartEvent'](){const _0x3245f1={_0x3472da:0x150},_0xf61599=_0x355512;this['_mapVRenderer']&&(this['_mapVRenderer'][_0xf61599(_0x3245f1._0x3472da)](),this[_0xf61599(0xff)]['off'](mars3d__namespace['EventType']['postRender'],this[_0xf61599(0x141)],this),this['_map']['on'](mars3d__namespace['EventType']['postRender'],this['_reset'],this));}['_onMoveEndEvent'](){const _0x2378e2=_0x355512;this['_mapVRenderer']&&(this['_map'][_0x2378e2(0x115)](mars3d__namespace['EventType']['postRender'],this[_0x2378e2(0x141)],this),this[_0x2378e2(0x14c)]['animatorMoveendEvent'](),this[_0x2378e2(0x141)]());}[_0x355512(0x124)](_0x23645c,_0x4b5772){const _0x58f6dd=_0x355512;this['_removedHook'](),this[_0x58f6dd(0x120)]();}['addData'](_0x188fbd){const _0x31d80a={_0x384b3b:0x132},_0x1c7aaf=_0x355512;this[_0x1c7aaf(0x14c)]&&this['_mapVRenderer']['addData'](_0x188fbd,this[_0x1c7aaf(_0x31d80a._0x384b3b)]);}['updateData'](_0x7d12df){this['_mapVRenderer']&&this['_mapVRenderer']['updateData'](_0x7d12df,this['options']);}['getData'](){return this['_mapVRenderer']&&(this['dataSet']=this['_mapVRenderer']['getData']()),this['dataSet'];}['removeData'](_0x49ad50){const _0xbfa17f={_0x29ce96:0x14c},_0x5b6ac4=_0x355512;this[_0x5b6ac4(_0xbfa17f._0x29ce96)]&&this['_mapVRenderer']['removeData'](_0x49ad50);}['removeAllData'](){this['_mapVRenderer']&&this['_mapVRenderer']['clearData']();}['_createCanvas'](){const _0x5b42e4={_0x59f2ab:0x153,_0x441090:0x11d,_0x21828a:0x149,_0x4e36fb:0x149},_0x22b496=_0x355512,_0x5dcb4c=mars3d__namespace['DomUtil']['create']('canvas','mars3d-mapv',this['_map']['container']);_0x5dcb4c['id']=this['id'],_0x5dcb4c[_0x22b496(0x149)]['position']='absolute',_0x5dcb4c['style'][_0x22b496(_0x5b42e4._0x59f2ab)]=_0x22b496(0x111),_0x5dcb4c[_0x22b496(0x149)]['left']='0px',_0x5dcb4c[_0x22b496(_0x5b42e4._0x441090)]=parseInt(this['_map']['canvas']['width']),_0x5dcb4c['height']=parseInt(this['_map']['canvas'][_0x22b496(0x12d)]),_0x5dcb4c['style'][_0x22b496(0x11d)]=this['_map'][_0x22b496(0x14d)]['style']['width'],_0x5dcb4c[_0x22b496(_0x5b42e4._0x21828a)][_0x22b496(0x12d)]=this['_map'][_0x22b496(0x14d)]['style']['height'],_0x5dcb4c[_0x22b496(_0x5b42e4._0x4e36fb)]['pointerEvents']=this['_pointerEvents']?'auto':'none',_0x5dcb4c['style']['zIndex']=this[_0x22b496(0x132)]['zIndex']??0x9;if(this['options']['context']==='2d'){const _0x23779e=this[_0x22b496(0x15a)];_0x5dcb4c['getContext'](this['options']['context'])['scale'](_0x23779e,_0x23779e);}return _0x5dcb4c;}['_reset'](){const _0x2f5999=_0x355512;this['resize'](),this[_0x2f5999(0x11c)]();}['draw'](){this['_reset']();}['remove'](){const _0x108c73={_0x4b218c:0x14c},_0x46da29=_0x355512;this[_0x46da29(_0x108c73._0x4b218c)]&&(this[_0x46da29(_0x108c73._0x4b218c)][_0x46da29(0x130)](),this['_mapVRenderer']=null),this['canvas']['parentElement']['removeChild'](this['canvas']);}['render'](){const _0x3f949a={_0x5a2a4e:0x147},_0x159c80=_0x355512;this['_mapVRenderer'][_0x159c80(_0x3f949a._0x5a2a4e)]();}['resize'](){const _0x52794b={_0x2a0481:0x14d,_0x7caea7:0x149,_0x34022a:0x153,_0x46de52:0x11d,_0x26c240:0xff},_0x2a4691=_0x355512;if(this[_0x2a4691(_0x52794b._0x2a0481)]){const _0x227583=this['canvas'];_0x227583['style']['position']='absolute',_0x227583[_0x2a4691(_0x52794b._0x7caea7)][_0x2a4691(_0x52794b._0x34022a)]='0px',_0x227583[_0x2a4691(0x149)]['left']=_0x2a4691(0x111),_0x227583[_0x2a4691(_0x52794b._0x46de52)]=parseInt(this[_0x2a4691(_0x52794b._0x26c240)][_0x2a4691(0x14d)]['width']),_0x227583[_0x2a4691(0x12d)]=parseInt(this[_0x2a4691(0xff)]['canvas']['height']),_0x227583['style']['width']=this['_map'][_0x2a4691(_0x52794b._0x2a0481)]['style']['width'],_0x227583['style']['height']=this[_0x2a4691(0xff)]['canvas'][_0x2a4691(0x149)][_0x2a4691(0x12d)];}}['getRectangle'](_0x4580b6){const _0x3b797c={_0x36a12a:0x15b,_0x3af2b5:0x101},_0x56b1f1=_0x355512;if(!this[_0x56b1f1(0x14e)]||!this['dataSet'][_0x56b1f1(_0x3b797c._0x36a12a)])return;const _0x386a26=mars3d__namespace['Util'][_0x56b1f1(0x128)]({'type':_0x56b1f1(_0x3b797c._0x3af2b5),'features':this['dataSet']['_data']});if(!_0x386a26)return;return _0x4580b6!==null&&_0x4580b6!==void 0x0&&_0x4580b6['isFormat']?_0x386a26:Cesium['Rectangle']['fromDegrees'](_0x386a26['xmin'],_0x386a26[_0x56b1f1(0x12f)],_0x386a26['xmax'],_0x386a26[_0x56b1f1(0x144)]);}['_onMapClick'](_0x4e62bf){const _0xa42e4c={_0x5af64c:0x116,_0x12b26d:0x156},_0x8c8257=_0x355512;this[_0x8c8257(_0xa42e4c._0x5af64c)]=_0x4e62bf,this[_0x8c8257(0x14c)]&&this['_mapVRenderer']['clickEvent'](_0x4e62bf[_0x8c8257(_0xa42e4c._0x12b26d)],_0x4e62bf);}['_onMapMouseMove'](_0x16ae57){const _0x173b8d={_0x32ff45:0x116,_0x32be44:0x156},_0x35c9f1=_0x355512;this[_0x35c9f1(_0x173b8d._0x32ff45)]=_0x16ae57,this['_mapVRenderer']&&this[_0x35c9f1(0x14c)]['mousemoveEvent'](_0x16ae57[_0x35c9f1(_0x173b8d._0x32be44)],_0x16ae57);}['on'](_0x391f39,_0x66b933,_0x582730){const _0x1dc3e6={_0x67a62f:0x10c,_0x46df52:0x110,_0x50ce1f:0x139,_0x26dfa5:0xff},_0x2cc1ff=_0x355512;this[_0x2cc1ff(0x132)][_0x2cc1ff(_0x1dc3e6._0x67a62f)]=this[_0x2cc1ff(0x132)]['methods']||{};if(_0x391f39===mars3d__namespace[_0x2cc1ff(_0x1dc3e6._0x46df52)][_0x2cc1ff(_0x1dc3e6._0x50ce1f)])this['options']['methods']['click']=_0x37f607=>{const _0xb511a=_0x2cc1ff;_0x37f607&&_0x66b933['bind'](_0x582730)({...this[_0xb511a(0x116)],'layer':this,'data':_0x37f607});},this[_0x2cc1ff(_0x1dc3e6._0x26dfa5)]['on'](mars3d__namespace[_0x2cc1ff(0x110)][_0x2cc1ff(0x139)],this['_onMapClick'],this);else _0x391f39===mars3d__namespace['EventType']['mouseMove']&&(this['options']['methods']['mousemove']=_0x5df9b8=>{const _0x5376fa=_0x2cc1ff;_0x5df9b8&&_0x66b933[_0x5376fa(0x14a)](_0x582730)({...this['_cache_event'],'layer':this,'data':_0x5df9b8});},this[_0x2cc1ff(0xff)]['on'](mars3d__namespace[_0x2cc1ff(0x110)]['mouseMove'],this['_onMapMouseMove'],this));return this;}[_0x355512(0x115)](_0x10f717,_0x58f5c8){const _0x28caa5={_0x202fea:0x11e,_0x1feec0:0x132},_0x2bf70d=_0x355512;if(_0x10f717==='click'){var _0x16f8a2;this[_0x2bf70d(0xff)]['off'](_0x10f717,this['_onMapClick'],this),(_0x16f8a2=this['options']['methods'])!==null&&_0x16f8a2!==void 0x0&&_0x16f8a2[_0x2bf70d(_0x28caa5._0x202fea)]&&delete this['options']['methods']['click'];}else{if(_0x10f717==='mouseMove'){var _0x9e3b73;this[_0x2bf70d(0xff)][_0x2bf70d(0x115)](_0x10f717,this['_onMapMouseMove'],this),(_0x9e3b73=this['options']['methods'])!==null&&_0x9e3b73!==void 0x0&&_0x9e3b73['mousemove']&&delete this[_0x2bf70d(_0x28caa5._0x1feec0)]['methods'][_0x2bf70d(0x11e)];}}return this;}}mars3d__namespace[_0x355512(0x148)]['register'](_0x355512(0x104),MapVLayer),mars3d__namespace[_0x355512(0x10a)]['MapVLayer']=MapVLayer,mars3d__namespace['mapv']=mapv__namespace,exports[_0x355512(0x157)]=MapVLayer,Object['keys'](mapv)[_0x355512(0x107)](function(_0x38f02c){const _0x3cc35c={_0x51ade3:0x152},_0xc3ee80=_0x355512;if(_0x38f02c!==_0xc3ee80(_0x3cc35c._0x51ade3)&&!exports['hasOwnProperty'](_0x38f02c))Object['defineProperty'](exports,_0x38f02c,{'enumerable':!![],'get':function(){return mapv[_0x38f02c];}});}),Object['defineProperty'](exports,'__esModule',{'value':!![]});
|
|
15
15
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mars3d-mapv",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.4",
|
|
4
4
|
"description": "Mars3D平台插件,结合mapv可视化功能插件",
|
|
5
5
|
"main": "dist/mars3d-mapv.js",
|
|
6
6
|
"files": [
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"mapv": "^2.0.62"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"mars3d": "~3.7.
|
|
13
|
+
"mars3d": "~3.7.4"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|