UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 859 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{baseObjectMemory as t}from"../../../../../../core/memoryEstimations.js";class e{constructor(t,e){this.tile=t,this._tileIndices=e}get id(){return this.tile.id}get featureCount(){return this._tileIndices?.length??this.tile.featureCount}get usedMemory(){return t+(this._tileIndices?.byteLength??0)}get extent(){return this.tile.descriptor.extent}readObjectIds(t,e){const{_tileIndices:i,tile:r}=this;return r.readObjectIds(t,i,e)}readCoordinates(t,e){const{_tileIndices:i,tile:r}=this;return r.readCoordinates(t,i,e)}subset(t){const{_tileIndices:i,tile:r}=this;if(null==i)return new e(r,t);const n=new Uint32Array(t.length);for(let e=0;e<n.length;++e)n[e]=i[t[e]];return new e(r,n)}}export{e as FeatureData};