@nsc-earth-2/layer 1.0.9 → 1.0.11
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/index.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defaultValue as t,Terrain as e,CesiumTerrainProvider as n,EllipsoidTerrainProvider as s,Rectangle as r,Cesium3DTileset as i,Matrix4 as o,Cartographic as a,Cartesian3 as c,Transforms as h,Matrix3 as l,Math as p,ArcGisMapServerImageryProvider as u,ImageryLayer as f,GeographicTilingScheme as d,Ellipsoid as y,UrlTemplateImageryProvider as w,WebMapServiceImageryProvider as I,WebMapTileServiceImageryProvider as m,KmlDataSource as v}from"cesium";import{GeoJsonPrimitiveLayer as _}from"@nsc-earth-2/primitive-geojson";const E=M;function g(){const t=["url","145508kdVpYA","terrainProvider","json","setTerrain","isArray","3DJNaXl","_viewer","1785660OAlfph","239617NwMavV","flyTo","620664gmRSqP","3546342WCWpEi","bounds","then","the layer type is not 'TERRAIN'","scene","1458125TuklQA","1220HLAuNK","requestRender","locate","7kAcGSo","valid_bounds","remove","length","fromDegrees"];return(g=function(){return t})()}function M(t,e){const n=g();return(M=function(t,e){return n[t-=231]})(t,e)}!function(){const t=M,e=g();for(;;)try{if(153570===-parseInt(t(235))/1+-parseInt(t(253))/2+-parseInt(t(232))/3*(-parseInt(t(244))/4)+parseInt(t(243))/5+-parseInt(t(234))/6*(parseInt(t(247))/7)+parseInt(t(237))/8+parseInt(t(238))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class S{constructor(t){this[M(233)]=t}load(s){const r=M;s=t(s,{});if("TERRAIN"!==t(s.type,void 0))throw new Error(r(241));const i=t(s[r(252)],void 0),o=new e(n.fromUrl(i));return this._viewer[r(242)][r(256)](o),this[r(233)][r(242)][r(245)](),Promise.resolve(o)}[E(249)](t){const e=E,n=new s;this[e(233)].terrainProvider=n,this[e(233)].scene[e(245)]()}[E(246)](e,n){const s=E;e=t(e,{});const i=t(e[s(252)],void 0);fetch(i+"/layer.json")[s(240)]((t=>t[s(255)]()))[s(240)]((t=>{const e=s;t[e(248)]&&Array.isArray(t[e(248)])&&4===t[e(248)].length?this[e(233)].camera[e(236)]({destination:r[e(251)](t[e(248)][0],t[e(248)][1],t[e(248)][2],t.valid_bounds[3])}):t[e(239)]&&Array[e(231)](t.bounds)&&4==t[e(239)][e(250)]&&this[e(233)].camera[e(236)]({destination:r[e(251)](t[e(239)][0],t.bounds[1],t[e(239)][2],t[e(239)][3])})}))}show(t,n){const r=E;if(t instanceof e){if(n)this._viewer[r(242)][r(256)](t);else{const t=new s;this[r(233)][r(254)]=t}this[r(233)][r(242)][r(245)]()}}}const R=b;function T(){const t=["transferTileSet","fromDegrees","7621544cjkvrY","toDegrees","root","add","11379830kcTTZt","38154lcIIhp","scene","fromRotationZ","type","primitives","requestRender","1286244sVVyMd","fromUrl","remove","6kBGtZv","globe","8081600cfniBv","140gVgplM","3DTILES","flyTo","multiplyByMatrix3","multiply","latitude","transform","fromCartesian","toRadians","getTranslation","the url is needed","azimuth","308366hAEklw","load","_viewer","show","eastNorthUpToFixedFrame","805815unBhSw","longitude","52jezFsG"];return(T=function(){return t})()}!function(){const t=b,e=T();for(;;)try{if(836839===parseInt(t(278))/1+parseInt(t(273))/2+-parseInt(t(288))/3*(-parseInt(t(280))/4)+-parseInt(t(299))/5+-parseInt(t(297))/6*(parseInt(t(287))/7)+parseInt(t(283))/8+parseInt(t(294))/9*(parseInt(t(300))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class L{constructor(t){this[b(275)]=t}async[R(274)](e){const n=R;e=t(e,{});if(t(e[n(291)],void 0)!==n(301))throw new Error("the layer type is not '3DTILES'");const s=e.url;if(!s)throw new Error(n(271));const r={longitude:t(e[n(279)],0),latitude:t(e[n(305)],0),altitude:t(e.altitude,0),azimuth:t(e[n(272)],0)},o=await i[n(295)](s,{dynamicScreenSpaceError:!0,dynamicScreenSpaceErrorDensity:.00278,dynamicScreenSpaceErrorFactor:4,dynamicScreenSpaceErrorHeightFalloff:.25});return this[n(281)](o,r),this._viewer[n(289)][n(292)][n(286)](o),this._viewer[n(289)].requestRender(),o}transferTileSet(t,e){const n=R,{longitude:s,latitude:r,altitude:i,azimuth:u}=e;let f=new o;if(s&&r){let t=i;0==i&&(t=this[n(275)][n(289)][n(298)].getHeight(a[n(282)](s,r))||0);const e=c[n(282)](s,r,t),d=h[n(277)](e),y=new l(1,0,0,0,1,0,0,0,1),w=l.fromRotationZ(p[n(269)](u));l[n(304)](y,w,y),f=o.multiplyByMatrix3(d,y,new o)}else if(i){const e=new c;o[n(270)](t.root[n(306)],e);const s=a[n(307)](e);if(s){const t=p[n(284)](s[n(305)]),e=p[n(284)](s[n(279)]),r=c.fromDegrees(e,t,i),a=h[n(277)](r),d=new l(1,0,0,0,1,0,0,0,1),y=l[n(290)](p[n(269)](u));l.multiply(d,y,d),f=o.multiplyByMatrix3(a,d,new o)}}else if(u){const e=new l(1,0,0,0,1,0,0,0,1),s=l[n(290)](p[n(269)](u));l[n(304)](e,s,e),f=o[n(303)](t[n(285)][n(306)],e,new o)}else f=t[n(285)][n(306)];t[n(285)][n(306)]=f}remove(t){const e=R;t instanceof i&&(this[e(275)][e(289)][e(292)][e(296)](t),this[e(275)][e(289)][e(293)]())}locate(t,e){const n=R;e instanceof i&&this._viewer[n(302)](e)}show(t,e){const n=R;t instanceof i&&(t[n(276)]=e,this[n(275)][n(289)][n(293)]())}}function b(t,e){const n=T();return(b=function(t,e){return n[t-=269]})(t,e)}const k=A;function G(){const t=["type","66FbuSPo","extent","/info/iteminfo?f=pjson","load","2385aPOJle","scene","readyEvent","rectangle","_viewer","ready","token","then","fromProviderAsync","675009GqajoJ","fromDegrees","camera","fromUrl","3NPHMBp","904SXUFpZ","268936lAAmgz","876815qYJLuz","29533FspVEW","json","484018jRvIzb","locate","8706MMSxaO","imageryLayers","add","flyTo","show","addEventListener","2794716ReMwjc","getImageryRectangle","/info/iteminfo?f=pjson&token=","requestRender","remove","50fJlLMy"];return(G=function(){return t})()}function A(t,e){const n=G();return(A=function(t,e){return n[t-=213]})(t,e)}!function(){const t=A,e=G();for(;;)try{if(582569===parseInt(t(240))/1+parseInt(t(243))/2+parseInt(t(237))/3*(parseInt(t(239))/4)+-parseInt(t(224))/5*(-parseInt(t(245))/6)+parseInt(t(241))/7*(parseInt(t(238))/8)+parseInt(t(233))/9*(-parseInt(t(218))/10)+-parseInt(t(220))/11*(parseInt(t(213))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class q{constructor(t){this._viewer=t}async[k(223)](e){const n=k;e=t(e,{});if("ARCGIS"!==t(e[n(219)],void 0))throw new Error("the layer type is not 'ARCGIS'");const{url:s,alpha:i,token:o}=e;if(!s)throw new Error("the url is needed");let a=s;a=o?s+n(215)+o:s+n(222);const c=await fetch(a,{method:"GET"})[n(231)]((t=>t[n(242)]())).then((t=>{const e=n,s={};return o&&(s[e(230)]=o),t&&t[e(221)]&&Array.isArray(t[e(221)])&&(s[e(227)]=r[e(234)](t[e(221)][0][0],t[e(221)][0][1],t.extent[1][0],t[e(221)][1][1])),s})),h=u[n(236)](s,c),l=f[n(232)](h,{});return i&&(l.alpha=i),this[n(228)][n(246)][n(247)](l),this[n(228)][n(225)].requestRender(),l}async[k(217)](t){const e=k;t instanceof f&&(this[e(228)].imageryLayers[e(217)](t,!0),this._viewer[e(225)][e(216)]())}[k(244)](t,e){const n=k;if(e instanceof f)if(e[n(229)]){const t=e[n(214)]();this[n(228)][n(225)][n(235)].flyTo({destination:t})}else e[n(226)][n(250)]((t=>{const s=n,r=e[s(214)]();this._viewer.scene[s(235)][s(248)]({destination:r})}))}[k(249)](t,e){const n=k;t instanceof f&&(t[n(249)]=e,this[n(228)].scene.requestRender())}}const x=C;function C(t,e){const n=j();return(C=function(t,e){return n[t-=417]})(t,e)}!function(){const t=C,e=j();for(;;)try{if(378634===-parseInt(t(456))/1+-parseInt(t(442))/2+-parseInt(t(457))/3+-parseInt(t(454))/4+parseInt(t(452))/5*(-parseInt(t(430))/6)+-parseInt(t(428))/7*(-parseInt(t(425))/8)+parseInt(t(435))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class z{constructor(t){this[C(453)]=t}async load(e){const n=C;e=t(e,{});if(t(e[n(421)],void 0)!==n(436))throw new Error(n(460));const{url:s,alpha:i}=e;if(!s)throw new Error(n(437));let o=n(448),a=s[n(446)](0,s[n(420)](o))+"meta.json";const c=await fetch(a,{method:n(455)}).then((t=>t.json()))[n(459)]((t=>{const e=n,i={url:s};return t&&t.bounds&&(i[e(441)]=r.fromDegrees(t[e(458)][e(440)],t.bounds[e(450)],t[e(458)][e(449)],t.bounds[e(439)])),t&&4326==t[e(424)]&&(i[e(444)]=new d({ellipsoid:y[e(429)]})),t&&t.maxzoom&&(i.maximumLevel=t[e(426)]),t&&t[e(427)]&&(i.minimumLevel=t[e(427)]),t&&t[e(451)]&&(i[e(418)]=i[e(443)]=t[e(451)]),i})),h=new w(c),l=new f(h,{});return i&&(l[n(419)]=i),this[n(453)][n(434)][n(445)](l),this[n(453)][n(447)][n(461)](),l}async remove(t){const e=C;t instanceof f&&(this[e(453)][e(434)].remove(t,!0),this[e(453)][e(447)][e(461)]())}[x(417)](t,e){const n=x;if(e instanceof f)if(e.ready){const t=e.getImageryRectangle();this[n(453)][n(447)][n(432)][n(438)]({destination:t})}else e[n(433)][n(431)]((t=>{const s=n,r=e[s(423)]();this._viewer.scene[s(432)][s(438)]({destination:r})}))}[x(422)](t,e){const n=x;t instanceof f&&(t[n(422)]=e,this[n(453)].scene[n(461)]())}}function j(){const t=["south","tilesize","904740xDTvMm","_viewer","2783324EHNHzk","GET","305325cterHN","2068932SEccPl","bounds","then","the layer type is not 'URLTemplate'","requestRender","locate","tileWidth","alpha","indexOf","type","show","getImageryRectangle","proj","275312vZZBjw","maxzoom","minzoom","112SWqNKQ","WGS84","6kazvMe","addEventListener","camera","readyEvent","imageryLayers","15688251iozdTu","URLTemplate","the url is needed","flyTo","north","west","rectangle","86762LQCLEz","tileHeight","tilingScheme","add","substr","scene","{z}/{x}/{y}.png","east"];return(j=function(){return t})()}const D=J;function J(t,e){const n=W();return(J=function(t,e){return n[t-=282]})(t,e)}!function(){const t=J,e=W();for(;;)try{if(870543===-parseInt(t(302))/1*(-parseInt(t(300))/2)+parseInt(t(297))/3*(-parseInt(t(310))/4)+-parseInt(t(303))/5*(-parseInt(t(307))/6)+parseInt(t(284))/7*(parseInt(t(306))/8)+parseInt(t(285))/9*(parseInt(t(288))/10)+-parseInt(t(292))/11*(parseInt(t(298))/12)+parseInt(t(286))/13*(-parseInt(t(301))/14))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class P{constructor(t){this[J(293)]=t}async[D(305)](e){const n=D;e=t(e,{});if(t(e[n(296)],void 0)!==n(282))throw new Error(n(294));const{url:s,clampToGround:r}=e;if(!s)throw new Error(n(290));const i=new _({options:{useGroundGeometry:r??!1,clampToGround:r??!1,scene:this[n(293)][n(309)]}});return await i.load(s),this[n(293)][n(309)][n(304)][n(295)](i[n(291)]),this[n(293)][n(309)][n(299)](),i}async[D(287)](t){const e=D;t instanceof _&&(this[e(293)].scene[e(304)][e(287)](t[e(291)]),this[e(293)].scene[e(299)]())}[D(289)](t,e){const n=D;e instanceof _&&e[n(283)](this[n(293)],{tolerance:.015})}[D(308)](t,e){const n=D;t instanceof _&&(t[n(291)][n(308)]=e,this[n(293)][n(309)].requestRender())}}function W(){const t=["_viewer","the layer type is not 'GEOJSON'","add","type","774bREkjY","49128UGFqBg","requestRender","1714192iQkwFe","2324gqLYZR","2ZHWBNr","989195CzZMlK","primitives","load","56iEAArg","18MWlWhn","show","scene","10964PQrmFf","GEOJSON","flyTo","796446MvbvyH","9ndnwRe","84526kEJLEt","remove","6623720nxXApi","locate","the url is needed","primitiveCollection","2981VteCdp"];return(W=function(){return t})()}const N=B;!function(){const t=B,e=H();for(;;)try{if(902520===parseInt(t(461))/1*(parseInt(t(463))/2)+-parseInt(t(452))/3*(-parseInt(t(465))/4)+-parseInt(t(453))/5+parseInt(t(462))/6+parseInt(t(464))/7*(-parseInt(t(476))/8)+-parseInt(t(466))/9+parseInt(t(454))/10*(parseInt(t(475))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Z{constructor(t){this[B(458)]=t}async[N(468)](e){const n=N;e=t(e,{});if(t(e[n(460)],void 0)!==n(459))throw new Error(n(467));const{url:s,layers:r}=e;if(!s)throw new Error(n(451));if(!r)throw new Error(n(472));const i=new I({url:s}),o=new f(i,{});return this._viewer[n(471)][n(473)](o),this[n(458)][n(479)].requestRender(),o}async[N(477)](t){const e=N;t instanceof f&&(this._viewer[e(471)].remove(t,!0),this[e(458)][e(479)][e(455)]())}[N(457)](t,e){const n=N;if(e instanceof f)if(e[n(470)]){const t=e[n(469)]();this._viewer.scene.camera.flyTo({destination:t})}else e[n(450)][n(456)]((t=>{const s=n,r=e[s(469)]();this[s(458)][s(479)].camera[s(478)]({destination:r})}))}show(t,e){const n=N;t instanceof f&&(t[n(474)]=e,this[n(458)].scene[n(455)]())}}function H(){const t=["140hHlLwY","requestRender","addEventListener","locate","_viewer","WMS","type","37434HsHhQK","2642034lepFtw","6lWrKzn","42PkHQyM","178496jWZiUZ","1393101vczNdQ","the layer type is not 'WMS'","load","getImageryRectangle","ready","imageryLayers","the layers is needed","add","show","751025PeuHOT","988384YUJJbL","remove","flyTo","scene","readyEvent","the url is needed","45admGzg","1896270pYTwBQ"];return(H=function(){return t})()}function B(t,e){const n=H();return(B=function(t,e){return n[t-=450]})(t,e)}function K(t,e){const n=F();return(K=function(t,e){return n[t-=366]})(t,e)}const O=K;function F(){const t=["getImageryRectangle","add","remove","264151kxLgSB","4615583VIEqZP","WMTS","_viewer","the layer type is not 'WMTS'","the tileMatrixSetID is needed","2236740MuVyeJ","load","10cRJFLL","imageryLayers","tileMatrixLabels","readyEvent","camera","2175768ncGTNI","flyTo","scene","locate","the style is needed","format","1602288RZlpXB","2823819ueivsE","show","requestRender","addEventListener","1513090rhtfLU","type","subdomains"];return(F=function(){return t})()}!function(){const t=K,e=F();for(;;)try{if(740083===-parseInt(t(386))/1+parseInt(t(380))/2+parseInt(t(376))/3+-parseInt(t(392))/4+parseInt(t(394))/5*(parseInt(t(369))/6)+-parseInt(t(387))/7+-parseInt(t(375))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Q{constructor(t){this[K(389)]=t}async[O(393)](e){const n=O;e=t(e,{});if(t(e[n(381)],void 0)!==n(388))throw new Error(n(390));const{url:s,layer:r,style:i,tileMatrixSetID:o,subdomains:a,format:c,tilingScheme:h,tileMatrixLabels:l}=e;if(!s)throw new Error("the url is needed");if(!r)throw new Error("the layer is needed");if(!i)throw new Error(n(373));if(!o)throw new Error(n(391));const p={url:s,layer:r,style:i,tileMatrixSetID:o};a&&(p[n(382)]=a),c&&(p[n(374)]=c),h&&(p.tilingScheme=h),l&&(p[n(366)]=l);const u=new m(p),d=new f(u,{});return this[n(389)][n(395)][n(384)](d),this[n(389)][n(371)][n(378)](),d}async[O(385)](t){const e=O;t instanceof f&&(this._viewer.imageryLayers[e(385)](t,!0),this[e(389)][e(371)][e(378)]())}[O(372)](t,e){const n=O;if(e instanceof f)if(e.ready){const t=e[n(383)]();this[n(389)][n(371)][n(368)].flyTo({destination:t})}else e[n(367)][n(379)]((t=>{const s=n,r=e.getImageryRectangle();this[s(389)][s(371)][s(368)][s(370)]({destination:r})}))}[O(377)](t,e){const n=O;t instanceof f&&(t[n(377)]=e,this._viewer[n(371)][n(378)]())}}const U=V;function V(t,e){const n=X();return(V=function(t,e){return n[t-=440]})(t,e)}!function(){const t=V,e=X();for(;;)try{if(376266===parseInt(t(466))/1*(parseInt(t(451))/2)+-parseInt(t(462))/3+parseInt(t(445))/4+-parseInt(t(460))/5+parseInt(t(447))/6*(-parseInt(t(453))/7)+parseInt(t(454))/8+-parseInt(t(463))/9*(-parseInt(t(456))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Y{constructor(t){this[V(459)]=t}async[U(444)](e){const n=U;e=t(e,{});const s=t(e[n(465)],void 0);if(s!==n(452)&&s!==n(461))throw new Error(n(440));const{url:r,clampToGround:i}=e;if(!r)throw new Error(n(457));return this[n(459)][n(446)].add(v.load(r,{camera:this[n(459)][n(442)][n(449)],canvas:this._viewer[n(442)][n(450)],clampToGround:i??!1}))}async[U(458)](t){const e=U;t instanceof Promise&&t[e(464)]((t=>{const n=e;this[n(459)][n(446)][n(458)](t),this._viewer[n(442)].requestRender()})),t instanceof v&&(this[e(459)][e(446)][e(458)](t),this[e(459)][e(442)].requestRender())}[U(455)](t,e){const n=U;e instanceof Promise&&e[n(464)]((t=>{const e=n;this._viewer[e(448)](t)})),e instanceof v&&this[n(459)].flyTo(e)}[U(441)](t,e){const n=U;t instanceof Promise&&t.then((t=>{const n=V;t[n(441)]=e,this[n(459)][n(442)][n(443)]()})),t instanceof v&&(t.show=e,this[n(459)][n(442)][n(443)]())}}function X(){const t=["65665mwtzeG","the layer type is not 'KML' or 'KMZ","show","scene","requestRender","load","983840fHKLcc","dataSources","318QPkjCh","flyTo","camera","canvas","20lJyeKv","KML","23387uJRNQl","1103720JDODmz","locate","3763610LCIiFP","the url is needed","remove","_viewer","1005790MgMorc","KMZ","1987317SbAjJw","9XVqqfY","then","type"];return(X=function(){return t})()}const $=tt;function tt(t,e){const n=et();return(tt=function(t,e){return n[t-=389]})(t,e)}function et(){const t=["1623162JJYZjH","has","show","143OSyblR","_locate","_typeClass","bind","561712VDblsw","3XJQWSZ","10xwLuPO","1449777qwTQRz","GEOJSON","126CajGkW","delete","_viewer","_show","请输入Viewer对象!","locate","ARCGIS","_layersMap","14545269xxIUFh","get","includes","2026704mwxGKj","' is already loaded","removeById","the layer with id '","type","the url is needed","3DTILES","showById","load","URLTemplate","WMTS","_url","WMS","set","the type '","4984936eIDRVD","_id","_initLoader","30MSUMQG","locateById","_load","KML","_remove","TERRAIN","url","' is not support","1914422dvsdKY","_isSupport","_type"];return(et=function(){return t})()}!function(){const t=tt,e=et();for(;;)try{if(814077===parseInt(t(405))/1+parseInt(t(392))/2*(-parseInt(t(403))/3)+parseInt(t(433))/4+parseInt(t(436))/5*(parseInt(t(395))/6)+parseInt(t(407))/7*(parseInt(t(402))/8)+-parseInt(t(415))/9*(parseInt(t(404))/10)+parseInt(t(398))/11*(-parseInt(t(418))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class nt{constructor(t){const e=tt;if(!t)throw new Error(e(411));this[e(409)]=t,this._layersMap=new Map,this._typeClassMap=new Map}_initLoader(){const t=tt,e=this._typeClassMap[t(416)](this[t(394)]);e?this[t(400)]=e:(this[t(394)]===t(389)?this[t(400)]=new S(this[t(409)]):"3DTILES"===this[t(394)]?this._typeClass=new L(this[t(409)]):"ARCGIS"===this[t(394)]?this._typeClass=new q(this[t(409)]):this[t(394)]===t(427)?this[t(400)]=new z(this._viewer):this[t(394)]===t(430)?this[t(400)]=new Z(this._viewer):this[t(394)]===t(428)?this[t(400)]=new Q(this[t(409)]):"KML"===this._type?this[t(400)]=new Y(this[t(409)]):"GEOJSON"===this[t(394)]&&(this._typeClass=new P(this[t(409)])),this._typeClassMap[t(431)](this[t(394)],this._typeClass)),this[t(438)]=this[t(400)][t(426)].bind(this[t(400)]),this[t(440)]=this[t(400)].remove[t(401)](this._typeClass),this._locate=this[t(400)][t(412)][t(401)](this._typeClass),this[t(410)]=this[t(400)][t(397)][t(401)](this._typeClass)}async loadAsync(e){const n=tt;if(e=t(e,{}),this._id=t(e.id,void 0),this._layersMap[n(396)](this[n(434)]))throw new Error(n(421)+this[n(434)]+n(419));if(this[n(429)]=t(e[n(390)],void 0),!this[n(429)])throw new Error(n(423));if(this[n(394)]=t(e[n(422)],void 0),!this[n(393)](e[n(422)]))throw new Error(n(432)+e.type+n(391));if(this[n(435)](),"KML"===e[n(422)]){const t=this[n(438)](e);t instanceof Promise&&this[n(414)][n(431)](e.id,{options:e,layer:t})}else{const t=await this._load(e);this[n(414)].set(e.id,{options:e,layer:t})}}[$(393)](t){const e=$;return[e(389),e(424),e(413),e(427),e(430),"WMTS",e(439),e(406)][e(417)](t)}[$(420)](t){const e=$,n=this._layersMap[e(416)](t);if(this[e(414)][e(408)](t),!n)return;const{options:s,layer:r}=n;r&&(this[e(394)]=s[e(422)],this[e(435)](),this[e(440)](r))}[$(437)](t){const e=$,n=this[e(414)][e(416)](t);if(!n)return;const{options:s,layer:r}=n;r&&(this._type=s.type,this[e(435)](),this[e(399)](s,r))}[$(425)](t,e){const n=$,s=this._layersMap[n(416)](t);if(!s)return;const{options:r,layer:i}=s;i&&(this[n(394)]=r.type,this[n(435)](),this[n(410)](i,e))}destroy(){}}export{nt as default};
|
|
1
|
+
import{Terrain as t,CesiumTerrainProvider as e,EllipsoidTerrainProvider as n,Rectangle as s,Cesium3DTileset as r,Matrix4 as i,Cartographic as o,Cartesian3 as a,Transforms as c,Matrix3 as h,Math as u,ArcGisMapServerImageryProvider as l,ImageryLayer as p,GeographicTilingScheme as f,Ellipsoid as d,UrlTemplateImageryProvider as y,WebMapServiceImageryProvider as w,WebMapTileServiceImageryProvider as I,KmlDataSource as m}from"cesium";import{GeoJsonPrimitiveLayer as v}from"@nsc-earth-2/primitive-geojson";const g=E;function E(t,e){const n=R();return(E=function(t,e){return n[t-=227]})(t,e)}function R(){const t=["terrainProvider","requestRender","isArray","91BUhciI","resolve","9sglujd","_viewer","scene","441504kaMmZR","type","camera","setTerrain","the layer type is not 'TERRAIN'","73195iIWWPE","json","flyTo","valid_bounds","393710AHcxJb","33672nJcXSW","22680GgaCbh","url","379782cAHDiB","bounds","fromDegrees","remove","24qayKSx","load","/layer.json","then","151782wZRYwq","TERRAIN"];return(R=function(){return t})()}!function(){const t=E,e=R();for(;;)try{if(134730===parseInt(t(236))/1+parseInt(t(256))/2+-parseInt(t(228))/3+parseInt(t(246))/4+-parseInt(t(251))/5*(-parseInt(t(232))/6)+parseInt(t(241))/7*(-parseInt(t(257))/8)+-parseInt(t(243))/9*(parseInt(t(255))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class _{constructor(t){this[E(244)]=t}[g(233)](n){const s=g;if((n=n??{})[s(247)]!==s(237))throw new Error(s(250));const r=n[s(227)],i=new t(e.fromUrl(r));return this._viewer[s(245)][s(249)](i),this[s(244)][s(245)].requestRender(),Promise[s(242)](i)}[g(231)](t){const e=g,s=new n;this[e(244)][e(238)]=s,this[e(244)][e(245)][e(239)]()}locate(t,e){const n=g,r=(t=t??{})[n(227)];fetch(r+n(234))[n(235)]((t=>t[n(252)]()))[n(235)]((t=>{const e=n;t[e(254)]&&Array.isArray(t[e(254)])&&4===t[e(254)].length?this[e(244)].camera[e(253)]({destination:s[e(230)](t.valid_bounds[0],t[e(254)][1],t[e(254)][2],t.valid_bounds[3])}):t[e(229)]&&Array[e(240)](t.bounds)&&4==t[e(229)].length&&this[e(244)][e(248)][e(253)]({destination:s[e(230)](t[e(229)][0],t[e(229)][1],t[e(229)][2],t[e(229)][3])})}))}show(e,s){const r=g;if(e instanceof t){if(s)this[r(244)][r(245)][r(249)](e);else{const t=new n;this[r(244)][r(238)]=t}this[r(244)].scene[r(239)]()}}}const S=T;function T(t,e){const n=q();return(T=function(t,e){return n[t-=481]})(t,e)}function q(){const t=["url","remove","getHeight","4377245HoMDow","14676152FOqGSP","1795059gFqVZM","transform","flyTo","transferTileSet","toDegrees","72TFDEHI","fromRotationZ","locate","globe","multiply","2552364KLRcHt","getTranslation","2563748SSbDqN","latitude","fromCartesian","scene","_viewer","2969512yeFHnq","load","fromDegrees","root","toRadians","eastNorthUpToFixedFrame","show","add","longitude","requestRender","14626AGyCiO","multiplyByMatrix3","azimuth"];return(q=function(){return t})()}!function(){const t=T,e=q();for(;;)try{if(473940===parseInt(t(501))/1*(-parseInt(t(514))/2)+-parseInt(t(509))/3+parseInt(t(486))/4+-parseInt(t(507))/5+-parseInt(t(484))/6+parseInt(t(491))/7+parseInt(t(508))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class L{constructor(t){this[T(490)]=t}async[S(492)](t){const e=S;if("3DTILES"!==(t=t??{}).type)throw new Error("the layer type is not '3DTILES'");const n=t[e(504)];if(!n)throw new Error("the url is needed");const s={longitude:t.longitude??0,latitude:t[e(487)]??0,altitude:t.altitude??0,azimuth:t[e(503)]??0},i=await r.fromUrl(n,{dynamicScreenSpaceError:!0,dynamicScreenSpaceErrorDensity:.00278,dynamicScreenSpaceErrorFactor:4,dynamicScreenSpaceErrorHeightFalloff:.25});return this[e(512)](i,s),this[e(490)][e(489)].primitives[e(498)](i),this[e(490)][e(489)].requestRender(),i}[S(512)](t,e){const n=S,{longitude:s,latitude:r,altitude:l,azimuth:p}=e;let f=new i;if(s&&r){let t=l;0==l&&(t=this[n(490)][n(489)][n(482)][n(506)](o[n(493)](s,r))||0);const e=a[n(493)](s,r,t),d=c[n(496)](e),y=new h(1,0,0,0,1,0,0,0,1),w=h[n(515)](u[n(495)](p));h[n(483)](y,w,y),f=i[n(502)](d,y,new i)}else if(l){const e=new a;i[n(485)](t[n(494)].transform,e);const s=o[n(488)](e);if(s){const t=u[n(513)](s[n(487)]),e=u[n(513)](s[n(499)]),r=a[n(493)](e,t,l),o=c[n(496)](r),d=new h(1,0,0,0,1,0,0,0,1),y=h[n(515)](u.toRadians(p));h[n(483)](d,y,d),f=i[n(502)](o,d,new i)}}else if(p){const e=new h(1,0,0,0,1,0,0,0,1),s=h.fromRotationZ(u[n(495)](p));h[n(483)](e,s,e),f=i.multiplyByMatrix3(t.root[n(510)],e,new i)}else f=t.root[n(510)];t[n(494)].transform=f}[S(505)](t){const e=S;t instanceof r&&(this._viewer[e(489)].primitives[e(505)](t),this[e(490)][e(489)][e(500)]())}[S(481)](t,e){const n=S;e instanceof r&&this._viewer[n(511)](e)}show(t,e){const n=S;t instanceof r&&(t[n(497)]=e,this[n(490)][n(489)].requestRender())}}const M=b;function b(t,e){const n=A();return(b=function(t,e){return n[t-=122]})(t,e)}function A(){const t=["camera","token","6617105BJyFdA","_viewer","785722dSGwta","requestRender","16gXKoTT","the layer type is not 'ARCGIS'","1SsIRAx","fromProviderAsync","imageryLayers","180xGDAKv","flyTo","99453XghCyA","ready","getImageryRectangle","add","show","/info/iteminfo?f=pjson","ARCGIS","extent","fromDegrees","isArray","192rNTIGH","scene","1174613uBohuo","load","type","/info/iteminfo?f=pjson&token=","5304798OkzxyY","then","rectangle","GET","4953620jnKqXV","2469792EFpClw","json","remove","fromUrl","locate","readyEvent"];return(A=function(){return t})()}!function(){const t=b,e=A();for(;;)try{if(847140===-parseInt(t(156))/1*(parseInt(t(152))/2)+parseInt(t(161))/3*(-parseInt(t(131))/4)+parseInt(t(150))/5+parseInt(t(142))/6+-parseInt(t(141))/7*(parseInt(t(154))/8)+parseInt(t(137))/9+parseInt(t(159))/10*(parseInt(t(133))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class G{constructor(t){this[b(151)]=t}async[M(134)](t){const e=M;if((t=t??{})[e(135)]!==e(127))throw new Error(e(155));const{url:n,alpha:r,token:i}=t;if(!n)throw new Error("the url is needed");let o=n;o=i?n+e(136)+i:n+e(126);const a=await fetch(o,{method:e(140)})[e(138)]((t=>t[e(143)]())).then((t=>{const n=e,r={};return i&&(r[n(149)]=i),t&&t[n(128)]&&Array[n(130)](t.extent)&&(r[n(139)]=s[n(129)](t[n(128)][0][0],t[n(128)][0][1],t[n(128)][1][0],t[n(128)][1][1])),r})),c=l[e(145)](n,a),h=p[e(157)](c,{});return r&&(h.alpha=r),this[e(151)][e(158)][e(124)](h),this[e(151)][e(132)].requestRender(),h}async[M(144)](t){const e=M;t instanceof p&&(this._viewer[e(158)].remove(t,!0),this[e(151)].scene[e(153)]())}[M(146)](t,e){const n=M;if(e instanceof p)if(e[n(122)]){const t=e[n(123)]();this[n(151)].scene[n(148)].flyTo({destination:t})}else e[n(147)].addEventListener((t=>{const s=n,r=e[s(123)]();this[s(151)][s(132)][s(148)][s(160)]({destination:r})}))}[M(125)](t,e){const n=M;t instanceof p&&(t[n(125)]=e,this._viewer.scene[n(153)]())}}const x=C;function C(t,e){const n=F();return(C=function(t,e){return n[t-=177]})(t,e)}function F(){const t=["tileWidth","load","3132101oqgBWC","minimumLevel","alpha","east","22350550nNEPqN","imageryLayers","{z}/{x}/{y}.png","GET","_viewer","camera","substr","maxzoom","ready","bounds","north","show","type","tileHeight","meta.json","south","json","4832AMoPQI","then","add","maximumLevel","1555494mwcHdR","485003YrTqvX","getImageryRectangle","scene","remove","tilesize","4OQSIHA","URLTemplate","12186kjPUqe","minzoom","requestRender","5hlbyWT","tilingScheme","west","fromDegrees","1742640LBtLJQ","3050448gjAWEZ"];return(F=function(){return t})()}!function(){const t=C,e=F();for(;;)try{if(818583===-parseInt(t(194))/1*(parseInt(t(199))/2)+-parseInt(t(209))/3+-parseInt(t(208))/4+parseInt(t(204))/5*(-parseInt(t(193))/6)+parseInt(t(212))/7+parseInt(t(189))/8*(parseInt(t(201))/9)+parseInt(t(216))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class k{constructor(t){this[C(220)]=t}async[x(211)](t){const e=x;if((t=t??{})[e(184)]!==e(200))throw new Error("the layer type is not 'URLTemplate'");const{url:n,alpha:r}=t;if(!n)throw new Error("the url is needed");let i=e(218),o=n[e(178)](0,n.indexOf(i))+e(186);const a=await fetch(o,{method:e(219)}).then((t=>t[e(188)]()))[e(190)]((t=>{const r=e,i={url:n};return t&&t[r(181)]&&(i.rectangle=s[r(207)](t[r(181)][r(206)],t[r(181)][r(187)],t.bounds[r(215)],t.bounds[r(182)])),t&&4326==t.proj&&(i[r(205)]=new f({ellipsoid:d.WGS84})),t&&t[r(179)]&&(i[r(192)]=t[r(179)]),t&&t[r(202)]&&(i[r(213)]=t[r(202)]),t&&t[r(198)]&&(i[r(210)]=i[r(185)]=t[r(198)]),i})),c=new y(a),h=new p(c,{});return r&&(h[e(214)]=r),this[e(220)].imageryLayers[e(191)](h),this[e(220)][e(196)].requestRender(),h}async remove(t){const e=x;t instanceof p&&(this[e(220)][e(217)][e(197)](t,!0),this[e(220)][e(196)][e(203)]())}locate(t,e){const n=x;if(e instanceof p)if(e[n(180)]){const t=e[n(195)]();this._viewer[n(196)][n(177)].flyTo({destination:t})}else e.readyEvent.addEventListener((t=>{const s=n,r=e.getImageryRectangle();this._viewer[s(196)][s(177)].flyTo({destination:r})}))}[x(183)](t,e){const n=x;t instanceof p&&(t[n(183)]=e,this._viewer.scene[n(203)]())}}const D=j;function j(t,e){const n=W();return(j=function(t,e){return n[t-=208]})(t,e)}!function(){const t=j,e=W();for(;;)try{if(954816===-parseInt(t(224))/1+parseInt(t(227))/2+parseInt(t(212))/3*(-parseInt(t(209))/4)+-parseInt(t(217))/5*(parseInt(t(222))/6)+parseInt(t(223))/7*(parseInt(t(211))/8)+-parseInt(t(214))/9*(-parseInt(t(216))/10)+parseInt(t(226))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class B{constructor(t){this[j(229)]=t}async load(t){const e=j;if((t=t??{})[e(210)]!==e(213))throw new Error(e(228));const{url:n,clampToGround:s}=t;if(!n)throw new Error("the url is needed");const r=new v({options:{useGroundGeometry:s??!1,clampToGround:s??!1,scene:this._viewer[e(230)]}});return await r[e(220)](n),this[e(229)][e(230)][e(221)].add(r[e(219)]),this[e(229)][e(230)][e(208)](),r}async[D(218)](t){const e=D;t instanceof v&&(this[e(229)][e(230)][e(221)].remove(t[e(219)]),this[e(229)][e(230)].requestRender())}locate(t,e){const n=D;e instanceof v&&e[n(215)](this[n(229)],{tolerance:.015})}show(t,e){const n=D;t instanceof v&&(t.primitiveCollection[n(225)]=e,this[n(229)][n(230)].requestRender())}}function W(){const t=["load","primitives","10406724RNUqZe","49FqfQkm","224674FqbAQh","show","6744793MlBPij","3398132KIbUVq","the layer type is not 'GEOJSON'","_viewer","scene","requestRender","8LHaVGR","type","301752tOKEdO","1660641uCjfGt","GEOJSON","351432hCiOEZ","flyTo","370BCiwNp","5eUYLjg","remove","primitiveCollection"];return(W=function(){return t})()}const K=O;function O(t,e){const n=U();return(O=function(t,e){return n[t-=359]})(t,e)}function U(){const t=["camera","add","the layer type is not 'WMS'","remove","addEventListener","WMS","locate","getImageryRectangle","requestRender","show","555618mqGHeV","3504948PvDxQW","48FMGrXR","308XqHTfV","5543mjWGRJ","441uizQzl","imageryLayers","19233368AxXMMZ","8694CQspFX","24170TrmksL","5624HkbgJR","the url is needed","scene","type","38860ywrclZ","_viewer"];return(U=function(){return t})()}!function(){const t=O,e=U();for(;;)try{if(525940===parseInt(t(378))/1*(-parseInt(t(377))/2)+-parseInt(t(374))/3+-parseInt(t(375))/4+parseInt(t(362))/5*(-parseInt(t(376))/6)+parseInt(t(382))/7*(parseInt(t(384))/8)+parseInt(t(379))/9*(-parseInt(t(383))/10)+parseInt(t(381))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Z{constructor(t){this[O(363)]=t}async load(t){const e=O;if((t=t??{})[e(361)]!==e(369))throw new Error(e(366));const{url:n,layers:s}=t;if(!n)throw new Error(e(359));if(!s)throw new Error("the layers is needed");const r=new w(t),i=new p(r,{});return this._viewer.imageryLayers[e(365)](i),this[e(363)][e(360)].requestRender(),i}async[K(367)](t){const e=K;t instanceof p&&(this[e(363)][e(380)][e(367)](t,!0),this[e(363)][e(360)].requestRender())}[K(370)](t,e){const n=K;if(e instanceof p)if(e.ready){const t=e[n(371)]();this[n(363)][n(360)].camera.flyTo({destination:t})}else e.readyEvent[n(368)]((t=>{const s=n,r=e[s(371)]();this[s(363)][s(360)][s(364)].flyTo({destination:r})}))}[K(373)](t,e){const n=K;t instanceof p&&(t.show=e,this._viewer[n(360)][n(372)]())}}const H=z;function N(){const t=["tileMatrixLabels","6129104dFOZpu","show","306OnodxR","20678jIdoSB","16tFwmUp","6041979ubQCSA","locate","10346680MSeByS","getImageryRectangle","scene","format","imageryLayers","1898135auqvwS","requestRender","remove","WMTS","the url is needed","tilingScheme","flyTo","1MsGrsR","the layer type is not 'WMTS'","the layer is needed","the tileMatrixSetID is needed","add","_viewer","load","549897TEhklI","387606IogWWU","addEventListener","camera"];return(N=function(){return t})()}!function(){const t=z,e=N();for(;;)try{if(411913===parseInt(t(418))/1*(-parseInt(t(426))/2)+parseInt(t(425))/3*(parseInt(t(434))/4)+-parseInt(t(442))/5+-parseInt(t(432))/6*(parseInt(t(433))/7)+parseInt(t(430))/8+parseInt(t(435))/9+-parseInt(t(437))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class P{constructor(t){this[z(423)]=t}async[H(424)](t){const e=H;if((t=t??{}).type!==e(445))throw new Error(e(419));const{url:n,layer:s,style:r,tileMatrixSetID:i,subdomains:o,format:a,tilingScheme:c,tileMatrixLabels:h}=t;if(!n)throw new Error(e(446));if(!s)throw new Error(e(420));if(!r)throw new Error("the style is needed");if(!i)throw new Error(e(421));const u={url:n,layer:s,style:r,tileMatrixSetID:i};o&&(u.subdomains=o),a&&(u[e(440)]=a),c&&(u[e(447)]=c),h&&(u[e(429)]=h);const l=new I(u),f=new p(l,{});return this[e(423)][e(441)][e(422)](f),this[e(423)][e(439)][e(443)](),f}async[H(444)](t){const e=H;t instanceof p&&(this[e(423)].imageryLayers[e(444)](t,!0),this._viewer.scene[e(443)]())}[H(436)](t,e){const n=H;if(e instanceof p)if(e.ready){const t=e.getImageryRectangle();this._viewer.scene[n(428)].flyTo({destination:t})}else e.readyEvent[n(427)]((t=>{const s=n,r=e[s(438)]();this[s(423)][s(439)][s(428)][s(417)]({destination:r})}))}[H(431)](t,e){const n=H;t instanceof p&&(t[n(431)]=e,this[n(423)].scene[n(443)]())}}function z(t,e){const n=N();return(z=function(t,e){return n[t-=417]})(t,e)}function J(){const t=["60ZUwwty","show","_viewer","flyTo","requestRender","then","267TEvOCc","63hpNEFK","dataSources","remove","load","add","canvas","879288DFGnKS","40zqyFAg","KMZ","90sJEpoa","15153SPdNff","724480fhHsqj","scene","KML","275824jwyANL","the layer type is not 'KML' or 'KMZ","499851WZDMiu","1194256hBkXqG"];return(J=function(){return t})()}const X=Q;function Q(t,e){const n=J();return(Q=function(t,e){return n[t-=430]})(t,e)}!function(){const t=Q,e=J();for(;;)try{if(176151===-parseInt(t(444))/1*(parseInt(t(454))/2)+-parseInt(t(430))/3*(-parseInt(t(452))/4)+parseInt(t(431))/5+-parseInt(t(451))/6+parseInt(t(437))/7+parseInt(t(434))/8*(parseInt(t(445))/9)+parseInt(t(438))/10*(-parseInt(t(436))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class V{constructor(t){this[Q(440)]=t}async[X(448)](t){const e=X,n=(t=t??{}).type;if(n!==e(433)&&n!==e(453))throw new Error(e(435));const{url:s,clampToGround:r}=t;if(!s)throw new Error("the url is needed");return this[e(440)][e(446)][e(449)](m[e(448)](s,{camera:this[e(440)][e(432)].camera,canvas:this[e(440)][e(432)][e(450)],clampToGround:r??!1}))}async[X(447)](t){const e=X;(null==t?void 0:t[e(443)])&&t[e(443)]((t=>{const n=e;this[n(440)][n(446)].remove(t),this[n(440)][n(432)][n(442)]()})),t instanceof m&&(this._viewer[e(446)][e(447)](t),this[e(440)].scene[e(442)]())}locate(t,e){const n=X;(null==e?void 0:e[n(443)])&&e.then((t=>{const e=n;this._viewer[e(441)](t)})),e instanceof m&&this[n(440)][n(441)](e)}[X(439)](t,e){const n=X;(null==t?void 0:t[n(443)])&&t.then((t=>{const s=n;t[s(439)]=e,this[s(440)][s(432)][s(442)]()})),t instanceof m&&(t.show=e,this[n(440)].scene.requestRender())}}const Y=tt;function $(){const t=["10KgvCBm","KML","28167iggFLa","_url","_remove","set","780258bSKPmP","_viewer","WMS","showById","83370dxbRLf","TERRAIN","_layersMap","has","50646057kEZzJZ","GEOJSON","type","URLTemplate","210uvuZBx","_show","120NTKxvm","_load","show","get","_typeClassMap","_id","url","the layer with id '","请输入Viewer对象!","removeById","ARCGIS","remove","includes","' is already loaded","bind","293144elnvDF","_initLoader","the url is needed","3DTILES","204sUBJgr","1011878hUFOMh","locate","delete","_type","loadAsync","' is not support","_typeClass","_isSupport","5647131aqVBoI","WMTS","_locate","the type '"];return($=function(){return t})()}function tt(t,e){const n=$();return(tt=function(t,e){return n[t-=217]})(t,e)}!function(){const t=tt,e=$();for(;;)try{if(663112===-parseInt(t(218))/1+-parseInt(t(236))/2+-parseInt(t(232))/3*(parseInt(t(217))/4)+-parseInt(t(250))/5*(parseInt(t(240))/6)+-parseInt(t(248))/7*(parseInt(t(265))/8)+-parseInt(t(226))/9*(parseInt(t(230))/10)+parseInt(t(244))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class et{constructor(t){const e=tt;if(!t)throw new Error(e(258));this[e(237)]=t,this[e(242)]=new Map,this[e(254)]=new Map}[Y(266)](){const t=Y,e=this[t(254)][t(253)](this[t(221)]);e?this[t(224)]=e:(this[t(221)]===t(241)?this[t(224)]=new _(this[t(237)]):this[t(221)]===t(268)?this._typeClass=new L(this._viewer):this[t(221)]===t(260)?this[t(224)]=new G(this[t(237)]):"URLTemplate"===this[t(221)]?this[t(224)]=new k(this[t(237)]):"WMS"===this[t(221)]?this[t(224)]=new Z(this[t(237)]):this[t(221)]===t(227)?this[t(224)]=new P(this._viewer):"KML"===this[t(221)]?this[t(224)]=new V(this[t(237)]):this[t(221)]===t(245)&&(this[t(224)]=new B(this._viewer)),this._typeClassMap[t(235)](this[t(221)],this[t(224)])),this[t(251)]=this[t(224)].load[t(264)](this[t(224)]),this[t(234)]=this._typeClass[t(261)][t(264)](this[t(224)]),this._locate=this[t(224)][t(219)].bind(this[t(224)]),this[t(249)]=this[t(224)][t(252)][t(264)](this[t(224)])}async[Y(222)](t){const e=Y;if(t=t??{},this._id=t.id,this[e(242)][e(243)](this[e(255)]))throw new Error(e(257)+this._id+e(263));if(this[e(233)]=t[e(256)],!this[e(233)])throw new Error(e(267));if(this[e(221)]=t[e(246)],!this[e(225)](t.type))throw new Error(e(229)+t.type+e(223));if(this[e(266)](),"KML"===t.type){const n=this[e(251)](t);n instanceof Promise&&this[e(242)].set(t.id,{options:t,layer:n})}else{const e=await this._load(t);this._layersMap.set(t.id,{options:t,layer:e})}}[Y(225)](t){const e=Y;return[e(241),e(268),e(260),e(247),e(238),e(227),e(231),e(245)][e(262)](t)}[Y(259)](t){const e=Y,n=this[e(242)][e(253)](t);if(this[e(242)][e(220)](t),!n)return;const{options:s,layer:r}=n;r&&(this[e(221)]=s.type,this._initLoader(),this[e(234)](r))}locateById(t){const e=Y,n=this[e(242)][e(253)](t);if(!n)return;const{options:s,layer:r}=n;r&&(this[e(221)]=s[e(246)],this[e(266)](),this[e(228)](s,r))}[Y(239)](t,e){const n=Y,s=this[n(242)].get(t);if(!s)return;const{options:r,layer:i}=s;i&&(this._type=r[n(246)],this._initLoader(),this._show(i,e))}destroy(){}}export{et as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nsc-earth-2/layer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
"cesium": "^1.104.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@nsc-earth-2/primitive-geojson": "1.0.
|
|
34
|
+
"@nsc-earth-2/primitive-geojson": "1.0.11"
|
|
35
35
|
}
|
|
36
36
|
}
|