@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 839 B
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import e from"../../../../geometry/SpatialReference.js";import{fromJSON as t}from"../../../../geometry/support/jsonUtils.js";import r from"../../../../rest/support/FeatureSet.js";import{createMesh as o}from"./meshUtils.js";function n(n,s){const a=new Array,f=e.fromJSON(s.spatialReference);for(const e of s.features){const r=e.metadata,s=t(e.geometry);if(!r||!s){a.push(null);continue}s.spatialReference=f;const m=s.extent,i=o({layerView:n,nodeIndex:r.meta.node.index,featureIndex:r.index,extent:m,spatialReference:f});a.push(i),e.geometry=null}const m=r.fromJSON(s);for(let e=0;e<m.features.length;e++){const t=m.features[e],r=a[e];t.geometry=r}return m}export{n as processQueryGeometries};