@nsc-earth-2/layer 1.0.9 → 1.0.10
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 +1 -1
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{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 u,Math as f,ArcGisMapServerImageryProvider as l,ImageryLayer as p,GeographicTilingScheme as d,Ellipsoid as y,UrlTemplateImageryProvider as w,WebMapServiceImageryProvider as I,WebMapTileServiceImageryProvider as m,KmlDataSource as v}from"cesium";import{GeoJsonPrimitiveLayer as g}from"@nsc-earth-2/primitive-geojson";const E=R;function _(){const t=["1361913qMOjer","valid_bounds","isArray","4340srCuFH","camera","334909JItYre","4LyyHru","7578xukTPh","flyTo","337540WScume","requestRender","terrainProvider","locate","remove","_viewer","scene","285352spgjVC","url","2nKHFte","3396990ALLcDg","bounds","the layer type is not 'TERRAIN'","setTerrain","show","287JCMBeP","TERRAIN","36KnOaAB","/layer.json","3843466bMAVtq","type","then","load"];return(_=function(){return t})()}function R(t,e){const n=_();return(R=function(t,e){return n[t-=456]})(t,e)}!function(){const t=R,e=_();for(;;)try{if(857682===parseInt(t(480))/1*(-parseInt(t(461))/2)+-parseInt(t(475))/3*(parseInt(t(481))/4)+parseInt(t(484))/5+-parseInt(t(462))/6+-parseInt(t(467))/7*(-parseInt(t(459))/8)+-parseInt(t(482))/9*(parseInt(t(478))/10)+parseInt(t(471))/11*(parseInt(t(469))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class T{constructor(t){this[R(457)]=t}[E(474)](s){const r=E;s=t(s,{});if(t(s[r(472)],void 0)!==r(468))throw new Error(r(464));const i=t(s[r(460)],void 0),o=new e(n.fromUrl(i));return this[r(457)][r(458)][r(465)](o),this[r(457)][r(458)][r(485)](),Promise.resolve(o)}[E(456)](t){const e=E,n=new s;this[e(457)][e(486)]=n,this._viewer.scene[e(485)]()}[E(487)](e,n){const s=E;e=t(e,{});const i=t(e[s(460)],void 0);fetch(i+s(470))[s(473)]((t=>t.json())).then((t=>{const e=s;t[e(476)]&&Array[e(477)](t[e(476)])&&4===t[e(476)].length?this[e(457)][e(479)][e(483)]({destination:r.fromDegrees(t[e(476)][0],t[e(476)][1],t[e(476)][2],t[e(476)][3])}):t.bounds&&Array[e(477)](t[e(463)])&&4==t[e(463)].length&&this[e(457)][e(479)].flyTo({destination:r.fromDegrees(t.bounds[0],t[e(463)][1],t[e(463)][2],t[e(463)][3])})}))}[E(466)](t,n){const r=E;if(t instanceof e){if(n)this._viewer[r(458)][r(465)](t);else{const t=new s;this[r(457)].terrainProvider=t}this[r(457)][r(458)][r(485)]()}}}function S(t,e){const n=C();return(S=function(t,e){return n[t-=220]})(t,e)}const L=S;!function(){const t=S,e=C();for(;;)try{if(252492===-parseInt(t(226))/1+parseInt(t(256))/2+-parseInt(t(223))/3*(parseInt(t(225))/4)+parseInt(t(232))/5*(parseInt(t(259))/6)+parseInt(t(228))/7*(-parseInt(t(247))/8)+-parseInt(t(249))/9*(-parseInt(t(242))/10)+-parseInt(t(260))/11*(-parseInt(t(230))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class M{constructor(t){this[S(220)]=t}async load(e){const n=S;e=t(e,{});if("3DTILES"!==t(e[n(241)],void 0))throw new Error(n(234));const s=e[n(253)];if(!s)throw new Error(n(248));const r={longitude:t(e[n(227)],0),latitude:t(e[n(229)],0),altitude:t(e[n(235)],0),azimuth:t(e[n(244)],0)},o=await i[n(221)](s,{dynamicScreenSpaceError:!0,dynamicScreenSpaceErrorDensity:.00278,dynamicScreenSpaceErrorFactor:4,dynamicScreenSpaceErrorHeightFalloff:.25});return this[n(257)](o,r),this[n(220)][n(231)][n(250)].add(o),this._viewer.scene[n(233)](),o}[L(257)](t,e){const n=L,{longitude:s,latitude:r,altitude:i,azimuth:l}=e;let p=new o;if(s&&r){let t=i;0==i&&(t=this[n(220)][n(231)][n(236)].getHeight(a[n(224)](s,r))||0);const e=c[n(224)](s,r,t),d=h[n(243)](e),y=new u(1,0,0,0,1,0,0,0,1),w=u[n(252)](f[n(239)](l));u[n(246)](y,w,y),p=o[n(240)](d,y,new o)}else if(i){const e=new c;o[n(258)](t[n(245)][n(237)],e);const s=a[n(251)](e);if(s){const t=f.toDegrees(s[n(229)]),e=f.toDegrees(s.longitude),r=c[n(224)](e,t,i),a=h[n(243)](r),d=new u(1,0,0,0,1,0,0,0,1),y=u.fromRotationZ(f[n(239)](l));u[n(246)](d,y,d),p=o[n(240)](a,d,new o)}}else if(l){const e=new u(1,0,0,0,1,0,0,0,1),s=u[n(252)](f[n(239)](l));u[n(246)](e,s,e),p=o[n(240)](t.root[n(237)],e,new o)}else p=t.root[n(237)];t[n(245)][n(237)]=p}[L(254)](t){const e=L;t instanceof i&&(this[e(220)][e(231)].primitives[e(254)](t),this[e(220)][e(231)][e(233)]())}[L(222)](t,e){const n=L;e instanceof i&&this[n(220)][n(238)](e)}[L(255)](t,e){const n=L;t instanceof i&&(t[n(255)]=e,this._viewer[n(231)][n(233)]())}}function C(){const t=["22395miunca","requestRender","the layer type is not '3DTILES'","altitude","globe","transform","flyTo","toRadians","multiplyByMatrix3","type","7730mlqLty","eastNorthUpToFixedFrame","azimuth","root","multiply","16Mtqinr","the url is needed","2232jSTIee","primitives","fromCartesian","fromRotationZ","url","remove","show","702456lTscwj","transferTileSet","getTranslation","330uociBF","1202366TImfko","_viewer","fromUrl","locate","372018TKZwVw","fromDegrees","8BqvIow","438945ltgLjj","longitude","622111cUeFYc","latitude","36DLUxBQ","scene"];return(C=function(){return t})()}function b(t,e){const n=x();return(b=function(t,e){return n[t-=232]})(t,e)}const G=b;function x(){const t=["7723242IJdmNG","load","3PQqvYc","readyEvent","show","requestRender","type","GET","remove","extent","fromUrl","5769680ogaWZn","locate","rectangle","the layer type is not 'ARCGIS'","1046124XNiDPa","1249905hJntnw","the url is needed","camera","27237eDUyQp","fromProviderAsync","scene","445538zsuuoK","ARCGIS","imageryLayers","flyTo","then","alpha","token","_viewer","/info/iteminfo?f=pjson","isArray","4060470GvxEvx","2120yBCRZV","getImageryRectangle","ready","fromDegrees","/info/iteminfo?f=pjson&token="];return(x=function(){return t})()}!function(){const t=b,e=x();for(;;)try{if(836229===parseInt(t(268))/1+-parseInt(t(236))/2*(parseInt(t(254))/3)+-parseInt(t(263))/4+-parseInt(t(246))/5+parseInt(t(267))/6+parseInt(t(233))/7*(parseInt(t(247))/8)+parseInt(t(252))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class D{constructor(t){this[b(243)]=t}async[G(253)](e){const n=G;e=t(e,{});if(t(e[n(258)],void 0)!==n(237))throw new Error(n(266));const{url:s,alpha:i,token:o}=e;if(!s)throw new Error(n(269));let a=s;a=o?s+n(251)+o:s+n(244);const c=await fetch(a,{method:n(259)})[n(240)]((t=>t.json()))[n(240)]((t=>{const e=n,s={};return o&&(s[e(242)]=o),t&&t.extent&&Array[e(245)](t[e(261)])&&(s[e(265)]=r[e(250)](t[e(261)][0][0],t[e(261)][0][1],t[e(261)][1][0],t[e(261)][1][1])),s})),h=l[n(262)](s,c),u=p[n(234)](h,{});return i&&(u[n(241)]=i),this._viewer.imageryLayers.add(u),this[n(243)][n(235)][n(257)](),u}async[G(260)](t){const e=G;t instanceof p&&(this._viewer[e(238)][e(260)](t,!0),this._viewer[e(235)][e(257)]())}[G(264)](t,e){const n=G;if(e instanceof p)if(e[n(249)]){const t=e[n(248)]();this._viewer[n(235)][n(232)][n(239)]({destination:t})}else e[n(255)].addEventListener((t=>{const s=n,r=e[s(248)]();this._viewer[s(235)][s(232)][s(239)]({destination:r})}))}[G(256)](t,e){const n=G;t instanceof p&&(t[n(256)]=e,this[n(243)][n(235)][n(257)]())}}const q=B;function A(){const t=["12850380Qbmyea","substr","scene","1463880HIeeDe","type","getImageryRectangle","addEventListener","add","remove","requestRender","5sTefEJ","north","json","maximumLevel","URLTemplate","tilesize","maxzoom","alpha","tileHeight","tileWidth","rectangle","_viewer","readyEvent","fromDegrees","show","west","7465448ANcXhT","meta.json","bounds","locate","proj","9194318IQhguZ","591208jrZFbv","3PMrxov","south","minzoom","3006606lMMoBR","WGS84","5073908CrjnRF","imageryLayers","1iTLjrg"];return(A=function(){return t})()}function B(t,e){const n=A();return(B=function(t,e){return n[t-=470]})(t,e)}!function(){const t=B,e=A();for(;;)try{if(722143===parseInt(t(470))/1*(parseInt(t(503))/2)+parseInt(t(504))/3*(-parseInt(t(509))/4)+-parseInt(t(481))/5*(-parseInt(t(507))/6)+-parseInt(t(502))/7+parseInt(t(497))/8+parseInt(t(471))/9+parseInt(t(474))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class j{constructor(t){this[B(492)]=t}async load(e){const n=B;e=t(e,{});if(t(e[n(475)],void 0)!==n(485))throw new Error("the layer type is not 'URLTemplate'");const{url:s,alpha:i}=e;if(!s)throw new Error("the url is needed");let o=s[n(472)](0,s.indexOf("{z}/{x}/{y}.png"))+n(498);const a=await fetch(o,{method:"GET"}).then((t=>t[n(483)]())).then((t=>{const e=n,i={url:s};return t&&t[e(499)]&&(i[e(491)]=r[e(494)](t[e(499)][e(496)],t.bounds[e(505)],t.bounds.east,t[e(499)][e(482)])),t&&4326==t[e(501)]&&(i.tilingScheme=new d({ellipsoid:y[e(508)]})),t&&t[e(487)]&&(i[e(484)]=t[e(487)]),t&&t[e(506)]&&(i.minimumLevel=t[e(506)]),t&&t.tilesize&&(i[e(490)]=i[e(489)]=t[e(486)]),i})),c=new w(a),h=new p(c,{});return i&&(h[n(488)]=i),this._viewer[n(510)][n(478)](h),this[n(492)][n(473)].requestRender(),h}async[q(479)](t){const e=q;t instanceof p&&(this[e(492)][e(510)].remove(t,!0),this[e(492)][e(473)].requestRender())}[q(500)](t,e){const n=q;if(e instanceof p)if(e.ready){const t=e[n(476)]();this[n(492)][n(473)].camera.flyTo({destination:t})}else e[n(493)][n(477)]((t=>{const s=n,r=e.getImageryRectangle();this[s(492)][s(473)].camera.flyTo({destination:r})}))}show(t,e){const n=q;t instanceof p&&(t[n(495)]=e,this._viewer.scene[n(480)]())}}const W=Z;function Z(t,e){const n=k();return(Z=function(t,e){return n[t-=438]})(t,e)}function k(){const t=["primitiveCollection","15834LlzaEV","the url is needed","_viewer","8396631uEAxrw","load","scene","add","type","286746RGedsE","311585LYtoQy","the layer type is not 'GEOJSON'","900296zTBjcW","show","1745632pYeZgs","requestRender","remove","locate","12oIVkBc","1057pZmmcG","primitives","63438MiHrCM"];return(k=function(){return t})()}!function(){const t=Z,e=k();for(;;)try{if(278619===parseInt(t(451))/1+-parseInt(t(454))/2+-parseInt(t(441))/3*(-parseInt(t(438))/4)+parseInt(t(452))/5+parseInt(t(443))/6*(-parseInt(t(439))/7)+-parseInt(t(456))/8+parseInt(t(446))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class N{constructor(t){this[Z(445)]=t}async[W(447)](e){const n=W;e=t(e,{});if("GEOJSON"!==t(e[n(450)],void 0))throw new Error(n(453));const{url:s,clampToGround:r}=e;if(!s)throw new Error(n(444));const i=new g({options:{useGroundGeometry:r??!1,clampToGround:r??!1,scene:this[n(445)][n(448)]}});return await i.load(s),this[n(445)][n(448)][n(440)][n(449)](i[n(442)]),this[n(445)][n(448)][n(457)](),i}async[W(458)](t){const e=W;t instanceof g&&(this[e(445)][e(448)][e(440)][e(458)](t.primitiveCollection),this[e(445)].scene[e(457)]())}[W(459)](t,e){const n=W;e instanceof g&&e.flyTo(this[n(445)],{tolerance:.015})}[W(455)](t,e){const n=W;t instanceof g&&(t[n(442)].show=e,this[n(445)][n(448)][n(457)]())}}const J=P;function P(t,e){const n=z();return(P=function(t,e){return n[t-=263]})(t,e)}!function(){const t=P,e=z();for(;;)try{if(419280===parseInt(t(292))/1+parseInt(t(282))/2+-parseInt(t(275))/3*(-parseInt(t(269))/4)+parseInt(t(271))/5*(parseInt(t(264))/6)+parseInt(t(287))/7*(parseInt(t(272))/8)+-parseInt(t(290))/9+-parseInt(t(270))/10*(parseInt(t(279))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class F{constructor(t){this._viewer=t}async[J(265)](e){const n=J;e=t(e,{});if(t(e[n(273)],void 0)!==n(278))throw new Error(n(283));const{url:s,layers:r}=e;if(!s)throw new Error(n(267));if(!r)throw new Error(n(284));const i=new I(e),o=new p(i,{});return this[n(277)][n(289)][n(293)](o),this[n(277)].scene[n(291)](),o}async[J(274)](t){const e=J;t instanceof p&&(this[e(277)][e(289)][e(274)](t,!0),this[e(277)][e(280)][e(291)]())}[J(288)](t,e){const n=J;if(e instanceof p)if(e[n(263)]){const t=e[n(285)]();this[n(277)][n(280)][n(268)][n(286)]({destination:t})}else e[n(266)][n(276)]((t=>{const s=n,r=e[s(285)]();this[s(277)][s(280)][s(268)][s(286)]({destination:r})}))}[J(281)](t,e){const n=J;t instanceof p&&(t.show=e,this._viewer.scene[n(291)]())}}function z(){const t=["2395TdHUSw","117184VzZyCT","type","remove","18BfLAKC","addEventListener","_viewer","WMS","803dQvmpC","scene","show","1395890WuCGpl","the layer type is not 'WMS'","the layers is needed","getImageryRectangle","flyTo","287wpRUil","locate","imageryLayers","4765554JBGqDS","requestRender","30566hTfXHo","add","ready","5724SVDSlo","load","readyEvent","the url is needed","camera","183556JaLZbu","152410YFXnih"];return(z=function(){return t})()}function K(t,e){const n=H();return(K=function(t,e){return n[t-=380]})(t,e)}const U=K;function H(){const t=["388668qWWtwX","WMTS","subdomains","164xBqZhE","remove","_viewer","format","readyEvent","flyTo","locate","imageryLayers","addEventListener","show","the layer is needed","scene","the style is needed","5726476YZNabI","camera","230BCTJzD","184fqxvdI","the layer type is not 'WMTS'","2814729ruBlRO","type","418860YPxjtt","10hSHRGi","the tileMatrixSetID is needed","12186XueiQT","requestRender","ready","12612JxGPRf","46365JCBuyC"];return(H=function(){return t})()}!function(){const t=K,e=H();for(;;)try{if(551651===-parseInt(t(391))/1*(-parseInt(t(396))/2)+-parseInt(t(383))/3+-parseInt(t(385))/4+parseInt(t(386))/5*(-parseInt(t(393))/6)+parseInt(t(409))/7+parseInt(t(381))/8*(-parseInt(t(388))/9)+parseInt(t(380))/10*(-parseInt(t(392))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class O{constructor(t){this._viewer=t}async load(e){const n=K;e=t(e,{});if(t(e[n(384)],void 0)!==n(394))throw new Error(n(382));const{url:s,layer:r,style:i,tileMatrixSetID:o,subdomains:a,format:c,tilingScheme:h,tileMatrixLabels:u}=e;if(!s)throw new Error("the url is needed");if(!r)throw new Error(n(406));if(!i)throw new Error(n(408));if(!o)throw new Error(n(387));const f={url:s,layer:r,style:i,tileMatrixSetID:o};a&&(f[n(395)]=a),c&&(f[n(399)]=c),h&&(f.tilingScheme=h),u&&(f.tileMatrixLabels=u);const l=new m(f),d=new p(l,{});return this[n(398)][n(403)].add(d),this[n(398)][n(407)][n(389)](),d}async remove(t){const e=K;t instanceof p&&(this[e(398)][e(403)][e(397)](t,!0),this[e(398)][e(407)].requestRender())}[U(402)](t,e){const n=U;if(e instanceof p)if(e[n(390)]){const t=e.getImageryRectangle();this[n(398)][n(407)][n(410)][n(401)]({destination:t})}else e[n(400)][n(404)]((t=>{const s=n,r=e.getImageryRectangle();this[s(398)].scene[s(410)][s(401)]({destination:r})}))}show(t,e){const n=U;t instanceof p&&(t[n(405)]=e,this._viewer.scene[n(389)]())}}const Y=V;function Q(){const t=["1015503EreREF","dataSources","add","scene","2rNnDQN","KMZ","requestRender","flyTo","29624704YcuMsP","show","then","4513220IECRdn","740777KgmBRv","_viewer","4253860RhrwRm","6320292YFykZh","the url is needed","1299004Xrumrd","load","camera","KML","the layer type is not 'KML' or 'KMZ","remove"];return(Q=function(){return t})()}function V(t,e){const n=Q();return(V=function(t,e){return n[t-=364]})(t,e)}!function(){const t=V,e=Q();for(;;)try{if(594221===parseInt(t(379))/1+parseInt(t(371))/2*(parseInt(t(367))/3)+parseInt(t(378))/4+parseInt(t(381))/5+parseInt(t(382))/6+parseInt(t(384))/7+-parseInt(t(375))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class X{constructor(t){this[V(380)]=t}async load(e){const n=V;e=t(e,{});const s=t(e.type,void 0);if(s!==n(364)&&s!==n(372))throw new Error(n(365));const{url:r,clampToGround:i}=e;if(!r)throw new Error(n(383));return this[n(380)][n(368)][n(369)](v[n(385)](r,{camera:this[n(380)].scene[n(386)],canvas:this[n(380)].scene.canvas,clampToGround:i??!1}))}async remove(t){const e=V;t instanceof Promise&&t[e(377)]((t=>{const n=e;this[n(380)][n(368)].remove(t),this._viewer.scene[n(373)]()})),t instanceof v&&(this._viewer.dataSources[e(366)](t),this[e(380)][e(370)].requestRender())}locate(t,e){const n=V;e instanceof Promise&&e[n(377)]((t=>{this[n(380)].flyTo(t)})),e instanceof v&&this[n(380)][n(374)](e)}[Y(376)](t,e){const n=Y;t instanceof Promise&&t.then((t=>{const n=V;t[n(376)]=e,this[n(380)].scene[n(373)]()})),t instanceof v&&(t[n(376)]=e,this[n(380)][n(370)][n(373)]())}}const $=et;function tt(){const t=["TERRAIN","GEOJSON","3WtkLIm","the type '","_typeClass","618553yfWyIT","URLTemplate","_initLoader","the url is needed","3318440ZZpFhI","请输入Viewer对象!","bind","_type","remove","KML","_id","' is not support","1706595TyCKHf","_isSupport","6056526hNWNIA","_layersMap","3715832TlbyBR","' is already loaded","locate","set","WMS","showById","_locate","_load","_show","3DTILES","_typeClassMap","show","get","delete","locateById","type","has","1791382JBajJR","includes","84750fmRfES","url","removeById","_url","_viewer"];return(tt=function(){return t})()}function et(t,e){const n=tt();return(et=function(t,e){return n[t-=470]})(t,e)}!function(){const t=et,e=tt();for(;;)try{if(775039===parseInt(t(486))/1+parseInt(t(474))/2*(-parseInt(t(483))/3)+parseInt(t(502))/4+-parseInt(t(498))/5+parseInt(t(476))/6+parseInt(t(500))/7+-parseInt(t(490))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class nt{constructor(t){const e=et;if(!t)throw new Error(e(491));this[e(480)]=t,this[e(501)]=new Map,this[e(512)]=new Map}[$(488)](){const t=$,e=this[t(512)][t(514)](this[t(493)]);e?this._typeClass=e:(this[t(493)]===t(481)?this._typeClass=new T(this[t(480)]):this[t(493)]===t(511)?this._typeClass=new M(this[t(480)]):"ARCGIS"===this[t(493)]?this[t(485)]=new D(this[t(480)]):this[t(493)]===t(487)?this[t(485)]=new j(this._viewer):"WMS"===this[t(493)]?this._typeClass=new F(this._viewer):"WMTS"===this[t(493)]?this[t(485)]=new O(this[t(480)]):this[t(493)]===t(495)?this[t(485)]=new X(this._viewer):"GEOJSON"===this[t(493)]&&(this[t(485)]=new N(this[t(480)])),this[t(512)][t(505)](this[t(493)],this[t(485)])),this[t(509)]=this[t(485)].load[t(492)](this[t(485)]),this._remove=this[t(485)][t(494)][t(492)](this[t(485)]),this[t(508)]=this._typeClass[t(504)][t(492)](this[t(485)]),this[t(510)]=this._typeClass[t(513)][t(492)](this._typeClass)}async loadAsync(e){const n=$;if(e=t(e,{}),this[n(496)]=t(e.id,void 0),this[n(501)][n(473)](this[n(496)]))throw new Error("the layer with id '"+this[n(496)]+n(503));if(this[n(479)]=t(e[n(477)],void 0),!this[n(479)])throw new Error(n(489));if(this[n(493)]=t(e[n(472)],void 0),!this._isSupport(e[n(472)]))throw new Error(n(484)+e[n(472)]+n(497));if(this[n(488)](),e[n(472)]===n(495)){const t=this[n(509)](e);t instanceof Promise&&this[n(501)][n(505)](e.id,{options:e,layer:t})}else{const t=await this[n(509)](e);this[n(501)][n(505)](e.id,{options:e,layer:t})}}[$(499)](t){const e=$;return["TERRAIN",e(511),"ARCGIS","URLTemplate",e(506),"WMTS","KML",e(482)][e(475)](t)}[$(478)](t){const e=$,n=this[e(501)].get(t);if(this[e(501)][e(470)](t),!n)return;const{options:s,layer:r}=n;r&&(this[e(493)]=s.type,this[e(488)](),this._remove(r))}[$(471)](t){const e=$,n=this._layersMap[e(514)](t);if(!n)return;const{options:s,layer:r}=n;r&&(this[e(493)]=s[e(472)],this[e(488)](),this._locate(s,r))}[$(507)](t,e){const n=$,s=this._layersMap[n(514)](t);if(!s)return;const{options:r,layer:i}=s;i&&(this._type=r[n(472)],this._initLoader(),this[n(510)](i,e))}destroy(){}}export{nt as default};
|