UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 2.57 kB
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{isNone as r}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{canProjectWithoutEngine as o}from"../../../geometry/projection.js";import{LayerView3D as a}from"./LayerView3D.js";import{TiledLayerView3D as l}from"./TiledLayerView3D.js";import p from"../../layers/LayerView.js";import n from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as h,MapServiceLayerViewHelper as m}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as u}from"../../support/drapedUtils.js";let c=class extends(n(l(a(p)))){constructor(){super(...arguments),this.type="tile-3d",this._popupHighlightHelper=null}get imageFormatIsOpaque(){return"jpg"===this.layer.tileInfo.format}get hasMixedImageFormats(){return"mixed"===this.layer.tileInfo.format}get tileInfo(){return this.layer.tileInfo}get dataLevelRange(){if(this.tileInfo){const e=this.tileInfo.lods,t=e[0].scale,r=e[e.length-1].scale;return this.levelRangeFromScaleRange(t,r)}return{minLevel:0,maxLevel:0}}initialize(){if("web-tile"===this.layer.type){const e=this.layer.get("fullExtent.spatialReference"),i=this.layer.get("tileInfo.spatialReference");if(r(e)||r(i)||!o(e,i)){const e="defaults"===this.layer.originOf("fullExtent")||r(this.layer.fullExtent)?"SceneView requires fullExtent to be specified by the user on WebTileLayer":"SceneView requires fullExtent to be specified in the same spatial reference as tileInfo on WebTileLayer";this.addResolvingPromise(Promise.reject(new t("layerview:incompatible-fullextent",e)))}}h(this,this.layer)&&(this._popupHighlightHelper=new m({createFetchPopupFeaturesQueryGeometry:(e,t)=>u(e,t,this.view),layerView:this,updatingHandles:this.updatingHandles})),this._addTilingSchemeMatchPromise()}destroy(){this._popupHighlightHelper?.destroy()}async fetchPopupFeatures(e,t){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeatures(e,t):[]}async doRefresh(){this.suspended||this.emit("data-changed")}};e([i()],c.prototype,"imageFormatIsOpaque",null),e([i()],c.prototype,"hasMixedImageFormats",null),e([i()],c.prototype,"layer",void 0),e([i()],c.prototype,"tileInfo",null),e([i()],c.prototype,"dataLevelRange",null),c=e([s("esri.views.3d.layers.TileLayerView3D")],c);const f=c;export{f as default};