Skip to main content

Vector tile module

Keep tiled map delivery separate from map rendering.

The MVT module parses and writes Mapbox Vector Tiles, reads TileJSON and map styles, and provides sources for pre-tiled or dynamically generated vector data.

Vector tile delivery

Request map pieces. Decode features where they are used.

Vector-tile metadata describes the grid and the style describes how layers are used. A source can request only the tiles near the current view, while the decoder keeps the protobuf boundary separate from rendering.

Map context

Vector tile source

requestdecodecache

MVT protobuf · source lifecycle

Application result

Featuresdecoded geometry and properties
Binary datatyped buffers for rendering
Arrow tableoptional columnar view

Tile addressing and feature decoding stay reusable whether the source is a static tile set, a generated table source, or a service-backed vector layer.

The vector-tile path

Decode a tile, or let a source manage the tile set.

The module keeps the binary tile format, its metadata, and the source that requests tiles as related but separate layers. Applications can choose the level of control they need.

Read

MVT protobuf into feature or binary data

Describe

TileJSON bounds, schemes, and tilestats

Source

Request pre-tiled or generated vector tiles

Write

Encode compatible feature data as MVT

The @loaders.gl/tiles/mvt module handles the Mapbox Vector Tile format, a protobuf-encoded format that defines geospatial geometries.

The module also provides TableTileLoader for generating dynamic tiles from an in-memory GeoJSON table.

For Arrow input, ArrowTableTileLoader generates GeoArrow WKB tiles while preserving typed attribute columns without a GeoJSON property round-trip.

Detailed guide

Vector tile module details

The sections below cover installation, loaders, writers, sources, formats, and tile-specific data behavior.

Installation​

npm install @loaders.gl/tiles
npm install @loaders.gl/core

Loaders and Writers​

Loader / Writer / SourceDescription
MapStyleLoaderParses MapLibre and Mapbox style JSON.
MVTLoaderParses Mapbox Vector Tiles.
TileJSONLoaderParses TileJSON metadata and tilestats.
MVTWriterWrites Mapbox Vector Tile data.
MVTLoaderDynamically loads tiles from pre-tiled MVT hierarchies.
TableTileLoaderGenerates vector tiles from geospatial tables on the fly.
ArrowTableTileLoaderGenerates Arrow vector tiles from in-memory Arrow tables.

Formats​

FormatDescription
Map StylesMapLibre and Mapbox style JSON documents.
MVTBinary vector tiles containing geospatial geometry.
TileJSONJSON metadata describing tiled map resources.

Attribution​

The MVTLoader is forked from the Mapbox @mapbox/vector-tile module under the BSD-3-Clause license.

The TableTiler class is a fork of Mapbox / Vladimir Agafonkin's amazing geojson-vt module under ISC License.