12345 |
- /*
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
- See https://js.arcgis.com/4.25/esri/copyright.txt for details.
- */
- import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Error.js";import{isNone as t,isSome as o}from"../../core/maybe.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import i from"../../geometry/Point.js";import{combinedViewLayerTimeExtentProperty as a}from"../../layers/support/commonProperties.js";import n from"../../rest/support/Query.js";import{getFetchPopupTemplate as u}from"./support/popupUtils.js";const m=m=>{let c=class extends m{constructor(){super(...arguments),this.view=null}async fetchPopupFeatures(e,s){const{layer:p}=this;if(!e)throw new r("imagerylayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:p});const{popupEnabled:a}=p,m=u(p,s);if(!a||t(m))throw new r("imagerylayerview:fetchPopupFeatures","Missing required popupTemplate or popupEnabled",{popupEnabled:a,popupTemplate:m});const c=await m.getRequiredFields(),l=new n;l.timeExtent=this.timeExtent,l.geometry=e,l.outFields=c,l.outSpatialReference=e.spatialReference;const y=this.view.resolution,w="2d"===this.view.type?new i(y,y,this.view.spatialReference):new i(.5*y,.5*y,this.view.spatialReference),{returnTopmostRaster:d,showNoDataRecords:h}=m.layerOptions||{returnTopmostRaster:!0,showNoDataRecords:!1},f={returnDomainValues:!0,returnTopmostRaster:d,pixelSize:w,showNoDataRecords:h,signal:o(s)?s.signal:null};return p.queryVisibleRasters(l,f).then((e=>e))}canResume(){return!!super.canResume()&&!this.timeExtent?.isEmpty}};return e([s()],c.prototype,"layer",void 0),e([s()],c.prototype,"suspended",void 0),e([s(a)],c.prototype,"timeExtent",void 0),e([s()],c.prototype,"view",void 0),c=e([p("esri.views.layers.ImageryLayerView")],c),c};export{m as default};
|