@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 2 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 e}from"../../chunks/tslib.es6.js";import{clone as r}from"../../core/lang.js";import{lengthUnitsJSONMap as t,angleUnitsJSONMap as o}from"../../core/unitUtils.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../../core/accessorSupport/decorators/writer.js";import m from"../../geometry/Point.js";import{getJsonType as p}from"../../geometry/support/jsonUtils.js";import n from"./BaseImageMeasureParameters.js";import{measureOperationJSONMap as l}from"./imageMeasureUtils.js";var u;let y=u=class extends n{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,r,t){null!=e&&(r.geometryType=p(e),r[t]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new u(r({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};e([s({type:m,json:{read:!0,write:!0}})],y.prototype,"fromGeometry",void 0),e([a("fromGeometry")],y.prototype,"writeFromGeometry",null),e([s({type:m,json:{read:!0,write:!0}})],y.prototype,"toGeometry",void 0),e([s({type:l.apiValues,json:{write:l.write}})],y.prototype,"measureOperation",null),e([s({json:{read:!0}})],y.prototype,"is3D",void 0),e([s({type:String,json:{read:t.read,write:t.write}})],y.prototype,"linearUnit",void 0),e([s({type:String,json:{read:o.read,write:o.write}})],y.prototype,"angularUnit",void 0),y=u=e([i("esri.rest.support.ImageDistanceParameters")],y);export{y as default};