A Vector Tile may parse either Mapbox or OpenVector Tile Layers The input is a Uint8Array that has encoded protobuffer messages.

Protobuf.

Example:

import { VectorTile } from 'open-vector-tile';

const vectorTile = new VectorTile(data);
const { landuse } = vectorTile.layers;
const firstFeature = landuse.features(0);

Constructors

Methods

Constructors

  • Parameters

    • data: Uint8Array

      the input data to parse

    • end: number = 0

      the size of the data, leave blank to parse the entire data

    Returns VectorTile

Methods

  • Read the elevation data if it exists

    Returns undefined | number[]

    • the elevation data