Custom Gis Application with Arcgis Javascript API with modern layouting
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.
 
 

12 lines
4.4 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/Error ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../layers/support/rasterFunctions/rasterProjectionHelper ./LayerView3D ./TiledLayerView3D ../terrain/RasterTile ../../layers/ImageryTileLayerView ../../layers/LayerView ../../layers/RefreshableLayerView ../../support/drapedUtils ../../webgl/capabilities".split(" "),
function(g,n,p,h,e,B,C,q,r,t,u,v,w,x,y,z,A){e=class extends w(y(u.TiledLayerView3D(t.LayerView3D(x)))){constructor(){super(...arguments);this.type="imagery-tile-3d";this._isAlignedMapTile=!0}initialize(){this.layer.increaseRasterJobHandlerUsage();null==this.fullExtent&&this.addResolvingPromise(Promise.reject(new n("layerview:spatial-reference-incompatible","The layer extent cannot be projected to the view's spatial reference",{layer:this.layer})));const a=p.whenOnce(()=>this.view?.basemapTerrain?.tilingSchemeLocked).then(()=>
{const c=this.view.basemapTerrain.tilingScheme,b=this.layer.tileInfo;this.tileInfo=(this._isAlignedMapTile=["png","png24","png32","jpg","mixed"].includes(b.format)&&c.compatibleWith(b))?b:c.toTileInfo();this._updatingHandles.add(()=>[this.layer.renderer,this.layer.interpolation,this.layer.bandIds,this.layer.multidimensionalDefinition,this.layer.multidimensionalSubset,this.layer.rasterFunction,this.timeExtent],()=>this.refresh())});this.addResolvingPromise(a)}destroy(){this.layer.decreaseRasterJobHandlerUsage()}get _blankTile(){const a=
document.createElement("canvas"),c=a.getContext("2d"),[b,d]=this.tileInfo.size;a.width=b;a.height=d;c.clearRect(0,0,b,d);return c.getImageData(0,0,b,d)}get imageFormatIsOpaque(){return"jpg"===this.layer.tileInfo.format}get hasMixedImageFormats(){return"mixed"===this.layer.tileInfo.format}get dataLevelRange(){var a=this.layer.tileInfo;const c=this.tileInfo.lodAt(0)?.scale;a=this.layer.tileInfo.lodAt(a.lods.length-1)?.scale;return this.levelRangeFromScaleRange(c,a)}_getfullExtent(){return r.projectDatasetExtent(this.layer.serviceRasterInfo,
this.view.basemapTerrain?.spatialReference??this.view.spatialReference)}async fetchTile(a,c){var b=this.tileInfo;const d=this._canSymbolizeInWebGL();var f={tileInfo:b,requestRawData:d,signal:c.signal,timeExtent:this.timeExtent,requestAsImageElement:this._isAlignedMapTile,noClip:!1};({layer:c}=this);const [k,l,m]=a;a=await c.fetchTile(k,l,m,f);if(a instanceof HTMLImageElement)return a;f=a?.pixelBlock;if(null==f||!d&&(f=await c.applyRenderer(a),null==f))return this._blankTile;b=new v.RasterTile([k,
l,m],f,b.size[0],b.size[1]);d?(b.symbolizerRenderer=c.symbolizer.rendererJSON,b.symbolizerParameters=c.symbolizer.generateWebGLParameters(this._getSymbolizerOptions(k)),b.transformGrid=a.transformGrid,b.bandIds=c.bandIds):(b.isRendereredSource=!0,b.bandIds=null);b.interpolation=c.interpolation;return b}_getSymbolizerOptions(a){a=this.tileInfo.lodAt(a).resolution;return{pixelBlock:null,isGCS:null!=this.view.basemapTerrain?.spatialReference?this.view.basemapTerrain.spatialReference.isGeographic:this.view.spatialReference.isGeographic,
resolution:{x:a,y:a},bandIds:this.layer.bandIds}}ensureSymbolizerParameters(a){this._canSymbolizeInWebGL()&&JSON.stringify(a.symbolizerRenderer)!==JSON.stringify(this.layer.symbolizer.rendererJSON)&&(a.symbolizerParameters=this.layer.symbolizer.generateWebGLParameters(this._getSymbolizerOptions(a.lij[0])))}createFetchPopupFeaturesQueryGeometry(a,c){return z.createQueryGeometry(a,c,this.view)}refresh(){this.emit("data-changed")}async doRefresh(){this.suspended||this.emit("data-changed")}_canSymbolizeInWebGL(){var a=
A.getWebGLCapabilities();const {symbolizer:c}=this.layer,b=c.lookup?.colormapLut?.indexedColormap,d=!!this.layer.rasterFunction?.hasClipFunction;a=b&&b.length>4*(a.maxTextureSize||4906);return c.canRenderInWebGL&&!a&&!d}};g.__decorate([h.property({readOnly:!0})],e.prototype,"_blankTile",null);g.__decorate([h.property({readOnly:!0})],e.prototype,"imageFormatIsOpaque",null);g.__decorate([h.property({readOnly:!0})],e.prototype,"hasMixedImageFormats",null);g.__decorate([h.property({readOnly:!0})],e.prototype,
"dataLevelRange",null);return e=g.__decorate([q.subclass("esri.views.3d.layers.ImageryTileLayerView3D")],e)});