You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
5.1 KiB
13 lines
5.1 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define("exports ../../../chunks/tslib.es6 ../../../core/Error ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ./support/LayerViewPerformanceInfo ../support/updatingProperties ../terrain/terrainUtils ../../support/layerViewUtils".split(" "),function(l,d,k,p,e,v,w,x,q,r,m,t,n){l.TiledLayerView3D=c=>{c=class extends c{constructor(){super(...arguments);this.hasMixedImageFormats= |
|
!0}get imageFormatIsOpaque(){return!1}get fullExtent(){return this.layer.fullExtent}get isOpaque(){return 1<=this.fullOpacity&&this.imageFormatIsOpaque}get visibleAtCurrentScale(){if(!n.isScaleRangeActive(this.layer.minScale,this.layer.maxScale)||!this.view.terrainScale)return!0;const a=Math.round(this.view.basemapTerrain.tilingScheme.levelAtScale(this.view.terrainScale));return a>=this.displayLevelRange.minLevel&&a<=this.displayLevelRange.maxLevel}get dataScaleRange(){var a=this.tileInfo.lods;let b= |
|
a[0].scale;a=a[a.length-1].scale;if("tilemapCache"in this.layer&&this.layer.tilemapCache){const {effectiveMinLOD:f,effectiveMaxLOD:g}=this.layer.tilemapCache;b=this.tileInfo.lodAt(f).scale;a=this.tileInfo.lodAt(g).scale}return{minScale:b,maxScale:a}}canResume(){const a=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;return this.visible&&this.layer?.loaded&&!this.parent?.suspended&&this.view?.ready&&n.validateScaleRange(a)&&this.visibleAtCurrentTimeExtent||!1}get dataLevelRange(){const {minScale:a, |
|
maxScale:b}=this.dataScaleRange;return this.levelRangeFromScaleRange(a,b)}get displayLevelRange(){const a=this.levelRangeFromScaleRange(this.layer.minScale||this.dataScaleRange.minScale,this.layer.maxScale||this.dataScaleRange.maxScale);this.layer.maxScale&&a.maxLevel++;return a}get performanceInfo(){return new r.LayerViewPerformanceInfo(this.view.basemapTerrain.getUsedMemoryForLayerView(this))}getTileUrl(a){return this.layer.getTileUrl(a[0],a[1],a[2])}_addTilingSchemeMatchPromise(){if(null==this.fullExtent)return this.addResolvingPromise(Promise.reject(new k("tilingscheme:extent-not-defined", |
|
"This layer doesn't define a fullExtent.")));const a=this._getTileInfoSupportError(this.tileInfo,this.fullExtent);if(a)return this.addResolvingPromise(Promise.reject(a));this.addResolvingPromise(p.whenOnce(()=>this.view?.basemapTerrain?.tilingSchemeLocked).then(()=>{const b=this._getTileInfoCompatibilityError(this.tileInfo,this.view.basemapTerrain.tilingScheme,"tilemapCache"in this.layer?this.layer.tilemapCache?.effectiveMaxLOD:void 0);if(b)throw b;}))}_getTileInfoSupportError(a,b){if(a=t.checkIfTileInfoSupportedForView(a, |
|
b,this.view.spatialReference,this.view.state.viewingMode,"tilemapCache"in this.layer?this.layer.tilemapCache?.effectiveMaxLOD:void 0))switch(b={layer:this.layer,error:a},a.name){case "tilingscheme:spatial-reference-mismatch":case "tilingscheme:global-unsupported-spatial-reference":case "tilingscheme:local-unsupported-spatial-reference":return new k("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",b);default:return new k("layerview:tiling-scheme-unsupported", |
|
"The tiling scheme of this layer is not supported by SceneView",b)}}_getTileInfoCompatibilityError(a,b,f){return null!=a&&b.compatibleWith(a,f)?null:new k("layerview:tiling-scheme-incompatible","The tiling scheme of this layer is incompatible with the tiling scheme of the surface")}levelRangeFromScaleRange(a,b){const f={minLevel:0,maxLevel:Infinity};var g=this.view&&this.view.basemapTerrain&&this.view.basemapTerrain.tilingScheme;if(!g)return f;const u=g.levels[0];g=h=>{h=Math.log(u.scale/h)/Math.LN2; |
|
return 1E-9>.5-Math.abs(.5-h%1)?Math.round(h):Math.ceil(h)};null!=a&&0<a&&(f.minLevel=Math.max(0,g(a)));null!=b&&0<b&&(f.maxLevel=Math.max(0,g(b)));return f}isUpdating(){return!!(this.view&&this.view.basemapTerrain&&this.view.basemapTerrain.updating)}};d.__decorate([e.property({readOnly:!0})],c.prototype,"imageFormatIsOpaque",null);d.__decorate([e.property({readOnly:!0})],c.prototype,"updating",void 0);d.__decorate([e.property(m.updatingProgress)],c.prototype,"updatingProgress",void 0);d.__decorate([e.property(m.updatingProgressValue)], |
|
c.prototype,"updatingProgressValue",void 0);d.__decorate([e.property()],c.prototype,"hasMixedImageFormats",void 0);d.__decorate([e.property()],c.prototype,"fullExtent",null);d.__decorate([e.property({readOnly:!0})],c.prototype,"isOpaque",null);d.__decorate([e.property({readOnly:!0})],c.prototype,"visibleAtCurrentScale",null);d.__decorate([e.property()],c.prototype,"dataScaleRange",null);d.__decorate([e.property({readOnly:!0})],c.prototype,"dataLevelRange",null);d.__decorate([e.property({readOnly:!0})], |
|
c.prototype,"displayLevelRange",null);d.__decorate([e.property()],c.prototype,"layer",void 0);return c=d.__decorate([q.subclass("esri.views.3d.layers.TiledLayerView3D")],c)};Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}); |