UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.96 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"../core/Error.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import i from"../geometry/Extent.js";import s from"../geometry/SpatialReference.js";import{zero as a}from"../geometry/support/aaBoundingRect.js";import p from"./Layer.js";import n from"./support/TileInfo.js";import{TileKey as l}from"./support/TileKey.js";const m=new l("0/0/0",0,0,0,void 0);let c=class extends p{constructor(){super(...arguments),this.tileInfo=n.create({spatialReference:s.WebMercator,size:256}),this.fullExtent=new i(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,s.WebMercator),this.spatialReference=s.WebMercator,this.type="base-elevation"}addResolvingPromise(e){super.addResolvingPromise(e)}getTileBounds(e,t,o,r){const i=r||a;return m.level=e,m.row=t,m.col=o,m.extent=i,this.tileInfo.updateTileInfo(m),m.extent=void 0,i}fetchTile(){throw new t("BaseElevationLayer:fetchTile-not-implemented","fetchTile() is not implemented")}async queryElevation(e,t){const{ElevationQuery:o}=await this._importElevationQuery();return(new o).query(this,e,t)}createElevationSampler(e,t){return this._importElevationQuery().then((o=>(new o.ElevationQuery).createSampler(this,e,t)))}_importElevationQuery(){return import("./support/ElevationQuery.js")}};e([o({type:n})],c.prototype,"tileInfo",void 0),e([o({type:["show","hide"]})],c.prototype,"listMode",void 0),e([o()],c.prototype,"fullExtent",void 0),e([o()],c.prototype,"spatialReference",void 0),e([o({readOnly:!0,value:"base-elevation"})],c.prototype,"type",void 0),c=e([r("esri.layers.BaseElevationLayer")],c);const u=c;export{u as default};