@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 865 B
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{tileCoordSize as e}from"./constants.js";class t{constructor(s){this.extent=e,this.keys=[],this.values=[],this._pbfLayer=s.clone();const a=s.asUnsafe();for(;a.next();)switch(a.tag()){case 1:this.name=a.getString();break;case 3:this.keys.push(a.getString());break;case 4:this.values.push(a.processMessage(t._parseValue));break;case 5:this.extent=a.getUInt32();break;default:a.skip()}}getData(){return this._pbfLayer}static _parseValue(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null}}export{t as default};