@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 2.54 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
*/
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{canProjectWithoutEngine as s}from"../../../geometry/projection.js";import{LayerView3D as o}from"./LayerView3D.js";import{TiledLayerView3D as l}from"./TiledLayerView3D.js";import{fetchTile as a}from"./support/fetchTile.js";import p from"../../layers/LayerView.js";import n from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as m,MapServiceLayerViewHelper as u}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as h}from"../../support/drapedUtils.js";let c=class extends(n(l(o(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}initialize(){if("web-tile"===this.layer.type){const e=this.layer.fullExtent?.spatialReference,r=this.layer.tileInfo?.spatialReference;if(null==e||null==r||!s(e,r)){const e="defaults"===this.layer.originOf("fullExtent")||null==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)))}}m(this,this.layer)&&(this._popupHighlightHelper=new u({createFetchPopupFeaturesQueryGeometry:(e,t)=>h(e,t,this.view),layerView:this,updatingHandles:this._updatingHandles})),this._addTilingSchemeMatchPromise()}destroy(){this._popupHighlightHelper?.destroy()}async fetchTile(e,t){return a(this,e,t)}async fetchPopupFeaturesAtLocation(e,t){return this._popupHighlightHelper?.fetchPopupFeaturesAtLocation(e,t)??[]}async doRefresh(){this.suspended||this.emit("data-changed")}};e([r()],c.prototype,"imageFormatIsOpaque",null),e([r()],c.prototype,"hasMixedImageFormats",null),e([r()],c.prototype,"layer",void 0),e([r()],c.prototype,"tileInfo",null),c=e([i("esri.views.3d.layers.TileLayerView3D")],c);const f=c;export{f as default};