qa-prevention-gwj-vue/static/map/cesium91/CesiumUnminified/Workers/EnvelopeBinaryWorker.js

2 lines
4.0 KiB
JavaScript
Raw Normal View History

2023-12-17 15:30:40 +08:00
define(["./createTaskProcessorWorker","./Resource-8ae1a924","./Cartesian3-e0307675","./HouseDrawer","./ParseBinaryData","./GetPrimitiveData","./when-422ea0ae","./Cache","./PolygonBuffer","./defaultValue-81eec7ed","./Check-741c5f3c","./combine-3c023bda","./Math-e73894ab","./RuntimeError-26acdd3b","./Buffer","./base64","./ieee754","./isArray","./VarintReader","./snappyJs","./CodeTool","./LayerContentModel","./GisTools","./Color-82ef4a75","./Transforms-5b829630","./Cartesian2-bd414876","./Matrix4-4c545f70","./ComponentDatatype-aaeec80f","./WebGLConstants-508b9636","./GeometryInstance-1b39c9e8","./PolygonGeometry-95e6b579","./ArcType-fc72c06c","./GeometryOffsetAttribute-ed56ff58","./BoundingRectangle-0e36efc3","./GeographicProjection-c931c7fb","./BoundingSphere-9a3b5656","./Rectangle-cf3e0e3e","./EllipsoidGeodesic-e7a5ca44","./EllipsoidTangentPlane-4d138901","./AxisAlignedBoundingBox-8774439c","./IntersectionTests-80510c7b","./Plane-bc8b6777","./GeometryAttribute-2b42a913","./Matrix2-dc0c61cc","./GeometryPipeline-e7083fea","./AttributeCompression-8f752c03","./EncodedCartesian3-aafcc30f","./IndexDatatype-3f3c99e8","./PolygonGeometryLibrary-231711c2","./arrayRemoveDuplicates-cea3b206","./EllipsoidRhumbLine-592e8885","./GeometryAttributes-32b29525","./PolygonPipeline-04baeb41","./VertexFormat-d50a69ba","./PolygonOutlineGeometry-29f6cf19","./PixelFormat-bd725b72","./PrimitivePipeline-d5bc2e2a","./WebMercatorProjection-44373a3d","./GetRidingLanternGeometry","./LinkedQueue","./turf.min"],(function(e,t,r,n,o,i,l,a,c,f,s,u,h,d,y,g,b,p,m,P,v,G,w,A,C,D,x,B,R,F,L,M,T,I,S,E,V,k,O,j,q,W,H,N,z,J,Q,K,U,X,Y,Z,$,_,ee,te,re,ne,oe,ie,le){"use strict";let ae,ce=512,fe={},se={},ue={};function he(e,t){if("F"!=e[0])if(Array.isArray(e[0])){let r=e.length;for(let n=0;n<r;n++){he(e[n],t)}}else t&&function(e){let t=[e[0],e[1]];for(let r=2;r<e.length;r++){let n=t[0]+e[r],o=t[1]+e[r+1];e[r]=n,e[r+1]=o,t=[n,o],r++}}(e);else e[0]=[.05*-ce,.05*-ce,1.05*ce,.05*-ce,1.05*ce,1.05*ce,.05*-ce,1.05*ce]}function de(e,t){if(Array.isArray(t[0])){let r=t.length;for(let n=0;n<r;n++){de(e,t[n])}}else e.push(t)}function ye(e,t){let r=t.rectangle;for(var n=[],o=0;o<e.length;o++){var i=ge(e[o],e[o+1],r);n.push(i[0]),n.push(i[1]),o++}return n}function ge(e,t,r){var n=be(r.west+r.width/ce*e),o=be(r.north-r.height/ce*t);return[n=Number(n.toFixed(6)),o=Number(o.toFixed(6))]}function be(e){return 180*e/Math.PI}return new a(1e5),e((function(e,a){if(1==e.init)return function(e){let t=l.when.defer();return ae=new Function("render","level",e.styleStr),ce=e.tileSize,fe=e,se=e.serverInfo,ue=e.layerFieldMap,t.resolve({}),t.promise}(e);var f=e.url,s=new t.Resource({url:f});s.request.throttle=!1,s.request.throttleByServer=!0,s.request.type=1;var u=s.fetchArrayBuffer();if(!u)return!0;let h=[];h.push(u);let d=l.when.defer();return l.when.all(h,(function(t){let l=t[0];if(!l)return void d.resolve({});let f=function(e,t){if(e){!function(e,t){for(let r in e){let n=e[r].features;n||(n=e[r].datas);for(let e=0;e<n.length;e++)he(n[e][2],t)}}(e,t.needDecode);let r={},o=new n([e],t.level,r,t.controlVector,t.highLightVector,t.filterLayerId);return ae.call({},o,t.level),function(e){for(let t in e){let r=e[t];for(let e=0;e<r.length;e++){let t=r[e],n=[];de(n,t.data),delete t.data,t.geometrys=n;let o=0;if(fe.hasOwnProperty("heightProperty")){let e=fe.heightProperty;o=t.properties[e],fe.hasOwnProperty("heightScale")&&(o*=parseFloat(fe.heightScale))}t.height=o,t.totalHeight=o}}}(r),r}return{}}(o(l,ue,se),e);!function(e,t){for(let r in e){let n=e[r];for(let e=0;e<n.length;e++){let r=n[e],o=[];for(let e=0;e<r.geometrys.length;e++){let n=ye(r.geometrys[e],t);o.push(n)}r.geometrys=o}}}(f,e),0!=e.bufferDistance&&c.buffer(f,.001*e.bufferDistance),function(e){for(let t in e){e[t].map((e=>{let t=[];for(let n=0;n<e.geometrys.length;n++){let o=e.geometrys[n],i=[];for(let e=0;e<o.length;e++){let t=o[e],n=o[e+1],l=r.Cartesian3.fromDegrees(t,n);i.push(l),e++}t.push(i)}e.polygons=t,delete e.geometrys}))}}(f);let s=i(f,e.level,fe,a);d.resolve(s)}),(function(e){d.reject(e)})),d.promise}))}));