UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 2.61 kB
/* 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 t from"../analysis/LineOfSightAnalysis.js";import s from"../analysis/LineOfSightAnalysisObserver.js";import r from"../analysis/LineOfSightAnalysisTarget.js";import i from"../core/Collection.js";import{referenceSetter as o}from"../core/collectionUtils.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{watch as n,syncAndInitial as l}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import c from"./Layer.js";import{OperationalLayer as h}from"./mixins/OperationalLayer.js";const u=i.ofType(r);let d=class extends(h(a(c))){constructor(e){super(e),this.type="line-of-sight",this.operationalLayerType="LineOfSightLayer",this.analysis=new t,this.opacity=1}initialize(){this.addHandles(n((()=>this.analysis),((e,t)=>{null!=t&&t.parent===this&&(t.parent=null),null!=e&&(e.parent=this)}),l))}async load(){return null!=this.analysis&&this.addResolvingPromise(this.analysis.waitComputeExtent()),this}get observer(){return this.analysis?.observer}set observer(e){const{analysis:t}=this;t&&(t.observer=e)}get targets(){return null!=this.analysis?this.analysis.targets:new i}set targets(e){o(e,this.analysis?.targets)}get fullExtent(){return null!=this.analysis?this.analysis.extent:null}get spatialReference(){return null!=this.analysis?this.analysis.spatialReference:null}releaseAnalysis(e){this.analysis===e&&(this.analysis=new t)}};e([p({json:{read:!1},readOnly:!0})],d.prototype,"type",void 0),e([p({type:["LineOfSightLayer"]})],d.prototype,"operationalLayerType",void 0),e([p({type:s,json:{read:!0,write:{isRequired:!0,ignoreOrigin:!0}}})],d.prototype,"observer",null),e([p({type:u,json:{read:!0,write:{ignoreOrigin:!0,isRequired:!0}}})],d.prototype,"targets",null),e([p({type:t,nonNullable:!0,json:{read:!1,write:!1}})],d.prototype,"analysis",void 0),e([p({readOnly:!0})],d.prototype,"fullExtent",null),e([p({readOnly:!0})],d.prototype,"spatialReference",null),e([p({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],d.prototype,"opacity",void 0),e([p({type:["show","hide"]})],d.prototype,"listMode",void 0),d=e([y("esri.layers.LineOfSightLayer")],d);const m=d;export{m as default};