@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.41 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import i from"../../../geometry/Extent.js";import s from"./DrapedSubView3D.js";import{DynamicLayerView3D as a}from"./DynamicLayerView3D.js";import{WMSLayerView as o}from"../../layers/WMSLayerView.js";let n=class extends(o(a)){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,h=a.width/n;return{extent:a,width:n,height:p,x:Math.round((e.x-a.xmin)/h),y:Math.round((a.ymax-e.y)/h)}}getFetchOptions(){return{timeExtent:this.timeExtent}}_initSubView(){this.subView=new s({layerView:this})}};n=e([r("esri.views.3d.layers.WMSLayerView3D")],n);const p=n;export{p as default};