UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

3 lines (2 loc) 1.74 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{EventEmitter as o}from"../../../../core/Evented.js";import{property as s,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{projectBoundingSphere as c}from"../../../../geometry/projection/projectBoundingSphere.js";import{toRect as i,create as p}from"../../../../geometry/support/aaBoundingBox.js";import{intersects as a,create as u}from"../../../../geometry/support/aaBoundingRect.js";import{Sphere as m}from"../../../../geometry/support/sphere.js";const f=p();let l=class extends t{constructor(e){super(e),this.events=new o}forEach(e){this.forAllFeatures(t=>(e(t),0))}forEachBounds(e,t){for(const r of e)t(this.getFeatureExtent(r,f))}forEachInBounds(e,t){this.forAllFeatures(o=>{const s=this.getFeatureExtent(r(o),h);return a(e,i(s,y))&&t(r(o)),0},t=>{if(c(t,this.sourceSpatialReference,d,this.viewSpatialReference),d.center[0]>=e[0]&&d.center[1]>=e[1]&&d.center[2]<=e[2]&&d.radius<=e[3])return 0;const r=Math.max(e[0],Math.min(d.center[0],e[2])),o=Math.max(e[1],Math.min(d.center[1],e[3])),s=d.center[0]-r,n=d.center[1]-o;return s*s+n*n<=d.radius**2?0:1})}};e([s({constructOnly:!0})],l.prototype,"featureAdapter",void 0),e([s({constructOnly:!0})],l.prototype,"forAllFeatures",void 0),e([s({constructOnly:!0})],l.prototype,"getFeatureExtent",void 0),e([s({constructOnly:!0})],l.prototype,"sourceSpatialReference",void 0),e([s({constructOnly:!0})],l.prototype,"viewSpatialReference",void 0),l=e([n("esri.views.3d.layers.i3s.I3SQueryFeatureStore")],l);const d=new m,h=p(),y=u();export{l as I3SQueryFeatureStore};