UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 2.01 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/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 n}from"../../geometry/support/jsonUtils.js";import p from"./BaseImageMeasureParameters.js";import{measureOperationJSONMap as l}from"./imageMeasureUtils.js";var c;let u=c=class extends p{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=n(e),r[t]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new c(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}})],u.prototype,"fromGeometry",void 0),e([a("fromGeometry")],u.prototype,"writeFromGeometry",null),e([s({type:m,json:{read:!0,write:!0}})],u.prototype,"toGeometry",void 0),e([s({type:l.apiValues,json:{write:l.write}})],u.prototype,"measureOperation",null),e([s({json:{read:!0}})],u.prototype,"is3D",void 0),e([s({type:String,json:{read:t.read,write:t.write}})],u.prototype,"linearUnit",void 0),e([s({type:String,json:{read:o.read,write:o.write}})],u.prototype,"angularUnit",void 0),u=c=e([i("esri.rest.support.ImageDistanceParameters")],u);const y=u;export{y as default};