@doegis/core
Version:
DOE GIS API
3 lines (1 loc) • 1.34 kB
JavaScript
import{_ as r}from"../../chunks/tslib.es6.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{getJsonType as s}from"../../geometry/support/jsonUtils.js";let i=class extends t{constructor(r){super(r),this.geometries=[],this.outSpatialReference=null,this.transformation=null,this.transformForward=null}toJSON(){const r=this.geometries.map((r=>r.toJSON())),t=this.geometries[0],o={};return o.outSR=this.outSpatialReference.wkid||JSON.stringify(this.outSpatialReference.toJSON()),o.inSR=t.spatialReference.wkid||JSON.stringify(t.spatialReference.toJSON()),o.geometries=JSON.stringify({geometryType:s(t),geometries:r}),this.transformation&&(o.transformation=this.transformation.wkid||JSON.stringify(this.transformation)),null!=this.transformForward&&(o.transformForward=this.transformForward),o}};r([o()],i.prototype,"geometries",void 0),r([o({json:{read:{source:"outSR"}}})],i.prototype,"outSpatialReference",void 0),r([o()],i.prototype,"transformation",void 0),r([o()],i.prototype,"transformForward",void 0),i=r([e("esri.rest.support.ProjectParameters")],i);const a=i;export{a as default};