Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
5.4 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
define("exports ../../core/byteSizeEstimations ../../core/has ../../core/typedArrayUtil ../../core/uid ../../geometry/SpatialReference ../../geometry/support/aaBoundingBox ../../geometry/support/aaBoundingRect ../../geometry/support/quantizationUtils ../../geometry/support/typeUtils ../support/Field ./dehydratedFeatureComparison".split(" "),function(e,w,J,x,y,z,k,l,m,A,B,C){function D(a,b,c,h){return{uid:y.generateUID(),objectId:h&&a.attributes?a.attributes[h]:null,attributes:a.attributes,geometry:q(a.geometry,
b,c),visible:!0}}function q(a,b,c){if(null==a)return null;switch(b){case "point":return{x:a.x,y:a.y,z:a.z,m:a.m,hasZ:null!=a.z,hasM:null!=a.m,type:"point",spatialReference:c};case "polyline":return{paths:a.paths,hasZ:!!a.hasZ,hasM:!!a.hasM,type:"polyline",spatialReference:c};case "polygon":return{rings:a.rings,hasZ:!!a.hasZ,hasM:!!a.hasM,type:"polygon",spatialReference:c};case "multipoint":return{points:a.points,hasZ:!!a.hasZ,hasM:!!a.hasM,type:"multipoint",spatialReference:c}}}function r(a){if(null==
a)return 0;let b=32;switch(a.type){case "point":b+=42;break;case "polyline":case "polygon":var c=0;const h=2+(a.hasZ?1:0)+(a.hasM?1:0);a="polyline"===a.type?a.paths:a.rings;for(const f of a)c+=f.length;b+=8*c*h+64;b+=128*c;b=b+34+32*(a.length+1);break;case "multipoint":c=a.points.length;b+=8*c*(2+(a.hasZ?1:0)+(a.hasM?1:0))+64;b+=128*c;b=b+34+32;break;case "extent":b+=98;a.hasM&&(b+=32);a.hasZ&&(b+=32);break;case "mesh":b+=x.estimateSize(a.vertexAttributes.position,a.vertexAttributes.normal,a.vertexAttributes.uv,
a.vertexAttributes.tangent)}return b}function t(a,b){return null!=a.objectId?a.objectId:a.attributes&&b?a.attributes[b]:null}function u(a,b,c,h){if(b?.size&&null!=c&&a)for(const f in a){if(!b.has(f))continue;const n=a[f];"string"===typeof n&&n.length>c&&(h(f),a[f]="")}}class E{constructor(a,b,c){this.uid=a;this.geometry=b;this.attributes=c;this.visible=!0;this.centroid=this.objectId=null}}class F{constructor(){this.exceededTransferLimit=!1;this.features=[];this.fields=[];this.hasZ=this.hasM=!1;this.transform=
this.spatialReference=this.geohashFieldName=this.geometryProperties=this.globalIdFieldName=this.objectIdFieldName=this.geometryType=null}}e.equals=C.equals;e.DehydratedFeatureClass=E;e.DehydratedFeatureSetClass=F;e.computeAABB=function(a,b){k.empty(b);"mesh"===a.type&&(a=a.extent);switch(a.type){case "point":b[0]=b[3]=a.x;b[1]=b[4]=a.y;a.hasZ&&(b[2]=b[5]=a.z);break;case "polyline":for(var c=0;c<a.paths.length;c++)k.expandWithNestedArray(b,a.paths[c],!!a.hasZ);break;case "polygon":for(c=0;c<a.rings.length;c++)k.expandWithNestedArray(b,
a.rings[c],!!a.hasZ);break;case "multipoint":k.expandWithNestedArray(b,a.points,!!a.hasZ);break;case "extent":b[0]=a.xmin,b[1]=a.ymin,b[3]=a.xmax,b[4]=a.ymax,null!=a.zmin&&(b[2]=a.zmin),null!=a.zmax&&(b[5]=a.zmax)}};e.computeAABR=function(a,b){l.empty(b);"mesh"===a.type&&(a=a.extent);switch(a.type){case "point":b[0]=b[2]=a.x;b[1]=b[3]=a.y;break;case "polyline":for(var c=0;c<a.paths.length;c++)l.expandWithNestedArray(b,a.paths[c]);break;case "polygon":for(c=0;c<a.rings.length;c++)l.expandWithNestedArray(b,
a.rings[c]);break;case "multipoint":l.expandWithNestedArray(b,a.points);break;case "extent":b[0]=a.xmin,b[1]=a.ymin,b[2]=a.xmax,b[3]=a.ymax}};e.estimateGeometryObjectSize=r;e.estimateSize=function(a){let b;b=32+w.estimateAttributesObjectSize(a.attributes);return b=b+3+(8+r(a.geometry))};e.fromFeatureSetJSON=function(a,b){const c=A.featureGeometryTypeKebabDictionary.fromJSON(a.geometryType),h=z.fromJSON(a.spatialReference),f=a.transform,n=a.objectIdFieldName,G=b?.maxStringAttributeLength,H=b?.maxStringAttributeFields;
let p;b=a.features.map(d=>{const g=D(d,c,h,a.objectIdFieldName);d=g.geometry;u(g.attributes,H,G,I=>{p??=[];const v=t(g,n);null!=v&&p.push({objectId:v,attribute:I})});if(null!=d&&f)switch(d.type){case "point":g.geometry=m.unquantizePoint(f,d,d);break;case "multipoint":g.geometry=m.unquantizeMultipoint(f,d,d);break;case "polygon":g.geometry=m.unquantizePolygon(f,d,d);break;case "polyline":g.geometry=m.unquantizePolyline(f,d,d);break;case "extent":g.geometry=d;break;case "mesh":g.geometry=d}return g});
return{geometryType:c,features:b,spatialReference:h,fields:a.fields?.map(d=>B.fromJSON(d))??[],objectIdFieldName:a.objectIdFieldName,globalIdFieldName:a.globalIdFieldName,geohashFieldName:a.geohashFieldName,geometryProperties:a.geometryProperties,hasZ:a.hasZ,hasM:a.hasM,exceededTransferLimit:a.exceededTransferLimit,transform:null,missingAttributes:p}};e.fromJSONGeometry=q;e.getObjectId=t;e.hasGeometry=function(a){return null!=a.geometry};e.hasVertices=function(a){if(null==a)return!1;switch(a.type){case "extent":case "point":return!0;
case "polyline":for(const b of a.paths)if(0<b.length)return!0;return!1;case "polygon":for(const b of a.rings)if(0<b.length)return!0;return!1;case "multipoint":return 0<a.points.length;case "mesh":return!a.loaded||0<a.vertexAttributes.position.length}};e.numVertices=function(a){if(null==a)return 0;switch(a.type){case "point":return 1;case "polyline":var b=0;for(var c of a.paths)b+=c.length;return b;case "polygon":c=0;for(b of a.rings)c+=b.length;return c;case "multipoint":return a.points.length;case "extent":return 2;
case "mesh":return(a=a.vertexAttributes&&a.vertexAttributes.position)?a.length/3:0}};e.removeLargeStringAttributes=u;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});