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.
9 lines
2.8 KiB
9 lines
2.8 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("../../../chunks/tslib.es6 ../../../core/Collection ../../../core/Logger ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../layers/support/layerUtils ./LayerView3D ./TiledLayerView3D ./support/fetchTile ../../layers/LayerView ../../layers/RefreshableLayerView".split(" "),function(f,l,k,m,g,d,w,n,p,q,r,t,u,v){d=class extends v(r.TiledLayerView3D(q.LayerView3D(u))){constructor(){super(...arguments); |
|
this.type="wmts-3d"}initialize(){this._getCompatibleTileInfoMatrixSet(a=>this._getTileInfoSupportError(a.tileInfo,a.fullExtent));const b=m.whenOnce(()=>this.view?.basemapTerrain?.tilingSchemeLocked).then(()=>{const a=this._getCompatibleTileInfoMatrixSet(c=>this._getTileInfoError(c.tileInfo,c.fullExtent));null!=a&&(null!==a.id&&this.layer.activeLayer.tileMatrixSetId!==a.id&&(this.layer.activeLayer.tileMatrixSetId=a.id),a.tileInfo&&(this.tileInfo=a.tileInfo),this.layer.fullExtent=a.fullExtent)});this.addResolvingPromise(b); |
|
this.when(()=>this._postInitialize())}refresh(){this.emit("data-changed")}canResume(){if(!super.canResume())return!1;const b=this.layer.activeLayer.tileMatrixSet;return null!=b&&!this._getTileInfoError(b.tileInfo,b.fullExtent)}async fetchTile(b,a){return t.fetchTile(this,b,a)}async doRefresh(){this.suspended||this.emit("data-changed")}_postInitialize(){this._updatingHandles.add(()=>this.layer?.activeLayer?.styleId,()=>this.refresh());this._updatingHandles.add(()=>this.layer?.activeLayer,b=>{const a= |
|
this._getCompatibleTileInfoMatrixSet(c=>this._getTileInfoError(c.tileInfo,c.fullExtent),!0);a&&null!=a.id&&b.tileMatrixSetId!==a.id&&(this.layer.activeLayer.tileMatrixSetId=a.id);this.notifyChange("suspended");this.canResume()&&this.refresh()})}_getCompatibleTileInfoMatrixSet(b,a=!1){const c=p.getTileMaxtrixSetFromActiveLayer(this.layer);if(null!=c){if(l.isCollection(c))return c.find(e=>{e=b(e);null!=e&&(a?k.getLogger(this).error("The selected tile matrix set is not compatible with the view",e):this.addResolvingPromise(Promise.reject(e))); |
|
return null==e});const h=b(c);null!=h&&(a?k.getLogger(this).error("The selected tile matrix set is not compatible with the view",h):this.addResolvingPromise(Promise.reject(h)));return c}return null}_getTileInfoError(b,a){return this._getTileInfoSupportError(b,a)||this._getTileInfoCompatibilityError(b,this.view.basemapTerrain.tilingScheme)}};f.__decorate([g.property()],d.prototype,"layer",void 0);f.__decorate([g.property()],d.prototype,"suspended",void 0);f.__decorate([g.property()],d.prototype,"tileInfo", |
|
void 0);return d=f.__decorate([n.subclass("esri.views.3d.layers.WMTSLayerView3D")],d)}); |