12345 |
- /*
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
- See https://js.arcgis.com/4.25/esri/copyright.txt for details.
- */
- import{_ as e}from"../../chunks/tslib.es6.js";import o from"../../Color.js";import{handlesGroup as r}from"../../core/handleUtils.js";import{isNone as t}from"../../core/maybe.js";import{watch as s,sync as i}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import n from"./ElevationProfileLine.js";import{getQuerySourceMinDemResolution as u}from"./support/elevationQuerySourceUtils.js";let p=class extends n{constructor(e){super(e),this.type="query",this.color=new o("#db334a"),this.viewVisualizationEnabled=!0,this.source=null,this.numSamplesForPreview=50,this.numSamplesPerChunk=500}get minDemResolution(){return u(this.source)}get available(){const e=this.source;return!!e&&(t(e.visible)||e.visible)&&(t(e.layers)||e.layers.some((e=>e.visible)))}queryElevation(e,o){if(!this.source)throw new Error("No source configured for the elevation profile line");return this.source.queryElevation(e,o)}attach(e){return r([super.attach(e),s((()=>this.source),(()=>this._onChange()),i)])}};e([l({type:o,nonNullable:!0})],p.prototype,"color",void 0),e([l()],p.prototype,"viewVisualizationEnabled",void 0),e([l()],p.prototype,"source",void 0),e([l({readOnly:!0})],p.prototype,"minDemResolution",null),e([l()],p.prototype,"available",null),p=e([a("esri.widgets.ElevationProfile.ElevationProfileLineQuery")],p);const c=p;export{c as default};
|