@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 745 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 t from"../../request.js";import{parseUrl as e,encode as o,asValidOptions as s}from"../utils.js";import r from"./support/AssociationGeometriesResult.js";async function n(r,n,a){const c=e(r),f={...n.toJSON(),f:"json"},m=o({...c.query,...f});a?a.method="post":a={method:"post"};const p=s(m,a),u=`${c.path}/synthesizeAssociationGeometries`;return t(u,p).then((t=>i(t,n.outSpatialReference)))}function i(t,e){const{data:o}=t;if(e)for(const s of o.associations)s.geometry.spatialReference||(s.geometry.spatialReference=e.clone());return r.fromJSON(o)}export{n as synthesizeAssociationGeometries};