@nsc-earth-2/layer 1.0.8 → 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 +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 f,ArcGisMapServerImageryProvider as p,ImageryLayer as l,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 _=R;function E(){const t=["type","show","20863sHhNhq","TERRAIN","3455065kSSMQs","resolve","bounds","104ioPMeR","remove","camera","912940cbaYtb","flyTo","7564904xFlTeL","url","20stOvTt","/layer.json","1434TsRvyt","valid_bounds","fromDegrees","length","locate","terrainProvider","9URIZSp","3823204FMzJCK","50743ypfUBG","818967Capavo","_viewer","requestRender","scene","the layer type is not 'TERRAIN'","then","setTerrain"];return(E=function(){return t})()}function R(t,e){const n=E();return(R=function(t,e){return n[t-=461]})(t,e)}!function(){const t=R,e=E();for(;;)try{if(941572===parseInt(t(490))/1*(parseInt(t(463))/2)+parseInt(t(481))/3*(-parseInt(t(470))/4)+parseInt(t(492))/5+-parseInt(t(472))/6*(-parseInt(t(480))/7)+-parseInt(t(468))/8+parseInt(t(478))/9*(parseInt(t(466))/10)+-parseInt(t(479))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class S{constructor(t){this[R(482)]=t}load(s){const r=R;s=t(s,{});if(t(s[r(488)],void 0)!==r(491))throw new Error(r(485));const i=t(s[r(469)],void 0),o=new e(n.fromUrl(i));return this[r(482)].scene[r(487)](o),this[r(482)][r(484)].requestRender(),Promise[r(461)](o)}[_(464)](t){const e=_,n=new s;this._viewer[e(477)]=n,this[e(482)][e(484)][e(483)]()}[_(476)](e,n){const s=_;e=t(e,{});const i=t(e[s(469)],void 0);fetch(i+s(471)).then((t=>t.json()))[s(486)]((t=>{const e=s;t[e(473)]&&Array.isArray(t[e(473)])&&4===t.valid_bounds.length?this._viewer[e(465)][e(467)]({destination:r[e(474)](t.valid_bounds[0],t.valid_bounds[1],t[e(473)][2],t[e(473)][3])}):t[e(462)]&&Array.isArray(t[e(462)])&&4==t[e(462)][e(475)]&&this[e(482)][e(465)].flyTo({destination:r.fromDegrees(t[e(462)][0],t.bounds[1],t[e(462)][2],t[e(462)][3])})}))}[_(489)](t,n){const r=_;if(t instanceof e){if(n)this[r(482)].scene.setTerrain(t);else{const t=new s;this._viewer[r(477)]=t}this._viewer.scene[r(483)]()}}}const T=b;function b(t,e){const n=L();return(b=function(t,e){return n[t-=330]})(t,e)}!function(){const t=b,e=L();for(;;)try{if(515871===-parseInt(t(350))/1*(parseInt(t(338))/2)+-parseInt(t(336))/3+parseInt(t(362))/4+parseInt(t(361))/5+-parseInt(t(337))/6+parseInt(t(334))/7+parseInt(t(340))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class M{constructor(t){this[b(348)]=t}async[T(355)](e){const n=T;e=t(e,{});if(t(e[n(351)],void 0)!==n(333))throw new Error("the layer type is not '3DTILES'");const s=e[n(341)];if(!s)throw new Error(n(368));const r={longitude:t(e[n(358)],0),latitude:t(e[n(339)],0),altitude:t(e[n(363)],0),azimuth:t(e.azimuth,0)},o=await i[n(360)](s,{dynamicScreenSpaceError:!0,dynamicScreenSpaceErrorDensity:.00278,dynamicScreenSpaceErrorFactor:4,dynamicScreenSpaceErrorHeightFalloff:.25});return this[n(331)](o,r),this[n(348)][n(347)][n(356)][n(369)](o),this[n(348)][n(347)][n(353)](),o}[T(331)](t,e){const n=T,{longitude:s,latitude:r,altitude:i,azimuth:p}=e;let l=new o;if(s&&r){let t=i;0==i&&(t=this[n(348)].scene[n(335)][n(332)](a[n(330)](s,r))||0);const e=c[n(330)](s,r,t),d=h[n(354)](e),y=new u(1,0,0,0,1,0,0,0,1),w=u[n(366)](f[n(352)](p));u[n(346)](y,w,y),l=o.multiplyByMatrix3(d,y,new o)}else if(i){const e=new c;o[n(364)](t[n(359)][n(367)],e);const s=a[n(357)](e);if(s){const t=f[n(344)](s.latitude),e=f[n(344)](s[n(358)]),r=c[n(330)](e,t,i),a=h[n(354)](r),d=new u(1,0,0,0,1,0,0,0,1),y=u[n(366)](f[n(352)](p));u[n(346)](d,y,d),l=o[n(343)](a,d,new o)}}else if(p){const e=new u(1,0,0,0,1,0,0,0,1),s=u[n(366)](f[n(352)](p));u[n(346)](e,s,e),l=o[n(343)](t[n(359)].transform,e,new o)}else l=t[n(359)][n(367)];t[n(359)][n(367)]=l}[T(365)](t){const e=T;t instanceof i&&(this[e(348)][e(347)][e(356)][e(365)](t),this[e(348)][e(347)][e(353)]())}[T(342)](t,e){const n=T;e instanceof i&&this[n(348)][n(345)](e)}[T(349)](t,e){const n=T;t instanceof i&&(t[n(349)]=e,this[n(348)][n(347)].requestRender())}}function L(){const t=["the url is needed","add","fromDegrees","transferTileSet","getHeight","3DTILES","1950214JLmSsd","globe","1495617rmGTbZ","913542zNzqRe","74cORYJy","latitude","2005424wuEbLH","url","locate","multiplyByMatrix3","toDegrees","flyTo","multiply","scene","_viewer","show","18086ZViolt","type","toRadians","requestRender","eastNorthUpToFixedFrame","load","primitives","fromCartesian","longitude","root","fromUrl","3565600klDdSv","2373796YOGnof","altitude","getTranslation","remove","fromRotationZ","transform"];return(L=function(){return t})()}const x=q;function G(){const t=["1357026tDZqsz","fromProviderAsync","token","show","readyEvent","then","rectangle","the layer type is not 'ARCGIS'","6qXIMGi","_viewer","camera","addEventListener","ready","imageryLayers","locate","18590860JKLcnt","getImageryRectangle","extent","remove","flyTo","scene","GET","2053161sryxxi","313289agkxVQ","ARCGIS","1105755lGKMVB","fromUrl","6JWVjuC","128236IHoLrE","1250960gwFUkj","add","isArray","5vPAOQr","the url is needed","/info/iteminfo?f=pjson","requestRender","type"];return(G=function(){return t})()}function q(t,e){const n=G();return(q=function(t,e){return n[t-=199]})(t,e)}!function(){const t=q,e=G();for(;;)try{if(585142===-parseInt(t(213))/1*(parseInt(t(217))/2)+-parseInt(t(227))/3+-parseInt(t(218))/4*(-parseInt(t(222))/5)+-parseInt(t(235))/6*(-parseInt(t(215))/7)+parseInt(t(219))/8+-parseInt(t(212))/9+parseInt(t(205))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class z{constructor(t){this[q(199)]=t}async load(e){const n=q;e=t(e,{});if(t(e[n(226)],void 0)!==n(214))throw new Error(n(234));const{url:s,alpha:i,token:o}=e;if(!s)throw new Error(n(223));let a=s;a=o?s+"/info/iteminfo?f=pjson&token="+o:s+n(224);const c=await fetch(a,{method:n(211)})[n(232)]((t=>t.json())).then((t=>{const e=n,s={};return o&&(s[e(229)]=o),t&&t.extent&&Array[e(221)](t.extent)&&(s[e(233)]=r.fromDegrees(t[e(207)][0][0],t[e(207)][0][1],t[e(207)][1][0],t[e(207)][1][1])),s})),h=p[n(216)](s,c),u=l[n(228)](h,{});return i&&(u.alpha=i),this[n(199)].imageryLayers[n(220)](u),this[n(199)][n(210)][n(225)](),u}async[x(208)](t){const e=x;t instanceof l&&(this[e(199)][e(203)][e(208)](t,!0),this[e(199)].scene[e(225)]())}[x(204)](t,e){const n=x;if(e instanceof l)if(e[n(202)]){const t=e.getImageryRectangle();this[n(199)][n(210)][n(200)][n(209)]({destination:t})}else e[n(231)][n(201)]((t=>{const s=n,r=e[s(206)]();this[s(199)][s(210)][s(200)][s(209)]({destination:r})}))}[x(230)](t,e){const n=x;t instanceof l&&(t.show=e,this._viewer[n(210)].requestRender())}}const A=D;function k(){const t=["scene","north","south","tilesize","add","URLTemplate","fromDegrees","10015aGhfMA","then","2233560aeHFOU","locate","show","tileHeight","minzoom","WGS84","the layer type is not 'URLTemplate'","9706626YiFcmI","substr","imageryLayers","1310276ITmEMk","1662420ZMFCUy","_viewer","load","proj","ready","the url is needed","camera","maxzoom","flyTo","meta.json","4094120AxOUJM","661766OwtLtB","remove","json","requestRender","rectangle","1feHXOB","minimumLevel","west","east","alpha","addEventListener","readyEvent","tilingScheme","1052twbWYy","indexOf","bounds","getImageryRectangle","{z}/{x}/{y}.png"];return(k=function(){return t})()}function D(t,e){const n=k();return(D=function(t,e){return n[t-=222]})(t,e)}!function(){const t=D,e=k();for(;;)try{if(421030===parseInt(t(223))/1*(-parseInt(t(255))/2)+parseInt(t(245))/3+parseInt(t(231))/4*(parseInt(t(243))/5)+parseInt(t(256))/6+parseInt(t(267))/7+parseInt(t(266))/8+-parseInt(t(252))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class U{constructor(t){this._viewer=t}async[A(258)](e){const n=A;e=t(e,{});if(t(e.type,void 0)!==n(241))throw new Error(n(251));const{url:s,alpha:i}=e;if(!s)throw new Error(n(261));let o=n(235),a=s[n(253)](0,s[n(232)](o))+n(265);const c=await fetch(a,{method:"GET"})[n(244)]((t=>t[n(269)]())).then((t=>{const e=n,i={url:s};return t&&t.bounds&&(i[e(222)]=r[e(242)](t[e(233)][e(225)],t[e(233)][e(238)],t[e(233)][e(226)],t[e(233)][e(237)])),t&&4326==t[e(259)]&&(i[e(230)]=new d({ellipsoid:y[e(250)]})),t&&t[e(263)]&&(i.maximumLevel=t.maxzoom),t&&t.minzoom&&(i[e(224)]=t[e(249)]),t&&t[e(239)]&&(i.tileWidth=i[e(248)]=t[e(239)]),i})),h=new w(c),u=new l(h,{});return i&&(u[n(227)]=i),this[n(257)][n(254)][n(240)](u),this[n(257)][n(236)].requestRender(),u}async[A(268)](t){const e=A;t instanceof l&&(this[e(257)][e(254)].remove(t,!0),this[e(257)][e(236)][e(270)]())}[A(246)](t,e){const n=A;if(e instanceof l)if(e[n(260)]){const t=e[n(234)]();this._viewer[n(236)].camera[n(264)]({destination:t})}else e[n(229)][n(228)]((t=>{const s=n,r=e.getImageryRectangle();this[s(257)][s(236)][s(262)][s(264)]({destination:r})}))}[A(247)](t,e){const n=A;t instanceof l&&(t[n(247)]=e,this[n(257)][n(236)][n(270)]())}}const O=j;function C(){const t=["_viewer","15864UmLojN","3PUddvp","remove","GEOJSON","requestRender","primitives","show","969714hsszLV","558212SbTbMR","primitiveCollection","173936RqVChF","5039574aVtuAv","load","5gtKANj","9781540TTYDvT","type","scene","add","6741Qbfclq","592242rUSQiD"];return(C=function(){return t})()}function j(t,e){const n=C();return(j=function(t,e){return n[t-=426]})(t,e)}!function(){const t=j,e=C();for(;;)try{if(842008===parseInt(t(437))/1+-parseInt(t(428))/2+parseInt(t(431))/3*(-parseInt(t(438))/4)+parseInt(t(443))/5*(parseInt(t(441))/6)+-parseInt(t(440))/7+-parseInt(t(430))/8*(parseInt(t(427))/9)+parseInt(t(444))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class F{constructor(t){this._viewer=t}async[O(442)](e){const n=O;e=t(e,{});if(t(e[n(445)],void 0)!==n(433))throw new Error("the layer type is not 'GEOJSON'");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[n(429)][n(446)]}});return await i[n(442)](s),this[n(429)][n(446)][n(435)][n(426)](i[n(439)]),this[n(429)][n(446)][n(434)](),i}async[O(432)](t){const e=O;t instanceof g&&(this._viewer[e(446)][e(435)][e(432)](t.primitiveCollection),this[e(429)].scene[e(434)]())}locate(t,e){const n=O;e instanceof g&&e.flyTo(this[n(429)],{tolerance:.015})}show(t,e){const n=O;t instanceof g&&(t[n(439)][n(436)]=e,this[n(429)][n(446)][n(434)]())}}function W(){const t=["300772zrprEK","4396456vbNkqH","21XRbers","show","250bonNDO","getImageryRectangle","readyEvent","imageryLayers","WMS","706461zYaEas","the layers is needed","_viewer","requestRender","4487250TRrWUP","camera","ready","15511698BZKVrA","add","scene","110iAsdhw","929533jKHFUF","remove","the url is needed","201045wVAqeU","44PNWcWz","flyTo","locate"];return(W=function(){return t})()}const K=P;!function(){const t=P,e=W();for(;;)try{if(901856===-parseInt(t(271))/1+-parseInt(t(259))/2*(parseInt(t(258))/3)+parseInt(t(262))/4*(-parseInt(t(281))/5)+-parseInt(t(275))/6+-parseInt(t(264))/7*(-parseInt(t(263))/8)+parseInt(t(278))/9+-parseInt(t(266))/10*(-parseInt(t(282))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class N{constructor(t){this[P(273)]=t}async load(e){const n=P;e=t(e,{});if(t(e.type,void 0)!==n(270))throw new Error("the layer type is not 'WMS'");const{url:s,layers:r}=e;if(!s)throw new Error(n(257));if(!r)throw new Error(n(272));const i=new I({url:s}),o=new l(i,{});return this._viewer.imageryLayers[n(279)](o),this[n(273)].scene[n(274)](),o}async[K(283)](t){const e=K;t instanceof l&&(this[e(273)][e(269)].remove(t,!0),this[e(273)][e(280)][e(274)]())}[K(261)](t,e){const n=K;if(e instanceof l)if(e[n(277)]){const t=e[n(267)]();this._viewer.scene[n(276)][n(260)]({destination:t})}else e[n(268)].addEventListener((t=>{const s=n,r=e[s(267)]();this[s(273)][s(280)][s(276)][s(260)]({destination:r})}))}[K(265)](t,e){const n=K;t instanceof l&&(t.show=e,this[n(273)].scene.requestRender())}}function P(t,e){const n=W();return(P=function(t,e){return n[t-=257]})(t,e)}const H=J;function J(t,e){const n=V();return(J=function(t,e){return n[t-=409]})(t,e)}function V(){const t=["618976GqhKFU","6WdpMzd","225806qUMIDK","_viewer","imageryLayers","29643ZRxRJo","2059810pgvmui","getImageryRectangle","ready","WMTS","217738GymeEC","210430DxNezP","88iVvJZh","the url is needed","addEventListener","subdomains","remove","locate","53073tsIakR","readyEvent","the style is needed","tileMatrixLabels","scene","flyTo","requestRender","camera","10gpakwc","show","11anOpWK","the layer is needed"];return(V=function(){return t})()}!function(){const t=J,e=V();for(;;)try{if(191791===parseInt(t(413))/1+parseInt(t(429))/2*(-parseInt(t(438))/3)+parseInt(t(433))/4+parseInt(t(414))/5+-parseInt(t(434))/6*(parseInt(t(435))/7)+-parseInt(t(415))/8*(-parseInt(t(421))/9)+parseInt(t(409))/10*(-parseInt(t(431))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Z{constructor(t){this[J(436)]=t}async load(e){const n=J;e=t(e,{});if(t(e.type,void 0)!==n(412))throw new Error("the layer type is not 'WMTS'");const{url:s,layer:r,style:i,tileMatrixSetID:o,subdomains:a,format:c,tilingScheme:h,tileMatrixLabels:u}=e;if(!s)throw new Error(n(416));if(!r)throw new Error(n(432));if(!i)throw new Error(n(423));if(!o)throw new Error("the tileMatrixSetID is needed");const f={url:s,layer:r,style:i,tileMatrixSetID:o};a&&(f[n(418)]=a),c&&(f.format=c),h&&(f.tilingScheme=h),u&&(f[n(424)]=u);const p=new m(f),d=new l(p,{});return this._viewer[n(437)].add(d),this[n(436)][n(425)][n(427)](),d}async[H(419)](t){const e=H;t instanceof l&&(this[e(436)].imageryLayers[e(419)](t,!0),this[e(436)][e(425)][e(427)]())}[H(420)](t,e){const n=H;if(e instanceof l)if(e[n(411)]){const t=e[n(410)]();this._viewer[n(425)][n(428)][n(426)]({destination:t})}else e[n(422)][n(417)]((t=>{const s=n,r=e[s(410)]();this[s(436)][s(425)][s(428)][s(426)]({destination:r})}))}[H(430)](t,e){const n=H;t instanceof l&&(t[n(430)]=e,this[n(436)][n(425)].requestRender())}}function B(t,e){const n=Y();return(B=function(t,e){return n[t-=301]})(t,e)}function Y(){const t=["load","show","2426246fIbnzi","camera","2330868ZkwdIG","add","589324QHjHvb","scene","remove","9jotRYS","the url is needed","26680008HneExD","14yvQneu","requestRender","type","1177373kbWxPs","5002235lAjzSy","_viewer","KML","flyTo","locate","653916QMOpoy","KMZ","then","dataSources"];return(Y=function(){return t})()}const Q=B;!function(){const t=B,e=Y();for(;;)try{if(650373===-parseInt(t(301))/1+-parseInt(t(313))/2+parseInt(t(315))/3+parseInt(t(317))/4+-parseInt(t(302))/5+parseInt(t(307))/6*(-parseInt(t(323))/7)+parseInt(t(322))/8*(parseInt(t(320))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class X{constructor(t){this[B(303)]=t}async[Q(311)](e){const n=Q;e=t(e,{});const s=t(e[n(325)],void 0);if(s!==n(304)&&s!==n(308))throw new Error("the layer type is not 'KML' or 'KMZ");const{url:r,clampToGround:i}=e;if(!r)throw new Error(n(321));return this[n(303)][n(310)][n(316)](v[n(311)](r,{camera:this[n(303)][n(318)][n(314)],canvas:this[n(303)].scene.canvas,clampToGround:i??!1}))}async[Q(319)](t){const e=Q;t instanceof Promise&&t[e(309)]((t=>{const n=e;this[n(303)].dataSources[n(319)](t),this[n(303)].scene[n(324)]()})),t instanceof v&&(this[e(303)].dataSources.remove(t),this._viewer[e(318)][e(324)]())}[Q(306)](t,e){const n=Q;e instanceof Promise&&e[n(309)]((t=>{const e=n;this[e(303)][e(305)](t)})),e instanceof v&&this[n(303)][n(305)](e)}show(t,e){const n=Q;t instanceof Promise&&t[n(309)]((t=>{const s=n;t[s(312)]=e,this._viewer[s(318)][s(324)]()})),t instanceof v&&(t.show=e,this._viewer.scene[n(324)]())}}const $=tt;function tt(t,e){const n=nt();return(tt=function(t,e){return n[t-=469]})(t,e)}!function(){const t=tt,e=nt();for(;;)try{if(677091===-parseInt(t(508))/1+-parseInt(t(486))/2+-parseInt(t(499))/3*(parseInt(t(493))/4)+parseInt(t(512))/5*(parseInt(t(487))/6)+parseInt(t(484))/7+-parseInt(t(500))/8+parseInt(t(491))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class et{constructor(t){const e=tt;if(!t)throw new Error("请输入Viewer对象!");this._viewer=t,this[e(481)]=new Map,this[e(498)]=new Map}[$(472)](){const t=$,e=this[t(498)][t(506)](this[t(471)]);e?this[t(480)]=e:("TERRAIN"===this[t(471)]?this[t(480)]=new S(this[t(513)]):this[t(471)]===t(501)?this[t(480)]=new M(this._viewer):this[t(471)]===t(511)?this[t(480)]=new z(this[t(513)]):this[t(471)]===t(507)?this[t(480)]=new U(this[t(513)]):"WMS"===this[t(471)]?this[t(480)]=new N(this[t(513)]):this[t(471)]===t(497)?this._typeClass=new Z(this._viewer):this._type===t(479)?this[t(480)]=new X(this._viewer):"GEOJSON"===this[t(471)]&&(this[t(480)]=new F(this[t(513)])),this[t(498)][t(485)](this[t(471)],this[t(480)])),this[t(488)]=this[t(480)][t(483)][t(470)](this._typeClass),this[t(475)]=this[t(480)][t(504)][t(470)](this[t(480)]),this[t(502)]=this[t(480)][t(474)].bind(this[t(480)]),this._show=this[t(480)].show[t(470)](this._typeClass)}async[$(490)](e){const n=$;if(e=t(e,{}),this[n(469)]=t(e.id,void 0),this[n(481)].has(this[n(469)]))throw new Error(n(492)+this[n(469)]+n(495));if(this[n(496)]=t(e.url,void 0),!this[n(496)])throw new Error(n(494));if(this[n(471)]=t(e[n(477)],void 0),!this[n(510)](e[n(477)]))throw new Error(n(514)+e[n(477)]+n(473));if(this[n(472)](),e[n(477)]===n(479)){const t=this._load(e);t instanceof Promise&&this._layersMap[n(485)](e.id,{options:e,layer:t})}else{const t=await this[n(488)](e);this._layersMap[n(485)](e.id,{options:e,layer:t})}}[$(510)](t){const e=$;return[e(509),e(501),e(511),e(507),e(482),e(497),e(479),"GEOJSON"].includes(t)}[$(503)](t){const e=$,n=this[e(481)][e(506)](t);if(this[e(481)][e(476)](t),!n)return;const{options:s,layer:r}=n;r&&(this[e(471)]=s.type,this[e(472)](),this._remove(r))}locateById(t){const e=$,n=this[e(481)].get(t);if(!n)return;const{options:s,layer:r}=n;r&&(this[e(471)]=s[e(477)],this[e(472)](),this._locate(s,r))}[$(489)](t,e){const n=$,s=this._layersMap.get(t);if(!s)return;const{options:r,layer:i}=s;i&&(this._type=r[n(477)],this[n(472)](),this[n(505)](i,e))}[$(478)](){}}function nt(){const t=["ARCGIS","104270rvvDFP","_viewer","the type '","_id","bind","_type","_initLoader","' is not support","locate","_remove","delete","type","destroy","KML","_typeClass","_layersMap","WMS","load","7309491epgtVz","set","242050yHFaFU","348IRqRcA","_load","showById","loadAsync","659241EJOlKP","the layer with id '","3471172zuFCkY","the url is needed","' is already loaded","_url","WMTS","_typeClassMap","3BTgzwj","1780160WaKTfz","3DTILES","_locate","removeById","remove","_show","get","URLTemplate","438565GwovxC","TERRAIN","_isSupport"];return(nt=function(){return t})()}export{et 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};
|
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.10",
|
|
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
|
}
|