@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.5 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{_ as r}from"../../chunks/tslib.es6.js";import o from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import s from"../../geometry/SpatialReference.js";import{getJsonType as i}from"../../geometry/support/jsonUtils.js";import{srToRESTValue as a}from"../../geometry/support/spatialReferenceUtils.js";let p=class extends o{constructor(r){super(r),this.geometries=[],this.outSpatialReference=null,this.transformation=null,this.transformForward=null}toJSON(){const r=this.geometries.map((r=>r.toJSON())),o=this.geometries[0],t={};return t.outSR=a(this.outSpatialReference),t.inSR=a(o.spatialReference),t.geometries=JSON.stringify({geometryType:i(o),geometries:r}),this.transformation&&(t.transformation=this.transformation.wkid||JSON.stringify(this.transformation)),null!=this.transformForward&&(t.transformForward=this.transformForward),t}};r([t()],p.prototype,"geometries",void 0),r([t({type:s,json:{read:{source:"outSR"}}})],p.prototype,"outSpatialReference",void 0),r([t()],p.prototype,"transformation",void 0),r([t()],p.prototype,"transformForward",void 0),p=r([e("esri.rest.support.ProjectParameters")],p);export{p as default};