@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 859 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{isSome as t}from"../../../core/arrayUtils.js";import{convertToSpatialReferenceUnit as r}from"../../../core/unitUtils.js";import{execute as e,executeManyEx as o}from"../gx/operatorBuffer.js";import{getSpatialReference as n,fromGeometry as i,toGeometry as s,fromGeometries as m}from"../support/jsonConverter.js";function a(t,o,m={}){const{unit:a}=m,c=n(t);a&&c&&(o=r(o,a,c));const u=i(t),p=u.getSpatialReference();return s(e(u.getGeometry(),p,o),p)}function c(e,i,a={}){let{maxDeviation:c=NaN,maxVerticesInFullCircle:u=96,union:p=!1,unit:f}=a;const l=n(e);f&&l&&(i=i.map((t=>r(t,f,l))),c&&(c=r(c,f,l)));const[j,x]=m(e);return o(j,x,i,c,u,p).map((t=>s(t,x))).filter(t)}export{a as execute,c as executeMany};