@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.66 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 o from"../../Color.js";import{handlesGroup as r}from"../../core/handleUtils.js";import{watch as t,sync as s}from"../../core/reactiveUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import n from"./ElevationProfileLine.js";import{getQuerySourceMinDemResolution as a}from"./support/elevationQuerySourceUtils.js";let u=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 a(this.source)}get available(){const e=this.source;return!!e&&(null==e.visible||e.visible)&&(null==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),t((()=>this.source),(()=>this._onChange()),s)])}};e([i({type:o,nonNullable:!0})],u.prototype,"color",void 0),e([i()],u.prototype,"viewVisualizationEnabled",void 0),e([i()],u.prototype,"source",void 0),e([i({readOnly:!0})],u.prototype,"minDemResolution",null),e([i()],u.prototype,"available",null),u=e([l("esri.widgets.ElevationProfile.ElevationProfileLineQuery")],u);const p=u;export{p as default};