A web application for generating vector tiles (.pbf / .pmtiles(In Progress)) in the browser
A completely client-side vector tile generation tool. Upload GeoJSON and convert it to tiles directly in your browser for download.
- Rust + WebAssembly: Core tile generation processing
- React + TypeScript + Vite: Frontend UI
web-vector-tile-maker/
├─ core/ # Rust (Wasm core)
│ ├─ Cargo.toml
│ ├─ build.rs
│ ├─ proto/ # Protocol Buffer definitions
│ └─ src/
│ ├─ lib.rs # Main library
│ ├─ geojson_parser.rs # GeoJSON parsing
│ ├─ projection.rs # Coordinate projection
│ ├─ tiler.rs # Tile assignment
│ ├─ mvt_encoder.rs # MVT encoder
│ └─ bin/
│ └─ cli.rs # CLI tool (for testing)
├─ frontend/ # React app
│ ├─ package.json
│ ├─ vite.config.ts
│ └─ src/
│ ├─ main.tsx
│ ├─ App.tsx
│ └─ worker.ts # WebWorker
├─ test_data/ # Test data
│ └─ points.geojson
└─ .github/
└─ workflows/
└─ deploy.yml # GitHub Actions CI/CD
# Install rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add to PATH
source $HOME/.cargo/env
# Add WebAssembly target
rustup target add wasm32-unknown-unknown
# Install wasm-bindgen-cli
cargo install wasm-bindgen-cliNode.js 18 or higher is required.
# Using Homebrew (macOS)
brew install node
# Or download from official website
# https://nodejs.org/cd core
cargo build --release# Usage
cargo run --bin cli <geojson_file> <output_dir> <min_zoom> <max_zoom> [layer_name]
# Example: Generate zoom level 0-5 tiles from test_data/points.geojson
cargo run --bin cli ../test_data/points.geojson ../test_output 0 5 cities
# Results are saved in test_output/ directory
# test_output/0/0/0.pbf
# test_output/1/0/0.pbf
# ...cd core
cargo test# 1. Build Wasm
cd core
wasm-pack build --target web --out-dir ../frontend/src/wasm
# 2. Start frontend
cd ../frontend
npm install
npm run devOpen http://localhost:5173 in your browser
# Build Wasm
cd core
wasm-pack build --target web --out-dir ../frontend/src/wasm
# Build frontend
cd ../frontend
npm run build
# Output is in frontend/dist/- Input: FeatureCollection
- Geometry Types:
- ✅ Point
- ✅ LineString
- ✅ Polygon
- ⏳ MultiPoint / MultiLineString / MultiPolygon (In Progress)
- MVT (.pbf): Directory structure
{z}/{x}/{y}.pbf - PMTiles: Single file (In Progress)
- ZL 0 ~ 15
- PMTiles format support
- Drag & drop file upload
- npm support
MIT License
Issues and Pull Requests are welcome!