@nsc-earth-2/layer 1.0.7 → 1.0.9
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 u,Math as p,ArcGisMapServerImageryProvider as f,ImageryLayer as l,GeographicTilingScheme as d,Ellipsoid as y,UrlTemplateImageryProvider as w,WebMapServiceImageryProvider as m,WebMapTileServiceImageryProvider as I,KmlDataSource as v}from"cesium";import{GeoJsonPrimitiveLayer as g}from"@nsc-earth-2/primitive-geojson";function E(){const t=["14fBGubX","28tektUt","628795jsfFwd","scene","1514984JDWPnC","then","type","17954UaRBLc","bounds","3820482sthlwC","flyTo","show","valid_bounds","resolve","11qPAGGF","json","setTerrain","fromUrl","requestRender","202490hkiYSO","isArray","camera","/layer.json","21YBIncj","_viewer","TERRAIN","10PvMWow","locate","the layer type is not 'TERRAIN'","remove","url","2667654ObugcV","terrainProvider","24171564ozmmvw","fromDegrees","load","length"];return(E=function(){return t})()}const _=T;function T(t,e){const n=E();return(T=function(t,e){return n[t-=223]})(t,e)}!function(){const t=T,e=E();for(;;)try{if(783274===parseInt(t(257))/1+parseInt(t(245))/2*(-parseInt(t(224))/3)+-parseInt(t(239))/4*(parseInt(t(240))/5)+-parseInt(t(232))/6+parseInt(t(238))/7*(parseInt(t(242))/8)+-parseInt(t(247))/9*(parseInt(t(227))/10)+-parseInt(t(252))/11*(-parseInt(t(234))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class R{constructor(t){this[T(225)]=t}[_(236)](s){const r=_;s=t(s,{});if(t(s[r(244)],void 0)!==r(226))throw new Error(r(229));const i=t(s[r(231)],void 0),o=new e(n[r(255)](i));return this[r(225)][r(241)].setTerrain(o),this[r(225)][r(241)].requestRender(),Promise[r(251)](o)}[_(230)](t){const e=_,n=new s;this._viewer[e(233)]=n,this._viewer.scene.requestRender()}[_(228)](e,n){const s=_;e=t(e,{});const i=t(e[s(231)],void 0);fetch(i+s(223))[s(243)]((t=>t[s(253)]()))[s(243)]((t=>{const e=s;t[e(250)]&&Array[e(258)](t[e(250)])&&4===t[e(250)].length?this[e(225)][e(259)][e(248)]({destination:r[e(235)](t[e(250)][0],t[e(250)][1],t.valid_bounds[2],t[e(250)][3])}):t.bounds&&Array[e(258)](t.bounds)&&4==t[e(246)][e(237)]&&this[e(225)][e(259)][e(248)]({destination:r[e(235)](t[e(246)][0],t[e(246)][1],t[e(246)][2],t.bounds[3])})}))}[_(249)](t,n){const r=_;if(t instanceof e){if(n)this[r(225)].scene[r(254)](t);else{const t=new s;this[r(225)][r(233)]=t}this[r(225)][r(241)][r(256)]()}}}function S(){const t=["show","type","latitude","flyTo","longitude","fromUrl","155laggFT","getHeight","fromCartesian","multiply","15704MTvtCA","412342RqZFIr","toRadians","164871XCtIze","azimuth","_viewer","getTranslation","eastNorthUpToFixedFrame","globe","transferTileSet","10UwNBZv","4YGbMbu","root","713745VRTOaP","fromRotationZ","2394064brtVuk","multiplyByMatrix3","toDegrees","scene","requestRender","fromDegrees","3340579lJXiqY","primitives","transform","31852wBvRue","the layer type is not '3DTILES'","18lfUFDN"];return(S=function(){return t})()}const b=L;function L(t,e){const n=S();return(L=function(t,e){return n[t-=430]})(t,e)}!function(){const t=L,e=S();for(;;)try{if(159122===parseInt(t(443))/1*(-parseInt(t(432))/2)+parseInt(t(445))/3+parseInt(t(456))/4*(-parseInt(t(465))/5)+-parseInt(t(458))/6*(-parseInt(t(433))/7)+-parseInt(t(447))/8+parseInt(t(435))/9*(parseInt(t(442))/10)+parseInt(t(453))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class M{constructor(t){this._viewer=t}async load(e){const n=L;e=t(e,{});if("3DTILES"!==t(e[n(460)],void 0))throw new Error(n(457));const s=e.url;if(!s)throw new Error("the url is needed");const r={longitude:t(e[n(463)],0),latitude:t(e.latitude,0),altitude:t(e.altitude,0),azimuth:t(e[n(436)],0)},o=await i[n(464)](s,{dynamicScreenSpaceError:!0,dynamicScreenSpaceErrorDensity:.00278,dynamicScreenSpaceErrorFactor:4,dynamicScreenSpaceErrorHeightFalloff:.25});return this[n(441)](o,r),this[n(437)][n(450)][n(454)].add(o),this[n(437)].scene[n(451)](),o}[b(441)](t,e){const n=b,{longitude:s,latitude:r,altitude:i,azimuth:f}=e;let l=new o;if(s&&r){let t=i;0==i&&(t=this[n(437)][n(450)][n(440)][n(466)](a[n(452)](s,r))||0);const e=c[n(452)](s,r,t),d=h[n(439)](e),y=new u(1,0,0,0,1,0,0,0,1),w=u[n(446)](p[n(434)](f));u[n(431)](y,w,y),l=o.multiplyByMatrix3(d,y,new o)}else if(i){const e=new c;o[n(438)](t[n(444)].transform,e);const s=a[n(430)](e);if(s){const t=p[n(449)](s[n(461)]),e=p[n(449)](s[n(463)]),r=c.fromDegrees(e,t,i),a=h[n(439)](r),d=new u(1,0,0,0,1,0,0,0,1),y=u[n(446)](p[n(434)](f));u[n(431)](d,y,d),l=o[n(448)](a,d,new o)}}else if(f){const e=new u(1,0,0,0,1,0,0,0,1),s=u[n(446)](p[n(434)](f));u[n(431)](e,s,e),l=o[n(448)](t[n(444)][n(455)],e,new o)}else l=t[n(444)].transform;t[n(444)][n(455)]=l}remove(t){const e=b;t instanceof i&&(this[e(437)][e(450)][e(454)].remove(t),this[e(437)].scene[e(451)]())}locate(t,e){const n=b;e instanceof i&&this._viewer[n(462)](e)}show(t,e){const n=b;t instanceof i&&(t[n(459)]=e,this._viewer[n(450)][n(451)]())}}const G=k;function k(t,e){const n=q();return(k=function(t,e){return n[t-=279]})(t,e)}function q(){const t=["extent","2024840RlQRvZ","/info/iteminfo?f=pjson&token=","token","349444kCOFkP","ready","the url is needed","_viewer","the layer type is not 'ARCGIS'","readyEvent","flyTo","type","fromDegrees","camera","then","10889748jCgyGO","alpha","fromProviderAsync","ARCGIS","remove","448rbEQJx","rectangle","show","requestRender","/info/iteminfo?f=pjson","51tZYXyH","6163056mqeouT","431836gyNPHp","98952NDmbEi","imageryLayers","getImageryRectangle","json","38888FyHTGe","isArray","scene"];return(q=function(){return t})()}!function(){const t=k,e=q();for(;;)try{if(611738===parseInt(t(312))/1+-parseInt(t(289))/2+parseInt(t(310))/3*(-parseInt(t(282))/4)+-parseInt(t(286))/5+parseInt(t(313))/6*(-parseInt(t(305))/7)+parseInt(t(311))/8+parseInt(t(300))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class x{constructor(t){this[k(292)]=t}async load(e){const n=k;e=t(e,{});if(t(e[n(296)],void 0)!==n(303))throw new Error(n(293));const{url:s,alpha:i,token:o}=e;if(!s)throw new Error(n(291));let a=s;a=o?s+n(287)+o:s+n(309);const c=await fetch(a,{method:"GET"})[n(299)]((t=>t[n(281)]()))[n(299)]((t=>{const e=n,s={};return o&&(s[e(288)]=o),t&&t[e(285)]&&Array[e(283)](t[e(285)])&&(s[e(306)]=r[e(297)](t.extent[0][0],t[e(285)][0][1],t[e(285)][1][0],t[e(285)][1][1])),s})),h=f.fromUrl(s,c),u=l[n(302)](h,{});return i&&(u[n(301)]=i),this[n(292)][n(279)].add(u),this[n(292)][n(284)][n(308)](),u}async[G(304)](t){const e=G;t instanceof l&&(this[e(292)][e(279)].remove(t,!0),this[e(292)][e(284)][e(308)]())}locate(t,e){const n=G;if(e instanceof l)if(e[n(290)]){const t=e[n(280)]();this[n(292)][n(284)][n(298)][n(295)]({destination:t})}else e[n(294)].addEventListener((t=>{const s=n,r=e[s(280)]();this[s(292)][s(284)].camera[s(295)]({destination:r})}))}[G(307)](t,e){const n=G;t instanceof l&&(t.show=e,this[n(292)][n(284)][n(308)]())}}const D=O;function N(){const t=["getImageryRectangle","fromDegrees","south","GET","1109808BuDIal","rectangle","remove","minimumLevel","meta.json","131349RWOEMk","the layer type is not 'URLTemplate'","north","bounds","ready","west","tilingScheme","52716zDJSaZ","locate","east","WGS84","readyEvent","URLTemplate","minzoom","then","980315ziomZW","the url is needed","282924QRcHeZ","2sYIevO","4Ytmkcb","requestRender","imageryLayers","6257339ufTITy","alpha","addEventListener","264102KoHuGI","flyTo","json","tilesize","indexOf","add","type","tileWidth","camera","maximumLevel","proj","maxzoom","scene","14puecpU","load","_viewer","10yLRJKP"];return(N=function(){return t})()}function O(t,e){const n=N();return(O=function(t,e){return n[t-=100]})(t,e)}!function(){const t=O,e=N();for(;;)try{if(105657===parseInt(t(136))/1*(-parseInt(t(147))/2)+-parseInt(t(129))/3*(-parseInt(t(148))/4)+-parseInt(t(144))/5+parseInt(t(103))/6*(-parseInt(t(116))/7)+-parseInt(t(124))/8+-parseInt(t(146))/9+parseInt(t(119))/10*(parseInt(t(100))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class z{constructor(t){this[O(118)]=t}async[D(117)](e){const n=D;e=t(e,{});if(t(e[n(109)],void 0)!==n(141))throw new Error(n(130));const{url:s,alpha:i}=e;if(!s)throw new Error(n(145));let o=s.substr(0,s[n(107)]("{z}/{x}/{y}.png"))+n(128);const a=await fetch(o,{method:n(123)})[n(143)]((t=>t[n(105)]()))[n(143)]((t=>{const e=n,i={url:s};return t&&t[e(132)]&&(i[e(125)]=r[e(121)](t.bounds[e(134)],t[e(132)][e(122)],t[e(132)][e(138)],t.bounds[e(131)])),t&&4326==t[e(113)]&&(i[e(135)]=new d({ellipsoid:y[e(139)]})),t&&t[e(114)]&&(i[e(112)]=t.maxzoom),t&&t.minzoom&&(i[e(127)]=t[e(142)]),t&&t.tilesize&&(i[e(110)]=i.tileHeight=t[e(106)]),i})),c=new w(a),h=new l(c,{});return i&&(h[n(101)]=i),this[n(118)].imageryLayers[n(108)](h),this._viewer[n(115)][n(149)](),h}async[D(126)](t){const e=D;t instanceof l&&(this._viewer[e(150)].remove(t,!0),this[e(118)].scene[e(149)]())}[D(137)](t,e){const n=D;if(e instanceof l)if(e[n(133)]){const t=e.getImageryRectangle();this[n(118)][n(115)][n(111)][n(104)]({destination:t})}else e[n(140)][n(102)]((t=>{const s=n,r=e[s(120)]();this._viewer[s(115)].camera[s(104)]({destination:r})}))}show(t,e){const n=D;t instanceof l&&(t.show=e,this[n(118)][n(115)][n(149)]())}}function A(t,e){const n=P();return(A=function(t,e){return n[t-=499]})(t,e)}const C=A;function P(){const t=["remove","locate","45nDetuG","GEOJSON","1463670giUels","_viewer","primitiveCollection","8OjnmpE","945381wlozPl","type","show","3289430waZuIV","add","scene","57372RnYuik","646104BZOheN","primitives","requestRender","load","the layer type is not 'GEOJSON'","189yQyofq","1839512VdaZuj","127769tEwYJU"];return(P=function(){return t})()}!function(){const t=A,e=P();for(;;)try{if(496879===parseInt(t(501))/1+-parseInt(t(500))/2+-parseInt(t(510))/3*(-parseInt(t(509))/4)+parseInt(t(513))/5+parseInt(t(516))/6*(parseInt(t(499))/7)+-parseInt(t(517))/8*(parseInt(t(504))/9)+parseInt(t(506))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class U{constructor(t){this[A(507)]=t}async load(e){const n=A;e=t(e,{});if(t(e[n(511)],void 0)!==n(505))throw new Error(n(521));const{url:s,clampToGround:r}=e;if(!s)throw new Error("the url is needed");const i=new g({options:{useGroundGeometry:r??!1,clampToGround:r??!1,scene:this._viewer.scene}});return await i[n(520)](s),this[n(507)].scene[n(518)][n(514)](i[n(508)]),this[n(507)][n(515)][n(519)](),i}async[C(502)](t){const e=C;t instanceof g&&(this[e(507)].scene[e(518)].remove(t[e(508)]),this[e(507)][e(515)][e(519)]())}[C(503)](t,e){const n=C;e instanceof g&&e.flyTo(this[n(507)],{tolerance:.015})}[C(512)](t,e){const n=C;t instanceof g&&(t[n(508)][n(512)]=e,this[n(507)][n(515)][n(519)]())}}const B=F;function F(t,e){const n=Z();return(F=function(t,e){return n[t-=418]})(t,e)}function Z(){const t=["camera","26PTFNgn","add","load","the url is needed","4327675gXniQi","show","requestRender","imageryLayers","readyEvent","7pIriCK","type","59621aNcHBz","the layers is needed","5942132tjZpFn","8589789gndTXd","locate","remove","270Quualg","1145001foEZYD","the layer type is not 'WMS'","_viewer","1979802QBNKgv","scene","12061864YQFfQs","6QsOjER","getImageryRectangle"];return(Z=function(){return t})()}!function(){const t=F,e=Z();for(;;)try{if(897562===parseInt(t(442))/1*(-parseInt(t(431))/2)+parseInt(t(425))/3+-parseInt(t(444))/4+-parseInt(t(435))/5*(parseInt(t(428))/6)+-parseInt(t(440))/7*(-parseInt(t(427))/8)+-parseInt(t(418))/9+parseInt(t(421))/10*(parseInt(t(422))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class j{constructor(t){this[F(424)]=t}async[B(433)](e){const n=B;e=t(e,{});if("WMS"!==t(e[n(441)],void 0))throw new Error(n(423));const{url:s,layers:r}=e;if(!s)throw new Error(n(434));if(!r)throw new Error(n(443));const i=new m({url:s}),o=new l(i,{});return this[n(424)].imageryLayers[n(432)](o),this[n(424)].scene.requestRender(),o}async remove(t){const e=B;t instanceof l&&(this._viewer[e(438)][e(420)](t,!0),this._viewer.scene[e(437)]())}[B(419)](t,e){const n=B;if(e instanceof l)if(e.ready){const t=e.getImageryRectangle();this[n(424)].scene[n(430)].flyTo({destination:t})}else e[n(439)].addEventListener((t=>{const s=n,r=e[s(429)]();this[s(424)][s(426)][s(430)].flyTo({destination:r})}))}[B(436)](t,e){const n=B;t instanceof l&&(t[n(436)]=e,this[n(424)][n(426)][n(437)]())}}function Q(t,e){const n=K();return(Q=function(t,e){return n[t-=213]})(t,e)}const W=Q;!function(){const t=Q,e=K();for(;;)try{if(660435===parseInt(t(241))/1+-parseInt(t(221))/2+parseInt(t(236))/3*(-parseInt(t(229))/4)+-parseInt(t(239))/5+-parseInt(t(240))/6+parseInt(t(226))/7*(parseInt(t(215))/8)+parseInt(t(238))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class J{constructor(t){this[Q(237)]=t}async[W(228)](e){const n=W;e=t(e,{});if("WMTS"!==t(e[n(230)],void 0))throw new Error(n(233));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(222));if(!i)throw new Error("the style is needed");if(!o)throw new Error(n(232));const p={url:s,layer:r,style:i,tileMatrixSetID:o};a&&(p[n(243)]=a),c&&(p[n(227)]=c),h&&(p.tilingScheme=h),u&&(p[n(224)]=u);const f=new I(p),d=new l(f,{});return this[n(237)][n(231)][n(242)](d),this[n(237)][n(220)].requestRender(),d}async remove(t){const e=W;t instanceof l&&(this[e(237)][e(231)][e(213)](t,!0),this[e(237)].scene[e(235)]())}[W(219)](t,e){const n=W;if(e instanceof l)if(e[n(225)]){const t=e.getImageryRectangle();this._viewer[n(220)][n(216)].flyTo({destination:t})}else e[n(214)][n(223)]((t=>{const s=n,r=e[s(217)]();this[s(237)][s(220)][s(216)][s(218)]({destination:r})}))}[W(234)](t,e){const n=W;t instanceof l&&(t[n(234)]=e,this[n(237)].scene[n(235)]())}}function K(){const t=["28xQnVmW","type","imageryLayers","the tileMatrixSetID is needed","the layer type is not 'WMTS'","show","requestRender","150882bdhQDp","_viewer","6893316XtPQoQ","1842000pfhFVK","4306392mUhCLg","582502XKhxqN","add","subdomains","remove","readyEvent","698056wiXZRQ","camera","getImageryRectangle","flyTo","locate","scene","70228xBfbfB","the layer is needed","addEventListener","tileMatrixLabels","ready","63gowJTE","format","load"];return(K=function(){return t})()}const H=V;function V(t,e){const n=X();return(V=function(t,e){return n[t-=233]})(t,e)}function X(){const t=["10xtTbpw","canvas","2271576UymTNv","the url is needed","locate","2989251VLAUGM","878899ppNLbr","3NvmJBO","3039512ggAPqX","24GKKmcW","_viewer","scene","add","show","flyTo","53587eHbALw","then","3081160krwctf","type","871035FvMahT","the layer type is not 'KML' or 'KMZ","requestRender","remove","dataSources","load"];return(X=function(){return t})()}!function(){const t=V,e=X();for(;;)try{if(526304===-parseInt(t(254))/1*(-parseInt(t(239))/2)+-parseInt(t(246))/3*(parseInt(t(247))/4)+-parseInt(t(233))/5+parseInt(t(241))/6+parseInt(t(245))/7+parseInt(t(248))/8*(parseInt(t(244))/9)+-parseInt(t(256))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Y{constructor(t){this[V(249)]=t}async[H(238)](e){const n=H;e=t(e,{});const s=t(e[n(257)],void 0);if("KML"!==s&&"KMZ"!==s)throw new Error(n(234));const{url:r,clampToGround:i}=e;if(!r)throw new Error(n(242));return this[n(249)].dataSources[n(251)](v.load(r,{camera:this[n(249)][n(250)].camera,canvas:this[n(249)][n(250)][n(240)],clampToGround:i??!1}))}async remove(t){const e=H;t instanceof Promise&&t[e(255)]((t=>{const n=e;this[n(249)][n(237)][n(236)](t),this[n(249)][n(250)][n(235)]()})),t instanceof v&&(this[e(249)].dataSources[e(236)](t),this[e(249)][e(250)].requestRender())}[H(243)](t,e){const n=H;e instanceof Promise&&e[n(255)]((t=>{const e=n;this._viewer[e(253)](t)})),e instanceof v&&this[n(249)].flyTo(e)}show(t,e){const n=H;t instanceof Promise&&t[n(255)]((t=>{const s=n;t[s(252)]=e,this._viewer[s(250)][s(235)]()})),t instanceof v&&(t[n(252)]=e,this[n(249)][n(250)][n(235)]())}}function $(t,e){const n=et();return($=function(t,e){return n[t-=267]})(t,e)}const tt=$;function et(){const t=["1608rQqocc","the url is needed","show","_viewer","_layersMap","WMTS","load","_isSupport","_initLoader","locate","GEOJSON","loadAsync","1512189wuHrEp","_load","3lzOgDs","removeById","_remove","URLTemplate","KML","3DTILES","TERRAIN","请输入Viewer对象!","delete","_typeClass","' is already loaded","' is not support","5824430LzhFMn","1632VZHSWN","811694rqVnul","8442yzhdkT","the type '","bind","includes","10970xJpVuJ","set","_type","get","581156sygPLk","remove","_url","the layer with id '","_id","_locate","_typeClassMap","1sxXdSa","type","18776384qrsbXL","WMS"];return(et=function(){return t})()}!function(){const t=$,e=et();for(;;)try{if(300626===-parseInt(t(286))/1*(parseInt(t(270))/2)+-parseInt(t(304))/3*(-parseInt(t(279))/4)+parseInt(t(275))/5*(-parseInt(t(290))/6)+parseInt(t(302))/7+-parseInt(t(269))/8*(parseInt(t(271))/9)+-parseInt(t(268))/10+parseInt(t(288))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class nt{constructor(t){const e=$;if(!t)throw new Error(e(311));this[e(293)]=t,this._layersMap=new Map,this[e(285)]=new Map}_initLoader(){const t=$,e=this[t(285)][t(278)](this._type);e?this._typeClass=e:(this[t(277)]===t(310)?this[t(313)]=new R(this[t(293)]):this._type===t(309)?this[t(313)]=new M(this[t(293)]):"ARCGIS"===this[t(277)]?this._typeClass=new x(this._viewer):this[t(277)]===t(307)?this[t(313)]=new z(this[t(293)]):"WMS"===this[t(277)]?this[t(313)]=new j(this[t(293)]):this[t(277)]===t(295)?this[t(313)]=new J(this[t(293)]):this[t(277)]===t(308)?this._typeClass=new Y(this[t(293)]):"GEOJSON"===this[t(277)]&&(this[t(313)]=new U(this[t(293)])),this[t(285)][t(276)](this[t(277)],this[t(313)])),this._load=this[t(313)][t(296)][t(273)](this[t(313)]),this[t(306)]=this[t(313)][t(280)][t(273)](this[t(313)]),this._locate=this[t(313)][t(299)].bind(this[t(313)]),this._show=this[t(313)][t(292)][t(273)](this[t(313)])}async[tt(301)](e){const n=tt;if(e=t(e,{}),this[n(283)]=t(e.id,void 0),this[n(294)].has(this[n(283)]))throw new Error(n(282)+this[n(283)]+n(314));if(this[n(281)]=t(e.url,void 0),!this[n(281)])throw new Error(n(291));if(this[n(277)]=t(e[n(287)],void 0),!this[n(297)](e.type))throw new Error(n(272)+e[n(287)]+n(267));if(this._initLoader(),e[n(287)]===n(308)){const t=this._load(e);t instanceof Promise&&this[n(294)].set(e.id,{options:e,layer:t})}else{const t=await this[n(303)](e);this[n(294)][n(276)](e.id,{options:e,layer:t})}}_isSupport(t){const e=tt;return[e(310),e(309),"ARCGIS","URLTemplate",e(289),e(295),"KML",e(300)][e(274)](t)}[tt(305)](t){const e=tt,n=this[e(294)][e(278)](t);if(this[e(294)][e(312)](t),!n)return;const{options:s,layer:r}=n;r&&(this._type=s[e(287)],this[e(298)](),this[e(306)](r))}locateById(t){const e=tt,n=this._layersMap[e(278)](t);if(!n)return;const{options:s,layer:r}=n;r&&(this._type=s[e(287)],this[e(298)](),this[e(284)](s,r))}showById(t,e){const n=tt,s=this[n(294)].get(t);if(!s)return;const{options:r,layer:i}=s;i&&(this[n(277)]=r[n(287)],this._initLoader(),this._show(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 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};
|
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.9",
|
|
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.10"
|
|
35
35
|
}
|
|
36
36
|
}
|