@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.87 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.19/LICENSE.txt */
import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import{property as l,subclass as r}from"../../../../core/accessorSupport/decorators.js";import i from"../../../../geometry/Polygon.js";import{toExtent as o}from"../../../../geometry/support/aaBoundingRect.js";import s from"../../../../symbols/SimpleFillSymbol.js";import{TileTreeDebugger as a}from"../../../support/TileTreeDebugger.js";let n=class extends a{get _flowSubView(){const{layerView:e}=this;return"imagery-3d"===e.type?e.test.subView:e.test.flowSubView}constructor(e,t=!0){super(e),this._fullExtentGraphic=null,this.enableLabels=t}clear(){super.clear(),this._fullExtentGraphic&&(this.view.graphics.remove(this._fullExtentGraphic),this._fullExtentGraphic=null)}update(){super.update();const e=this._flowSubView.layer.fullExtent;null==this._fullExtentGraphic?(this._fullExtentGraphic=new t({geometry:e,symbol:new s({color:[0,0,0,0],outline:{color:"black",width:3}})}),this.view.graphics.add(this._fullExtentGraphic)):this._fullExtentGraphic.geometry=e}getTiles(){const e=null!=this.view.basemapTerrain.spatialReference?this.view.basemapTerrain.spatialReference:null,t=this._flowSubView.test.targetTiles,l=this.view.basemapTerrain.renderedTiles;let r=null;if("imagery-tile"===this._flowSubView.layer.type){const e=this._flowSubView;r=e.test.loadedTiles}return l.map(l=>{const a=this._getColor(l,t,r),n=new s({color:a,outline:{color:"black",width:1}});return{...l,lij:l.lij,level:l.level,geometry:i.fromExtent(o(l.extent,e)),label:l.lij.toString(),polygonSymbol:n}})}_getColor(e,t,l){const r=.1;return null!=t&&t.has(e.key)?null==l||l.has(e.key)?[0,255,0,r]:[255,165,0,r]:[255,0,0,r]}};e([l()],n.prototype,"layerView",void 0),n=e([r("esri.views.3d.layers.support.FlowTileTree3DDebugger")],n);export{n as FlowTileTree3DDebugger};