@nsc-earth-2/layer 1.0.11 → 1.1.0
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{Terrain as t,CesiumTerrainProvider as e,EllipsoidTerrainProvider as n,Rectangle as s,Cesium3DTileset as r,Matrix4 as i,Cartographic as o,Cartesian3 as a,Transforms as c,Matrix3 as h,Math as u,ArcGisMapServerImageryProvider as l,ImageryLayer as p,GeographicTilingScheme as f,Ellipsoid as d,UrlTemplateImageryProvider as y,WebMapServiceImageryProvider as w,WebMapTileServiceImageryProvider as I,KmlDataSource as m}from"cesium";import{GeoJsonPrimitiveLayer as v}from"@nsc-earth-2/primitive-geojson";const g=E;function E(t,e){const n=R();return(E=function(t,e){return n[t-=227]})(t,e)}function R(){const t=["terrainProvider","requestRender","isArray","91BUhciI","resolve","9sglujd","_viewer","scene","441504kaMmZR","type","camera","setTerrain","the layer type is not 'TERRAIN'","73195iIWWPE","json","flyTo","valid_bounds","393710AHcxJb","33672nJcXSW","22680GgaCbh","url","379782cAHDiB","bounds","fromDegrees","remove","24qayKSx","load","/layer.json","then","151782wZRYwq","TERRAIN"];return(R=function(){return t})()}!function(){const t=E,e=R();for(;;)try{if(134730===parseInt(t(236))/1+parseInt(t(256))/2+-parseInt(t(228))/3+parseInt(t(246))/4+-parseInt(t(251))/5*(-parseInt(t(232))/6)+parseInt(t(241))/7*(-parseInt(t(257))/8)+-parseInt(t(243))/9*(parseInt(t(255))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class _{constructor(t){this[E(244)]=t}[g(233)](n){const s=g;if((n=n??{})[s(247)]!==s(237))throw new Error(s(250));const r=n[s(227)],i=new t(e.fromUrl(r));return this._viewer[s(245)][s(249)](i),this[s(244)][s(245)].requestRender(),Promise[s(242)](i)}[g(231)](t){const e=g,s=new n;this[e(244)][e(238)]=s,this[e(244)][e(245)][e(239)]()}locate(t,e){const n=g,r=(t=t??{})[n(227)];fetch(r+n(234))[n(235)]((t=>t[n(252)]()))[n(235)]((t=>{const e=n;t[e(254)]&&Array.isArray(t[e(254)])&&4===t[e(254)].length?this[e(244)].camera[e(253)]({destination:s[e(230)](t.valid_bounds[0],t[e(254)][1],t[e(254)][2],t.valid_bounds[3])}):t[e(229)]&&Array[e(240)](t.bounds)&&4==t[e(229)].length&&this[e(244)][e(248)][e(253)]({destination:s[e(230)](t[e(229)][0],t[e(229)][1],t[e(229)][2],t[e(229)][3])})}))}show(e,s){const r=g;if(e instanceof t){if(s)this[r(244)][r(245)][r(249)](e);else{const t=new n;this[r(244)][r(238)]=t}this[r(244)].scene[r(239)]()}}}const S=T;function T(t,e){const n=q();return(T=function(t,e){return n[t-=481]})(t,e)}function q(){const t=["url","remove","getHeight","4377245HoMDow","14676152FOqGSP","1795059gFqVZM","transform","flyTo","transferTileSet","toDegrees","72TFDEHI","fromRotationZ","locate","globe","multiply","2552364KLRcHt","getTranslation","2563748SSbDqN","latitude","fromCartesian","scene","_viewer","2969512yeFHnq","load","fromDegrees","root","toRadians","eastNorthUpToFixedFrame","show","add","longitude","requestRender","14626AGyCiO","multiplyByMatrix3","azimuth"];return(q=function(){return t})()}!function(){const t=T,e=q();for(;;)try{if(473940===parseInt(t(501))/1*(-parseInt(t(514))/2)+-parseInt(t(509))/3+parseInt(t(486))/4+-parseInt(t(507))/5+-parseInt(t(484))/6+parseInt(t(491))/7+parseInt(t(508))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class L{constructor(t){this[T(490)]=t}async[S(492)](t){const e=S;if("3DTILES"!==(t=t??{}).type)throw new Error("the layer type is not '3DTILES'");const n=t[e(504)];if(!n)throw new Error("the url is needed");const s={longitude:t.longitude??0,latitude:t[e(487)]??0,altitude:t.altitude??0,azimuth:t[e(503)]??0},i=await r.fromUrl(n,{dynamicScreenSpaceError:!0,dynamicScreenSpaceErrorDensity:.00278,dynamicScreenSpaceErrorFactor:4,dynamicScreenSpaceErrorHeightFalloff:.25});return this[e(512)](i,s),this[e(490)][e(489)].primitives[e(498)](i),this[e(490)][e(489)].requestRender(),i}[S(512)](t,e){const n=S,{longitude:s,latitude:r,altitude:l,azimuth:p}=e;let f=new i;if(s&&r){let t=l;0==l&&(t=this[n(490)][n(489)][n(482)][n(506)](o[n(493)](s,r))||0);const e=a[n(493)](s,r,t),d=c[n(496)](e),y=new h(1,0,0,0,1,0,0,0,1),w=h[n(515)](u[n(495)](p));h[n(483)](y,w,y),f=i[n(502)](d,y,new i)}else if(l){const e=new a;i[n(485)](t[n(494)].transform,e);const s=o[n(488)](e);if(s){const t=u[n(513)](s[n(487)]),e=u[n(513)](s[n(499)]),r=a[n(493)](e,t,l),o=c[n(496)](r),d=new h(1,0,0,0,1,0,0,0,1),y=h[n(515)](u.toRadians(p));h[n(483)](d,y,d),f=i[n(502)](o,d,new i)}}else if(p){const e=new h(1,0,0,0,1,0,0,0,1),s=h.fromRotationZ(u[n(495)](p));h[n(483)](e,s,e),f=i.multiplyByMatrix3(t.root[n(510)],e,new i)}else f=t.root[n(510)];t[n(494)].transform=f}[S(505)](t){const e=S;t instanceof r&&(this._viewer[e(489)].primitives[e(505)](t),this[e(490)][e(489)][e(500)]())}[S(481)](t,e){const n=S;e instanceof r&&this._viewer[n(511)](e)}show(t,e){const n=S;t instanceof r&&(t[n(497)]=e,this[n(490)][n(489)].requestRender())}}const M=b;function b(t,e){const n=A();return(b=function(t,e){return n[t-=122]})(t,e)}function A(){const t=["camera","token","6617105BJyFdA","_viewer","785722dSGwta","requestRender","16gXKoTT","the layer type is not 'ARCGIS'","1SsIRAx","fromProviderAsync","imageryLayers","180xGDAKv","flyTo","99453XghCyA","ready","getImageryRectangle","add","show","/info/iteminfo?f=pjson","ARCGIS","extent","fromDegrees","isArray","192rNTIGH","scene","1174613uBohuo","load","type","/info/iteminfo?f=pjson&token=","5304798OkzxyY","then","rectangle","GET","4953620jnKqXV","2469792EFpClw","json","remove","fromUrl","locate","readyEvent"];return(A=function(){return t})()}!function(){const t=b,e=A();for(;;)try{if(847140===-parseInt(t(156))/1*(parseInt(t(152))/2)+parseInt(t(161))/3*(-parseInt(t(131))/4)+parseInt(t(150))/5+parseInt(t(142))/6+-parseInt(t(141))/7*(parseInt(t(154))/8)+parseInt(t(137))/9+parseInt(t(159))/10*(parseInt(t(133))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class G{constructor(t){this[b(151)]=t}async[M(134)](t){const e=M;if((t=t??{})[e(135)]!==e(127))throw new Error(e(155));const{url:n,alpha:r,token:i}=t;if(!n)throw new Error("the url is needed");let o=n;o=i?n+e(136)+i:n+e(126);const a=await fetch(o,{method:e(140)})[e(138)]((t=>t[e(143)]())).then((t=>{const n=e,r={};return i&&(r[n(149)]=i),t&&t[n(128)]&&Array[n(130)](t.extent)&&(r[n(139)]=s[n(129)](t[n(128)][0][0],t[n(128)][0][1],t[n(128)][1][0],t[n(128)][1][1])),r})),c=l[e(145)](n,a),h=p[e(157)](c,{});return r&&(h.alpha=r),this[e(151)][e(158)][e(124)](h),this[e(151)][e(132)].requestRender(),h}async[M(144)](t){const e=M;t instanceof p&&(this._viewer[e(158)].remove(t,!0),this[e(151)].scene[e(153)]())}[M(146)](t,e){const n=M;if(e instanceof p)if(e[n(122)]){const t=e[n(123)]();this[n(151)].scene[n(148)].flyTo({destination:t})}else e[n(147)].addEventListener((t=>{const s=n,r=e[s(123)]();this[s(151)][s(132)][s(148)][s(160)]({destination:r})}))}[M(125)](t,e){const n=M;t instanceof p&&(t[n(125)]=e,this._viewer.scene[n(153)]())}}const x=C;function C(t,e){const n=F();return(C=function(t,e){return n[t-=177]})(t,e)}function F(){const t=["tileWidth","load","3132101oqgBWC","minimumLevel","alpha","east","22350550nNEPqN","imageryLayers","{z}/{x}/{y}.png","GET","_viewer","camera","substr","maxzoom","ready","bounds","north","show","type","tileHeight","meta.json","south","json","4832AMoPQI","then","add","maximumLevel","1555494mwcHdR","485003YrTqvX","getImageryRectangle","scene","remove","tilesize","4OQSIHA","URLTemplate","12186kjPUqe","minzoom","requestRender","5hlbyWT","tilingScheme","west","fromDegrees","1742640LBtLJQ","3050448gjAWEZ"];return(F=function(){return t})()}!function(){const t=C,e=F();for(;;)try{if(818583===-parseInt(t(194))/1*(parseInt(t(199))/2)+-parseInt(t(209))/3+-parseInt(t(208))/4+parseInt(t(204))/5*(-parseInt(t(193))/6)+parseInt(t(212))/7+parseInt(t(189))/8*(parseInt(t(201))/9)+parseInt(t(216))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class k{constructor(t){this[C(220)]=t}async[x(211)](t){const e=x;if((t=t??{})[e(184)]!==e(200))throw new Error("the layer type is not 'URLTemplate'");const{url:n,alpha:r}=t;if(!n)throw new Error("the url is needed");let i=e(218),o=n[e(178)](0,n.indexOf(i))+e(186);const a=await fetch(o,{method:e(219)}).then((t=>t[e(188)]()))[e(190)]((t=>{const r=e,i={url:n};return t&&t[r(181)]&&(i.rectangle=s[r(207)](t[r(181)][r(206)],t[r(181)][r(187)],t.bounds[r(215)],t.bounds[r(182)])),t&&4326==t.proj&&(i[r(205)]=new f({ellipsoid:d.WGS84})),t&&t[r(179)]&&(i[r(192)]=t[r(179)]),t&&t[r(202)]&&(i[r(213)]=t[r(202)]),t&&t[r(198)]&&(i[r(210)]=i[r(185)]=t[r(198)]),i})),c=new y(a),h=new p(c,{});return r&&(h[e(214)]=r),this[e(220)].imageryLayers[e(191)](h),this[e(220)][e(196)].requestRender(),h}async remove(t){const e=x;t instanceof p&&(this[e(220)][e(217)][e(197)](t,!0),this[e(220)][e(196)][e(203)]())}locate(t,e){const n=x;if(e instanceof p)if(e[n(180)]){const t=e[n(195)]();this._viewer[n(196)][n(177)].flyTo({destination:t})}else e.readyEvent.addEventListener((t=>{const s=n,r=e.getImageryRectangle();this._viewer[s(196)][s(177)].flyTo({destination:r})}))}[x(183)](t,e){const n=x;t instanceof p&&(t[n(183)]=e,this._viewer.scene[n(203)]())}}const D=j;function j(t,e){const n=W();return(j=function(t,e){return n[t-=208]})(t,e)}!function(){const t=j,e=W();for(;;)try{if(954816===-parseInt(t(224))/1+parseInt(t(227))/2+parseInt(t(212))/3*(-parseInt(t(209))/4)+-parseInt(t(217))/5*(parseInt(t(222))/6)+parseInt(t(223))/7*(parseInt(t(211))/8)+-parseInt(t(214))/9*(-parseInt(t(216))/10)+parseInt(t(226))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class B{constructor(t){this[j(229)]=t}async load(t){const e=j;if((t=t??{})[e(210)]!==e(213))throw new Error(e(228));const{url:n,clampToGround:s}=t;if(!n)throw new Error("the url is needed");const r=new v({options:{useGroundGeometry:s??!1,clampToGround:s??!1,scene:this._viewer[e(230)]}});return await r[e(220)](n),this[e(229)][e(230)][e(221)].add(r[e(219)]),this[e(229)][e(230)][e(208)](),r}async[D(218)](t){const e=D;t instanceof v&&(this[e(229)][e(230)][e(221)].remove(t[e(219)]),this[e(229)][e(230)].requestRender())}locate(t,e){const n=D;e instanceof v&&e[n(215)](this[n(229)],{tolerance:.015})}show(t,e){const n=D;t instanceof v&&(t.primitiveCollection[n(225)]=e,this[n(229)][n(230)].requestRender())}}function W(){const t=["load","primitives","10406724RNUqZe","49FqfQkm","224674FqbAQh","show","6744793MlBPij","3398132KIbUVq","the layer type is not 'GEOJSON'","_viewer","scene","requestRender","8LHaVGR","type","301752tOKEdO","1660641uCjfGt","GEOJSON","351432hCiOEZ","flyTo","370BCiwNp","5eUYLjg","remove","primitiveCollection"];return(W=function(){return t})()}const K=O;function O(t,e){const n=U();return(O=function(t,e){return n[t-=359]})(t,e)}function U(){const t=["camera","add","the layer type is not 'WMS'","remove","addEventListener","WMS","locate","getImageryRectangle","requestRender","show","555618mqGHeV","3504948PvDxQW","48FMGrXR","308XqHTfV","5543mjWGRJ","441uizQzl","imageryLayers","19233368AxXMMZ","8694CQspFX","24170TrmksL","5624HkbgJR","the url is needed","scene","type","38860ywrclZ","_viewer"];return(U=function(){return t})()}!function(){const t=O,e=U();for(;;)try{if(525940===parseInt(t(378))/1*(-parseInt(t(377))/2)+-parseInt(t(374))/3+-parseInt(t(375))/4+parseInt(t(362))/5*(-parseInt(t(376))/6)+parseInt(t(382))/7*(parseInt(t(384))/8)+parseInt(t(379))/9*(-parseInt(t(383))/10)+parseInt(t(381))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Z{constructor(t){this[O(363)]=t}async load(t){const e=O;if((t=t??{})[e(361)]!==e(369))throw new Error(e(366));const{url:n,layers:s}=t;if(!n)throw new Error(e(359));if(!s)throw new Error("the layers is needed");const r=new w(t),i=new p(r,{});return this._viewer.imageryLayers[e(365)](i),this[e(363)][e(360)].requestRender(),i}async[K(367)](t){const e=K;t instanceof p&&(this[e(363)][e(380)][e(367)](t,!0),this[e(363)][e(360)].requestRender())}[K(370)](t,e){const n=K;if(e instanceof p)if(e.ready){const t=e[n(371)]();this[n(363)][n(360)].camera.flyTo({destination:t})}else e.readyEvent[n(368)]((t=>{const s=n,r=e[s(371)]();this[s(363)][s(360)][s(364)].flyTo({destination:r})}))}[K(373)](t,e){const n=K;t instanceof p&&(t.show=e,this._viewer[n(360)][n(372)]())}}const H=z;function N(){const t=["tileMatrixLabels","6129104dFOZpu","show","306OnodxR","20678jIdoSB","16tFwmUp","6041979ubQCSA","locate","10346680MSeByS","getImageryRectangle","scene","format","imageryLayers","1898135auqvwS","requestRender","remove","WMTS","the url is needed","tilingScheme","flyTo","1MsGrsR","the layer type is not 'WMTS'","the layer is needed","the tileMatrixSetID is needed","add","_viewer","load","549897TEhklI","387606IogWWU","addEventListener","camera"];return(N=function(){return t})()}!function(){const t=z,e=N();for(;;)try{if(411913===parseInt(t(418))/1*(-parseInt(t(426))/2)+parseInt(t(425))/3*(parseInt(t(434))/4)+-parseInt(t(442))/5+-parseInt(t(432))/6*(parseInt(t(433))/7)+parseInt(t(430))/8+parseInt(t(435))/9+-parseInt(t(437))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class P{constructor(t){this[z(423)]=t}async[H(424)](t){const e=H;if((t=t??{}).type!==e(445))throw new Error(e(419));const{url:n,layer:s,style:r,tileMatrixSetID:i,subdomains:o,format:a,tilingScheme:c,tileMatrixLabels:h}=t;if(!n)throw new Error(e(446));if(!s)throw new Error(e(420));if(!r)throw new Error("the style is needed");if(!i)throw new Error(e(421));const u={url:n,layer:s,style:r,tileMatrixSetID:i};o&&(u.subdomains=o),a&&(u[e(440)]=a),c&&(u[e(447)]=c),h&&(u[e(429)]=h);const l=new I(u),f=new p(l,{});return this[e(423)][e(441)][e(422)](f),this[e(423)][e(439)][e(443)](),f}async[H(444)](t){const e=H;t instanceof p&&(this[e(423)].imageryLayers[e(444)](t,!0),this._viewer.scene[e(443)]())}[H(436)](t,e){const n=H;if(e instanceof p)if(e.ready){const t=e.getImageryRectangle();this._viewer.scene[n(428)].flyTo({destination:t})}else e.readyEvent[n(427)]((t=>{const s=n,r=e[s(438)]();this[s(423)][s(439)][s(428)][s(417)]({destination:r})}))}[H(431)](t,e){const n=H;t instanceof p&&(t[n(431)]=e,this[n(423)].scene[n(443)]())}}function z(t,e){const n=N();return(z=function(t,e){return n[t-=417]})(t,e)}function J(){const t=["60ZUwwty","show","_viewer","flyTo","requestRender","then","267TEvOCc","63hpNEFK","dataSources","remove","load","add","canvas","879288DFGnKS","40zqyFAg","KMZ","90sJEpoa","15153SPdNff","724480fhHsqj","scene","KML","275824jwyANL","the layer type is not 'KML' or 'KMZ","499851WZDMiu","1194256hBkXqG"];return(J=function(){return t})()}const X=Q;function Q(t,e){const n=J();return(Q=function(t,e){return n[t-=430]})(t,e)}!function(){const t=Q,e=J();for(;;)try{if(176151===-parseInt(t(444))/1*(parseInt(t(454))/2)+-parseInt(t(430))/3*(-parseInt(t(452))/4)+parseInt(t(431))/5+-parseInt(t(451))/6+parseInt(t(437))/7+parseInt(t(434))/8*(parseInt(t(445))/9)+parseInt(t(438))/10*(-parseInt(t(436))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class V{constructor(t){this[Q(440)]=t}async[X(448)](t){const e=X,n=(t=t??{}).type;if(n!==e(433)&&n!==e(453))throw new Error(e(435));const{url:s,clampToGround:r}=t;if(!s)throw new Error("the url is needed");return this[e(440)][e(446)][e(449)](m[e(448)](s,{camera:this[e(440)][e(432)].camera,canvas:this[e(440)][e(432)][e(450)],clampToGround:r??!1}))}async[X(447)](t){const e=X;(null==t?void 0:t[e(443)])&&t[e(443)]((t=>{const n=e;this[n(440)][n(446)].remove(t),this[n(440)][n(432)][n(442)]()})),t instanceof m&&(this._viewer[e(446)][e(447)](t),this[e(440)].scene[e(442)]())}locate(t,e){const n=X;(null==e?void 0:e[n(443)])&&e.then((t=>{const e=n;this._viewer[e(441)](t)})),e instanceof m&&this[n(440)][n(441)](e)}[X(439)](t,e){const n=X;(null==t?void 0:t[n(443)])&&t.then((t=>{const s=n;t[s(439)]=e,this[s(440)][s(432)][s(442)]()})),t instanceof m&&(t.show=e,this[n(440)].scene.requestRender())}}const Y=tt;function $(){const t=["10KgvCBm","KML","28167iggFLa","_url","_remove","set","780258bSKPmP","_viewer","WMS","showById","83370dxbRLf","TERRAIN","_layersMap","has","50646057kEZzJZ","GEOJSON","type","URLTemplate","210uvuZBx","_show","120NTKxvm","_load","show","get","_typeClassMap","_id","url","the layer with id '","请输入Viewer对象!","removeById","ARCGIS","remove","includes","' is already loaded","bind","293144elnvDF","_initLoader","the url is needed","3DTILES","204sUBJgr","1011878hUFOMh","locate","delete","_type","loadAsync","' is not support","_typeClass","_isSupport","5647131aqVBoI","WMTS","_locate","the type '"];return($=function(){return t})()}function tt(t,e){const n=$();return(tt=function(t,e){return n[t-=217]})(t,e)}!function(){const t=tt,e=$();for(;;)try{if(663112===-parseInt(t(218))/1+-parseInt(t(236))/2+-parseInt(t(232))/3*(parseInt(t(217))/4)+-parseInt(t(250))/5*(parseInt(t(240))/6)+-parseInt(t(248))/7*(parseInt(t(265))/8)+-parseInt(t(226))/9*(parseInt(t(230))/10)+parseInt(t(244))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class et{constructor(t){const e=tt;if(!t)throw new Error(e(258));this[e(237)]=t,this[e(242)]=new Map,this[e(254)]=new Map}[Y(266)](){const t=Y,e=this[t(254)][t(253)](this[t(221)]);e?this[t(224)]=e:(this[t(221)]===t(241)?this[t(224)]=new _(this[t(237)]):this[t(221)]===t(268)?this._typeClass=new L(this._viewer):this[t(221)]===t(260)?this[t(224)]=new G(this[t(237)]):"URLTemplate"===this[t(221)]?this[t(224)]=new k(this[t(237)]):"WMS"===this[t(221)]?this[t(224)]=new Z(this[t(237)]):this[t(221)]===t(227)?this[t(224)]=new P(this._viewer):"KML"===this[t(221)]?this[t(224)]=new V(this[t(237)]):this[t(221)]===t(245)&&(this[t(224)]=new B(this._viewer)),this._typeClassMap[t(235)](this[t(221)],this[t(224)])),this[t(251)]=this[t(224)].load[t(264)](this[t(224)]),this[t(234)]=this._typeClass[t(261)][t(264)](this[t(224)]),this._locate=this[t(224)][t(219)].bind(this[t(224)]),this[t(249)]=this[t(224)][t(252)][t(264)](this[t(224)])}async[Y(222)](t){const e=Y;if(t=t??{},this._id=t.id,this[e(242)][e(243)](this[e(255)]))throw new Error(e(257)+this._id+e(263));if(this[e(233)]=t[e(256)],!this[e(233)])throw new Error(e(267));if(this[e(221)]=t[e(246)],!this[e(225)](t.type))throw new Error(e(229)+t.type+e(223));if(this[e(266)](),"KML"===t.type){const n=this[e(251)](t);n instanceof Promise&&this[e(242)].set(t.id,{options:t,layer:n})}else{const e=await this._load(t);this._layersMap.set(t.id,{options:t,layer:e})}}[Y(225)](t){const e=Y;return[e(241),e(268),e(260),e(247),e(238),e(227),e(231),e(245)][e(262)](t)}[Y(259)](t){const e=Y,n=this[e(242)][e(253)](t);if(this[e(242)][e(220)](t),!n)return;const{options:s,layer:r}=n;r&&(this[e(221)]=s.type,this._initLoader(),this[e(234)](r))}locateById(t){const e=Y,n=this[e(242)][e(253)](t);if(!n)return;const{options:s,layer:r}=n;r&&(this[e(221)]=s[e(246)],this[e(266)](),this[e(228)](s,r))}[Y(239)](t,e){const n=Y,s=this[n(242)].get(t);if(!s)return;const{options:r,layer:i}=s;i&&(this._type=r[n(246)],this._initLoader(),this._show(i,e))}destroy(){}}export{et as default};
|
|
1
|
+
import{defaultValue as t,Terrain as e,CesiumTerrainProvider as s,EllipsoidTerrainProvider as n,Rectangle as r,Cesium3DTileset as i,Matrix4 as o,Cartographic as a,Cartesian3 as c,Transforms as h,Matrix3 as p,Math as u,ArcGisMapServerImageryProvider as l,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 g}from"@nsc-earth-2/primitive-geojson";function _(t,e){const s=T();return(_=function(t,e){return s[t-=317]})(t,e)}const E=_;function T(){const t=["then","scene","_viewer","4247665ZsBmLH","load","16kwJOIg","remove","isArray","flyTo","6738543QoZXYo","12gjiIMj","8706bcXLEw","valid_bounds","terrainProvider","6wLlBoL","the layer type is not 'TERRAIN'","102550oOtarO","camera","bounds","817931eCAYJp","fromDegrees","resolve","TERRAIN","652780rmhNzQ","type","length","requestRender","setTerrain","fromUrl","9222690azbRzg","show"];return(T=function(){return t})()}!function(){const t=_,e=T();for(;;)try{if(488924===parseInt(t(321))/1+parseInt(t(325))/2+parseInt(t(344))/3*(-parseInt(t(343))/4)+-parseInt(t(336))/5*(parseInt(t(347))/6)+parseInt(t(318))/7*(parseInt(t(338))/8)+-parseInt(t(342))/9+parseInt(t(331))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class R{constructor(t){this[_(335)]=t}[E(337)](n){const r=E;n=t(n,{});if(t(n[r(326)],void 0)!==r(324))throw new Error(r(317));const i=t(n.url,void 0),o=new e(s[r(330)](i));return this._viewer[r(334)].setTerrain(o),this[r(335)].scene[r(328)](),Promise[r(323)](o)}[E(339)](t){const e=E,s=new n;this[e(335)][e(346)]=s,this._viewer[e(334)].requestRender()}locate(e,s){const n=E;e=t(e,{});const i=t(e.url,void 0);fetch(i+"/layer.json")[n(333)]((t=>t.json()))[n(333)]((t=>{const e=n;t[e(345)]&&Array.isArray(t[e(345)])&&4===t[e(345)][e(327)]?this._viewer[e(319)][e(341)]({destination:r[e(322)](t.valid_bounds[0],t[e(345)][1],t.valid_bounds[2],t[e(345)][3])}):t[e(320)]&&Array[e(340)](t[e(320)])&&4==t.bounds[e(327)]&&this[e(335)][e(319)][e(341)]({destination:r[e(322)](t[e(320)][0],t.bounds[1],t.bounds[2],t[e(320)][3])})}))}[E(332)](t,s){const r=E;if(t instanceof e){if(s)this[r(335)][r(334)][r(329)](t);else{const t=new n;this[r(335)][r(346)]=t}this._viewer[r(334)][r(328)]()}}}function S(){const t=["show","load","the url is needed","altitude","21591GcVWlI","849893KsmJDA","type","flyTo","92CplkQa","latitude","3764hetrfR","remove","_viewer","scene","fromRotationZ","toDegrees","getTranslation","8477rMoFIA","1486816ZBIPFQ","add","fromDegrees","root","eastNorthUpToFixedFrame","multiplyByMatrix3","170949YhiRcu","primitives","370WMEAlE","1110DIvetk","transferTileSet","1236BkNHTS","multiply","fromCartesian","1470CLbRga","toRadians","the layer type is not '3DTILES'","globe","requestRender","azimuth","transform"];return(S=function(){return t})()}const L=M;function M(t,e){const s=S();return(M=function(t,e){return s[t-=334]})(t,e)}!function(){const t=M,e=S();for(;;)try{if(243542===-parseInt(t(342))/1*(-parseInt(t(344))/2)+parseInt(t(358))/3+parseInt(t(363))/4*(parseInt(t(361))/5)+parseInt(t(366))/6*(parseInt(t(351))/7)+-parseInt(t(352))/8+-parseInt(t(338))/9*(parseInt(t(360))/10)+-parseInt(t(339))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class b{constructor(t){this[M(346)]=t}async[L(335)](e){const s=L;e=t(e,{});if("3DTILES"!==t(e[s(340)],void 0))throw new Error(s(368));const n=e.url;if(!n)throw new Error(s(336));const r={longitude:t(e.longitude,0),latitude:t(e[s(343)],0),altitude:t(e[s(337)],0),azimuth:t(e[s(371)],0)},o=await i.fromUrl(n,{dynamicScreenSpaceError:!0,dynamicScreenSpaceErrorDensity:.00278,dynamicScreenSpaceErrorFactor:4,dynamicScreenSpaceErrorHeightFalloff:.25});return this.transferTileSet(o,r),this._viewer.scene[s(359)][s(353)](o),this[s(346)].scene[s(370)](),o}[L(362)](t,e){const s=L,{longitude:n,latitude:r,altitude:i,azimuth:l}=e;let f=new o;if(n&&r){let t=i;0==i&&(t=this[s(346)][s(347)][s(369)].getHeight(a.fromDegrees(n,r))||0);const e=c[s(354)](n,r,t),d=h[s(356)](e),y=new p(1,0,0,0,1,0,0,0,1),w=p[s(348)](u[s(367)](l));p[s(364)](y,w,y),f=o[s(357)](d,y,new o)}else if(i){const e=new c;o[s(350)](t[s(355)][s(372)],e);const n=a[s(365)](e);if(n){const t=u[s(349)](n[s(343)]),e=u.toDegrees(n.longitude),r=c[s(354)](e,t,i),a=h[s(356)](r),d=new p(1,0,0,0,1,0,0,0,1),y=p[s(348)](u[s(367)](l));p.multiply(d,y,d),f=o[s(357)](a,d,new o)}}else if(l){const e=new p(1,0,0,0,1,0,0,0,1),n=p[s(348)](u[s(367)](l));p[s(364)](e,n,e),f=o.multiplyByMatrix3(t[s(355)][s(372)],e,new o)}else f=t.root.transform;t.root.transform=f}[L(345)](t){const e=L;t instanceof i&&(this._viewer[e(347)][e(359)][e(345)](t),this._viewer.scene[e(370)]())}locate(t,e){const s=L;e instanceof i&&this[s(346)][s(341)](e)}[L(334)](t,e){const s=L;t instanceof i&&(t.show=e,this[s(346)][s(347)][s(370)]())}}function D(){const t=["33828960TZsYNi","249304rPeoFh","alpha","locate","348620IrLjED","the layer type is not 'ARCGIS'","readyEvent","fromProviderAsync","remove","288OEmHpV","type","55pDZgvA","897688rlNnqC","isArray","imageryLayers","load","rectangle","addEventListener","requestRender","176262ZpJJyb","fromUrl","8604477UQOXRK","38zxkABD","scene","4866900VykedM","fromDegrees","camera","then","GET","flyTo","show","the url is needed","extent","_viewer"];return(D=function(){return t})()}const A=z;!function(){const t=z,e=D();for(;;)try{if(632968===parseInt(t(195))/1+-parseInt(t(205))/2*(-parseInt(t(202))/3)+parseInt(t(187))/4*(parseInt(t(194))/5)+parseInt(t(207))/6+parseInt(t(204))/7+parseInt(t(184))/8*(-parseInt(t(192))/9)+-parseInt(t(183))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class C{constructor(t){this[z(182)]=t}async[A(198)](e){const s=A;e=t(e,{});if("ARCGIS"!==t(e[s(193)],void 0))throw new Error(s(188));const{url:n,alpha:i,token:o}=e;if(!n)throw new Error(s(180));let a=n;a=o?n+"/info/iteminfo?f=pjson&token="+o:n+"/info/iteminfo?f=pjson";const c=await fetch(a,{method:s(177)})[s(210)]((t=>t.json()))[s(210)]((t=>{const e=s,n={};return o&&(n.token=o),t&&t[e(181)]&&Array[e(196)](t[e(181)])&&(n[e(199)]=r[e(208)](t[e(181)][0][0],t[e(181)][0][1],t[e(181)][1][0],t[e(181)][1][1])),n})),h=l[s(203)](n,c),p=f[s(190)](h,{});return i&&(p[s(185)]=i),this[s(182)][s(197)].add(p),this[s(182)][s(206)][s(201)](),p}async[A(191)](t){const e=A;t instanceof f&&(this._viewer.imageryLayers[e(191)](t,!0),this[e(182)][e(206)][e(201)]())}[A(186)](t,e){const s=A;if(e instanceof f)if(e.ready){const t=e.getImageryRectangle();this[s(182)][s(206)][s(209)][s(178)]({destination:t})}else e[s(189)][s(200)]((t=>{const n=s,r=e.getImageryRectangle();this[n(182)][n(206)][n(209)][n(178)]({destination:r})}))}[A(179)](t,e){const s=A;t instanceof f&&(t.show=e,this[s(182)][s(206)][s(201)]())}}function z(t,e){const s=D();return(z=function(t,e){return s[t-=177]})(t,e)}const j=G;function k(){const t=["scene","_viewer","east","WGS84","camera","bounds","13207851VgTvbc","230766FzUYPt","10AdPYBE","minzoom","the url is needed","remove","6jHUUeW","tilingScheme","maximumLevel","5784vIEZCF","addEventListener","minimumLevel","imageryLayers","getImageryRectangle","readyEvent","alpha","the layer type is not 'URLTemplate'","2162332pspepF","north","tileWidth","fromDegrees","URLTemplate","3759640zDltTt","2773300pnkwjO","3034506UmUZLk","rectangle","10WqigVi","west","type","then","locate","tilesize","proj","{z}/{x}/{y}.png","136961KBOlFv","show","maxzoom","flyTo","tileHeight","7jeVrWD","ready","requestRender"];return(k=function(){return t})()}function G(t,e){const s=k();return(G=function(t,e){return s[t-=122]})(t,e)}!function(){const t=G,e=k();for(;;)try{if(768481===parseInt(t(146))/1*(-parseInt(t(123))/2)+-parseInt(t(151))/3*(parseInt(t(162))/4)+-parseInt(t(168))/5+-parseInt(t(169))/6+-parseInt(t(136))/7*(parseInt(t(167))/8)+-parseInt(t(145))/9*(parseInt(t(147))/10)+-parseInt(t(131))/11*(-parseInt(t(154))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class O{constructor(t){this[G(140)]=t}async load(e){const s=G;e=t(e,{});if(t(e[s(125)],void 0)!==s(166))throw new Error(s(161));const{url:n,alpha:i}=e;if(!n)throw new Error(s(149));let o=s(130),a=n.substr(0,n.indexOf(o))+"meta.json";const c=await fetch(a,{method:"GET"})[s(126)]((t=>t.json()))[s(126)]((t=>{const e=s,i={url:n};return t&&t[e(144)]&&(i[e(122)]=r[e(165)](t[e(144)][e(124)],t[e(144)].south,t[e(144)][e(141)],t.bounds[e(163)])),t&&4326==t[e(129)]&&(i[e(152)]=new d({ellipsoid:y[e(142)]})),t&&t[e(133)]&&(i[e(153)]=t[e(133)]),t&&t[e(148)]&&(i[e(156)]=t[e(148)]),t&&t[e(128)]&&(i[e(164)]=i[e(135)]=t[e(128)]),i})),h=new w(c),p=new f(h,{});return i&&(p[s(160)]=i),this._viewer[s(157)].add(p),this[s(140)][s(139)].requestRender(),p}async remove(t){const e=G;t instanceof f&&(this[e(140)].imageryLayers[e(150)](t,!0),this[e(140)][e(139)][e(138)]())}[j(127)](t,e){const s=j;if(e instanceof f)if(e[s(137)]){const t=e.getImageryRectangle();this[s(140)][s(139)][s(143)][s(134)]({destination:t})}else e[s(159)][s(155)]((t=>{const n=s,r=e[n(158)]();this[n(140)][n(139)][n(143)][n(134)]({destination:r})}))}[j(132)](t,e){const s=j;t instanceof f&&(t[s(132)]=e,this[s(140)][s(139)][s(138)]())}}function Z(t,e){const s=W();return(Z=function(t,e){return s[t-=469]})(t,e)}const x=Z;function W(){const t=["692868jMmhZV","type","287612gnHYuO","165760eGZurA","3216168jiWLxF","flyTo","706657dzjcvk","requestRender","_viewer","scene","the layer type is not 'GEOJSON'","show","8KOxSYF","998895WVZizb","primitives","locate","load","primitiveCollection","3ZqCbIA","778380zUnScy"];return(W=function(){return t})()}!function(){const t=Z,e=W();for(;;)try{if(190101===-parseInt(t(475))/1+-parseInt(t(474))/2+-parseInt(t(470))/3*(-parseInt(t(472))/4)+parseInt(t(485))/5+-parseInt(t(471))/6+-parseInt(t(478))/7*(parseInt(t(484))/8)+parseInt(t(476))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class N{constructor(t){this[Z(480)]=t}async load(e){const s=Z;e=t(e,{});if("GEOJSON"!==t(e[s(473)],void 0))throw new Error(s(482));const{url:n,clampToGround:r}=e;if(!n)throw new Error("the url is needed");const i=new g({options:{useGroundGeometry:r??!1,clampToGround:r??!1,scene:this[s(480)][s(481)]}});return await i[s(488)](n),this[s(480)][s(481)].primitives.add(i[s(469)]),this[s(480)][s(481)][s(479)](),i}async remove(t){const e=Z;t instanceof g&&(this._viewer[e(481)][e(486)].remove(t[e(469)]),this[e(480)][e(481)][e(479)]())}[x(487)](t,e){const s=x;e instanceof g&&e[s(477)](this[s(480)],{tolerance:.015})}[x(483)](t,e){const s=x;t instanceof g&&(t.primitiveCollection.show=e,this[s(480)][s(481)][s(479)]())}}const q=F;function P(){const t=["locate","remove","ready","621860MnDSqe","354459tMzWIw","1564GLubhT","975246peFdCH","camera","the layers is needed","getImageryRectangle","addEventListener","81462bMJshQ","10HaLNas","requestRender","imageryLayers","3108opESuj","23736jLZlwF","933008wTyZKO","scene","add","81PTDWVw","readyEvent","show","flyTo","load","_viewer"];return(P=function(){return t})()}function F(t,e){const s=P();return(F=function(t,e){return s[t-=172]})(t,e)}!function(){const t=F,e=P();for(;;)try{if(258974===-parseInt(t(191))/1+-parseInt(t(181))/2+parseInt(t(190))/3*(parseInt(t(180))/4)+-parseInt(t(187))/5*(parseInt(t(186))/6)+-parseInt(t(179))/7+-parseInt(t(192))/8+parseInt(t(195))/9*(parseInt(t(178))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class U{constructor(t){this[F(174)]=t}async[q(173)](e){const s=q;e=t(e,{});if("WMS"!==t(e.type,void 0))throw new Error("the layer type is not 'WMS'");const{url:n,layers:r}=e;if(!n)throw new Error("the url is needed");if(!r)throw new Error(s(183));const i=new I({url:n}),o=new f(i,{});return this._viewer[s(189)][s(194)](o),this._viewer[s(193)][s(188)](),o}async[q(176)](t){const e=q;t instanceof f&&(this._viewer[e(189)][e(176)](t,!0),this[e(174)][e(193)][e(188)]())}[q(175)](t,e){const s=q;if(e instanceof f)if(e[s(177)]){const t=e.getImageryRectangle();this[s(174)][s(193)][s(182)].flyTo({destination:t})}else e[s(196)][s(185)]((t=>{const n=s,r=e[n(184)]();this._viewer[n(193)][n(182)][n(172)]({destination:r})}))}[q(197)](t,e){const s=q;t instanceof f&&(t[s(197)]=e,this[s(174)][s(193)][s(188)]())}}const B=J;function J(t,e){const s=V();return(J=function(t,e){return s[t-=266]})(t,e)}!function(){const t=J,e=V();for(;;)try{if(508806===-parseInt(t(273))/1*(parseInt(t(270))/2)+parseInt(t(277))/3+parseInt(t(281))/4+parseInt(t(268))/5*(-parseInt(t(290))/6)+parseInt(t(280))/7*(parseInt(t(266))/8)+-parseInt(t(291))/9+-parseInt(t(272))/10*(parseInt(t(285))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class K{constructor(t){this[J(278)]=t}async[B(288)](e){const s=B;e=t(e,{});if(t(e.type,void 0)!==s(275))throw new Error(s(267));const{url:n,layer:r,style:i,tileMatrixSetID:o,subdomains:a,format:c,tilingScheme:h,tileMatrixLabels:p}=e;if(!n)throw new Error("the url is needed");if(!r)throw new Error(s(286));if(!i)throw new Error("the style is needed");if(!o)throw new Error("the tileMatrixSetID is needed");const u={url:n,layer:r,style:i,tileMatrixSetID:o};a&&(u[s(293)]=a),c&&(u[s(292)]=c),h&&(u[s(269)]=h),p&&(u.tileMatrixLabels=p);const l=new m(u),d=new f(l,{});return this[s(278)].imageryLayers[s(294)](d),this[s(278)][s(276)].requestRender(),d}async[B(282)](t){const e=B;t instanceof f&&(this[e(278)].imageryLayers[e(282)](t,!0),this[e(278)][e(276)].requestRender())}[B(271)](t,e){const s=B;if(e instanceof f)if(e.ready){const t=e.getImageryRectangle();this[s(278)][s(276)][s(279)][s(287)]({destination:t})}else e[s(289)].addEventListener((t=>{const n=s,r=e[n(274)]();this[n(278)].scene[n(279)][n(287)]({destination:r})}))}[B(284)](t,e){const s=B;t instanceof f&&(t[s(284)]=e,this[s(278)][s(276)][s(283)]())}}function V(){const t=["show","11rshziB","the layer is needed","flyTo","load","readyEvent","648STxKxu","514269DMLSvg","format","subdomains","add","1811720JWmRdm","the layer type is not 'WMTS'","13215gzhuho","tilingScheme","70388fzuMoo","locate","1499240PGIhRQ","22UzoRTY","getImageryRectangle","WMTS","scene","675390pyVDvD","_viewer","camera","21JGVuDg","3484232yAOXhM","remove","requestRender"];return(V=function(){return t})()}const Q=H;function H(t,e){const s=X();return(H=function(t,e){return s[t-=396]})(t,e)}!function(){const t=H,e=X();for(;;)try{if(947449===parseInt(t(418))/1+-parseInt(t(399))/2*(-parseInt(t(404))/3)+parseInt(t(416))/4+-parseInt(t(407))/5*(parseInt(t(413))/6)+-parseInt(t(421))/7+parseInt(t(420))/8*(-parseInt(t(406))/9)+-parseInt(t(397))/10*(parseInt(t(417))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class Y{constructor(t){this[H(398)]=t}async[Q(400)](e){const s=Q;e=t(e,{});const n=t(e[s(419)],void 0);if(n!==s(414)&&"KMZ"!==n)throw new Error(s(411));const{url:r,clampToGround:i}=e;if(!r)throw new Error(s(405));return this[s(398)][s(412)][s(409)](v[s(400)](r,{camera:this._viewer[s(410)][s(401)],canvas:this._viewer.scene.canvas,clampToGround:i??!1}))}async[Q(408)](t){const e=Q;t instanceof Promise&&t[e(396)]((t=>{const s=e;this[s(398)].dataSources[s(408)](t),this[s(398)][s(410)][s(403)]()})),t instanceof v&&(this._viewer[e(412)][e(408)](t),this._viewer[e(410)][e(403)]())}locate(t,e){const s=Q;e instanceof Promise&&e.then((t=>{const e=H;this[e(398)][e(402)](t)})),e instanceof v&&this[s(398)].flyTo(e)}[Q(415)](t,e){const s=Q;t instanceof Promise&&t[s(396)]((t=>{const n=s;t[n(415)]=e,this[n(398)].scene[n(403)]()})),t instanceof v&&(t[s(415)]=e,this[s(398)].scene[s(403)]())}}function X(){const t=["remove","add","scene","the layer type is not 'KML' or 'KMZ","dataSources","6ntrcDv","KML","show","3486448TjiPlL","11BTJqgH","1610871QQgisX","type","16VhicZA","6358765mYchdf","then","9781510KXCKkQ","_viewer","2jDuNzD","load","camera","flyTo","requestRender","2855409vbDlXb","the url is needed","191313zyjfOr","2788885APMJHN"];return(X=function(){return t})()}const $=et;function tt(){const t=["_load","_typeClassMap","_locate","get","load","showById","_type","_layersMap","4kGdZtp","KML","775960fpgiZf","3055980QUlRBG","WMTS","loadAsync","457493XPtQOg","bind","3DTILES","_remove","_url","2439944cJjvFa","remove","_viewer","_id","384651PVXCzm","656274ccKCNE","destroy","104NeDzdk","3453968olQEWS","locate","the layer with id '","请输入Viewer对象!","url","set","removeById","URLTemplate","' is already loaded","_show","_isSupport","the type '","includes","TERRAIN","_initLoader","show","type","WMS","_typeClass","delete","ARCGIS","the url is needed"];return(tt=function(){return t})()}function et(t,e){const s=tt();return(et=function(t,e){return s[t-=348]})(t,e)}!function(){const t=et,e=tt();for(;;)try{if(338008===parseInt(t(377))/1+-parseInt(t(371))/2*(parseInt(t(387))/3)+parseInt(t(382))/4+parseInt(t(373))/5+-parseInt(t(374))/6+-parseInt(t(390))/7+parseInt(t(389))/8*(parseInt(t(386))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class st{constructor(t){const e=et;if(!t)throw new Error(e(393));this[e(384)]=t,this[e(370)]=new Map,this._typeClassMap=new Map}[$(355)](){const t=$,e=this._typeClassMap[t(366)](this[t(369)]);e?this._typeClass=e:(this[t(369)]===t(354)?this[t(359)]=new R(this[t(384)]):this._type===t(379)?this[t(359)]=new b(this[t(384)]):this[t(369)]===t(361)?this._typeClass=new C(this._viewer):this[t(369)]===t(348)?this[t(359)]=new O(this._viewer):this[t(369)]===t(358)?this._typeClass=new U(this[t(384)]):this[t(369)]===t(375)?this[t(359)]=new K(this[t(384)]):this[t(369)]===t(372)?this._typeClass=new Y(this[t(384)]):"GEOJSON"===this[t(369)]&&(this[t(359)]=new N(this[t(384)])),this[t(364)].set(this[t(369)],this[t(359)])),this._load=this[t(359)][t(367)][t(378)](this[t(359)]),this[t(380)]=this[t(359)][t(383)].bind(this._typeClass),this[t(365)]=this[t(359)][t(391)][t(378)](this[t(359)]),this[t(350)]=this[t(359)][t(356)].bind(this._typeClass)}async[$(376)](e){const s=$;if(e=t(e,{}),this[s(385)]=t(e.id,void 0),this[s(370)].has(this[s(385)]))throw new Error(s(392)+this[s(385)]+s(349));if(this[s(381)]=t(e[s(394)],void 0),!this._url)throw new Error(s(362));if(this[s(369)]=t(e[s(357)],void 0),!this[s(351)](e.type))throw new Error(s(352)+e[s(357)]+"' is not support");if(this._initLoader(),"KML"===e[s(357)]){const t=this._load(e);t instanceof Promise&&this[s(370)][s(395)](e.id,{options:e,layer:t})}else{const t=await this[s(363)](e);this._layersMap[s(395)](e.id,{options:e,layer:t})}}[$(351)](t){const e=$;return["TERRAIN",e(379),e(361),e(348),e(358),e(375),e(372),"GEOJSON"][e(353)](t)}[$(396)](t){const e=$,s=this._layersMap[e(366)](t);if(this[e(370)][e(360)](t),!s)return;const{options:n,layer:r}=s;r&&(this._type=n.type,this[e(355)](),this[e(380)](r))}locateById(t){const e=$,s=this._layersMap[e(366)](t);if(!s)return;const{options:n,layer:r}=s;r&&(this._type=n.type,this[e(355)](),this._locate(n,r))}[$(368)](t,e){const s=$,n=this[s(370)].get(t);if(!n)return;const{options:r,layer:i}=n;i&&(this._type=r[s(357)],this[s(355)](),this[s(350)](i,e))}[$(388)](){}}export{st 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.1.0",
|
|
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
|
}
|