@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.49 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/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{subView:t}=this;if("draped"!==t.type)return null;const r=t.findExtentInfoAt(e),s=r.extent,a=new i(s[0],s[1],s[2],s[3],t.spatialReference),o=r.imageSize,n=o.width,p=o.height,c=a.width/n;return{extent:a,width:n,height:p,x:Math.round((e.x-a.xmin)/c),y:Math.round((a.ymax-e.y)/c)}}getFetchOptions(){return{timeExtent:this.timeExtent}}};o=e([r("esri.views.3d.layers.WMSLayerView3D")],o);const n=o;export{n as default};