mvt-reader
Features
- Decodes and reads Mapbox vector tiles in Rust
- Provides an API for accessing layer names and features within a vector tile
- Can be used as a WebAssembly module in JavaScript (enabled by the
wasmfeature) - Optionally uses
prost-buildto compile the protobuf definition sources fromvector_tile.proto(enabled by theprotocfeature). Needsprotocto be installed on the system. If theprotocfeature is not enabled, the library uses pre-generated Rust code for the protobuf definitions.
Build the project
Run tests
&&
Usage
To use the mvt-reader library in your Rust project, add the following to your Cargo.toml file:
[]
= "2.3.0"
Then, you can import and use the library in your code:
use ;
WebAssembly Usage
To use the mvt-reader library as a WebAssembly module in JavaScript, you can install it with npm and use it in your JavaScript code:
const = require
const fs = require
// Example usage
const reader =
const layerNames = reader.
console.log
// More code...
License
This project is licensed under the MIT License.