open-vector-tile
Version:
This library reads/writes Open Vector Tiles
28 lines • 989 B
TypeScript
import VectorFeature from './vectorFeature.js';
import type { Extents } from '../open/index.js';
import type { PbfReader } from 'pbf-ts';
/**
* A MapboxVectorLayer is a storage structure for the vector tile.
* It may contain either the old Mapbox layers or the new S2 layers.
* Parses extent, keys, values, and features. Features will utilize the extent, keys, and values.
*/
export default class MapboxVectorLayer {
#private;
version: number;
name: string;
extent: Extents;
length: number;
isS2: boolean;
/**
* @param pbf - The Protobuf object to read from
* @param end - The end position of the message in the buffer
* @param isS2 - Whether the layer is an S2 layer or Mapbox layer
*/
constructor(pbf: PbfReader, end: number, isS2?: boolean);
/**
* @param i - The index of the feature
* @returns - A feature at the given index
*/
feature(i: number): VectorFeature;
}
//# sourceMappingURL=vectorLayer.d.ts.map