@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.96 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import{__decorate as e}from"tslib";import{featureReferenceEquals as r,featureReferenceProperty as i}from"./featureReferenceUtils.js";import{Clonable as t}from"../core/Clonable.js";import{cyclicalDegrees as o}from"../core/Cyclical.js";import{JSONSupportMixin as s}from"../core/JSONSupport.js";import{equalsMaybe as l}from"../core/maybe.js";import{property as a,cast as n,subclass as p}from"../core/accessorSupport/decorators.js";import{ensureNumber as u}from"../core/accessorSupport/ensureType.js";import d from"../geometry/Point.js";let m=class extends(s(t)){constructor(e){super(e),this.observer=null,this.farDistance=1e3,this.heading=0,this.tilt=90,this.horizontalFieldOfView=45,this.verticalFieldOfView=45,this.feature=null}get valid(){return null!=this.observer&&this.farDistance>0}equals(e){return l(this.observer,e.observer)&&this.farDistance===e.farDistance&&this.heading===e.heading&&this.tilt===e.tilt&&this.horizontalFieldOfView===e.horizontalFieldOfView&&this.verticalFieldOfView===e.verticalFieldOfView&&r(this.feature,e.feature)}};e([a({type:d,json:{write:{isRequired:!0}}})],m.prototype,"observer",void 0),e([a({type:Number,nonNullable:!0,range:{min:0},json:{write:{isRequired:!0}}})],m.prototype,"farDistance",void 0),e([a({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),n(e=>o.normalize(u(e),void 0,!0))],m.prototype,"heading",void 0),e([a({type:Number,nonNullable:!0,range:{min:0,max:180},json:{write:{isRequired:!0}}})],m.prototype,"tilt",void 0),e([a({type:Number,nonNullable:!0,range:{min:0,max:360},json:{write:{isRequired:!0}}})],m.prototype,"horizontalFieldOfView",void 0),e([a({type:Number,nonNullable:!0,range:{min:0,max:180},json:{write:{isRequired:!0}}})],m.prototype,"verticalFieldOfView",void 0),e([a(i)],m.prototype,"feature",void 0),e([a({readOnly:!0,json:{read:!1}})],m.prototype,"valid",null),m=e([p("esri.analysis.Viewshed")],m);export{m as default};