UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

3 lines (2 loc) 769 B
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ import{convertToSpatialReferenceUnit as r}from"../../core/units.js";import{execute as t,supportsCurves as o,executeMany as e}from"./gx/operatorOffset.js";import{getSpatialReference as n,toGeometry as s,fromSpatialReference as i,fromGeometry as u}from"./support/apiConverter.js";const m={round:0,bevel:1,miter:2,square:3};function p(o,e,p={}){const{miterLimit:a=10,flattenError:c=0,joins:f="round",unit:j}=p,x=n(o);return j&&(e=r(e,j,x)),s(t(u(o),i(x),e,m[f],a,c),x)}function a(t,o,p={}){const{miterLimit:a=10,flattenError:c=0,joins:f="round",unit:j}=p,x=n(t);j&&(o=r(o,j,x));const d=t.map(u);return e(d,i(x),o,m[f],a,c).map(r=>s(r,x))}const c=o();export{p as execute,a as executeMany,c as supportsCurves};