@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.44 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
*/
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import"../../../core/Logger.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../../geometry/Extent.js";import s from"./DynamicLayerView3D.js";import a from"../../layers/WMSLayerView.js";let o=class extends(a(s)){constructor(){super(...arguments),this.type="wms-3d"}initialize(){this.layer.serviceSupportsSpatialReference(this.view.spatialReference)||this.addResolvingPromise(Promise.reject(new t("layerview:spatial-reference-incompatible","The spatial references supported by this WMS layer are incompatible with the spatial reference of the view"))),this._updatingHandles.add((()=>this.exportImageParameters?.version),(()=>{this._updatingHandles.addPromise(this.refreshDebounced())}))}createFetchPopupFeaturesQuery(e){const t=this.findExtentInfoAt(e),r=t.extent,s=new i(r[0],r[1],r[2],r[3],this._spatialReference),a=t.imageSize,o=a.width,n=a.height,p=s.width/o;return{extent:s,width:o,height:n,x:Math.round((e.x-s.xmin)/p),y:Math.round((s.ymax-e.y)/p)}}getFetchOptions(){return{timeExtent:this.timeExtent}}};o=e([r("esri.views.3d.layers.WMSLayerView3D")],o);const n=o;export{n as default};