qa-regulatory-gwj-vue/static/map/cesium91/CesiumUnminified/Workers/ParseBinaryData.js

2 lines
798 B
JavaScript
Raw Normal View History

2023-11-07 10:04:37 +08:00
define(["./Buffer","./VarintReader","./base64","./ieee754","./isArray","./snappyJs","./CodeTool","./LayerContentModel","./GisTools"],(function(e,t,n,r,o,s,i,l,a){"use strict";return function(n,r,o){let s=function(t){for(var n=new e(t.byteLength),r=new Uint8Array(t),o=0;o<n.length;++o)n[o]=r[o];return n}(n),i=new t(s,4,r),l=i.getAllLayerNames(),a={};for(let e=0;e<l.length;e++){let t=l[e];a[t]={features:[],fieldsConfig:o[t]?o[t].fieldsConfig:{},type:1};let n=i.getGeometryType(t),r=i.getLayerPro(t);if("point"==n.toLowerCase()?a[t].type=1:"line"!=n.toLowerCase()&&"linestring"!=n.toLowerCase()&&"multilinestring"!=n.toLowerCase()||(a[t].type=2),r&&r.length>0)for(let e=0;e<r.length;e++){let o=[];o.push(n),o.push(r[e]),o.push(i.getCoordinatesByIndex(t,e,10)),a[t].features.push(o)}}return a}}));