UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 1.85 kB
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{isSome as t}from"../../../core/maybe.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{canProjectWithoutEngine as i}from"../../../geometry/projection.js";import{getEffectiveLayerCapabilities as a}from"../../../layers/support/layerUtils.js";import{enableDirect3DObjectFeatureLayerDisplay as p}from"../../../support/featureFlags.js";import c from"./FeatureLayerViewBase3D.js";let l=class extends c{constructor(){super(...arguments),this.type="feature-3d",this.direct3DObjectFeatureLayerDisplayEnabled=p()}initialize(){const{layer:e,view:s}=this;a(e)?.operations.supportsQuery||this.addResolvingPromise(Promise.reject(new r("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e}))),t(e.infoFor3D)&&(this.direct3DObjectFeatureLayerDisplayEnabled?this._set("suspendResumeExtentMode","computed"):this.addResolvingPromise(Promise.reject(new r("featurelayerview3d:unsupported-geometry-type",`Unsupported geometry type ${e.geometryType}`)))),"mesh"!==e.geometryType||i(e.spatialReference,s.spatialReference)||this.addResolvingPromise(Promise.reject(new r("layerview:spatial-reference-incompatible","The spatial references of the feature layer is incompatible with the spatial reference of the view")))}get featureSpatialReference(){return this.view.featureTiles?.tilingScheme?.spatialReference}};e([s({constructOnly:!0})],l.prototype,"direct3DObjectFeatureLayerDisplayEnabled",void 0),e([s()],l.prototype,"layer",void 0),l=e([o("esri.views.3d.layers.FeatureLayerView3D")],l);const y=l;export{y as default};