@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 2.35 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{destroyHandle as i,makeHandle as r}from"../../../core/handleUtils.js";import{property as s,subclass as o}from"../../../core/accessorSupport/decorators.js";import{canProjectWithoutEngine as l}from"../../../geometry/projectionUtils.js";import{LayerView3D as a}from"./LayerView3D.js";import{TiledLayerView3D as p}from"./TiledLayerView3D.js";import{fetchTile as n}from"./support/fetchTile.js";import{SublayerPopupHighlightHelper3D as h}from"./support/SublayerPopupHighlightHelper3D.js";import f from"../../layers/LayerView.js";import{RefreshableLayerView as m}from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as u}from"../../layers/support/MapServiceLayerViewHelper.js";let c=class extends(m(p(a(f)))){constructor(){super(...arguments),this.type="tile-3d"}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,i=this.layer.tileInfo?.spatialReference;if(null==e||null==i||!l(e,i)){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)))}}if(u(this,this.layer)){const e=new h({view:this.view,layerView:this,updatingHandles:this._updatingHandles});this._popupHighlightHelper=e,this.addHandles(i(e))}this._addTilingSchemeMatchPromise()}async fetchTile(e,t){return n(this,e,t)}async fetchPopupFeaturesAtLocation(e,t){return this._popupHighlightHelper?.fetchPopupFeaturesAtLocation(e,t)??[]}highlight(e,t){return this._popupHighlightHelper?.highlight(e,t)??r()}async doRefresh(){this.suspended||this.emit("data-changed")}};e([s()],c.prototype,"imageFormatIsOpaque",null),e([s()],c.prototype,"hasMixedImageFormats",null),e([s()],c.prototype,"layer",void 0),e([s()],c.prototype,"tileInfo",null),c=e([o("esri.views.3d.layers.TileLayerView3D")],c);const y=c;export{y as default};