@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.63 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{load as e,isLoaded as t,supportsCurves as r,execute as o,executeMany as a}from"./gx/operatorProject.js";let n,s,c,i,m,f,p,u,h,l,x,j;function T(){return!!s&&t()}async function d(){if(!T()){const[t,o,a,T]=await Promise.all([import("./support/apiConverter.js"),import("../../chunks/ProjectionTransformation.js").then((e=>e.aI)).then((({CompositeGeographicTransformationEditor:e})=>e)),import("../../chunks/ProjectionTransformation.js").then((e=>e.aJ)).then((({create:e,createFromWKT:t})=>({create:e,createFromWKT:t}))),import("../../chunks/ProjectionTransformation.js").then((e=>e.aK)).then((({create:e,createEx:t,createFromAoi:r})=>({create:e,createEx:t,createFromAoi:r}))),e()]);n=t.fromExtent,s=t.fromGeometry,c=t.fromSpatialReference,i=t.getSpatialReference,m=t.toGeometry,f=o,p=a.create,u=a.createFromWKT,h=T.createEx,l=T.createFromAoi,x=T.create,j=r()}}function E(e,t,r={}){const a=k(i(e),t,r);return m(o(s(e),a),t)}function g(e,t,r={}){const o=e.map(s),n=k(i(e),t,r);return a(o,n).map((e=>m(e,t)))}function k(e,t,r={}){let o;const a=c(e),s=c(t);if(r?.geographicTransformation){const e=new f;e.setInputSpatialReference(a),e.setOutputSpatialReference(s);for(const t of r.geographicTransformation.steps){let r;r=t.wkid?p(t.wkid,t.isInverse):u(t.wkt,t.isInverse),e.add(r)}o=e.create()}else if(r?.areaOfInterestExtent)return l(a,s,n(r.areaOfInterestExtent).asEnvelope2D());return o?h(a,s,o):x(a,s)}export{E as execute,g as executeMany,T as isLoaded,d as load,j as supportsCurves};