Skip to main content


Loader for the Mapbox Vector Tile format for representation of geometry.

File Extension.mvt,
File TypeBinary
File FormatMapbox Vector Tile
Data FormatGeometry
Supported APIsload, parse, parseSync


import {MVTLoader} from '';
import {load} from '';

// GeoJSON objects containing local coordinates decoded from tile origin to a range of [0 - (bufferSize / tileExtent), 1 + (bufferSize / tileExtent)]
const geometryData = await load(url, MVTLoader);

// Array containing GeoJSON Features
const loaderOptions = {
mvt: {
coordinates: 'wgs84',
tileIndex: {
x: 0,
y: 0,
z: 0

const geoJSONfeatures = await load(url, MVTLoader, loaderOptions);



The parser will return an array of GeoJSON objects with WGS84 coordinates and feature properties from MVT if coordinates property is set to wgs84 and tileIndex properties are present.

import {MVTLoader} from '';
import {load} from '';

const geoJSONfeatures = await load(url, MVTLoader, {
mvt: {
coordinates: 'wgs84',
tileIndex: {
x: xTileIndex,
y: yTileIndex,
z: zTileIndex

GeoJSON with local coordinates

The parser will return an array of GeoJSON objects with local coordinates in a range from 0 to 1 and feature properties from MVT by default.

Even though tile coordinates go from 0 to 1, there can be some negative (or greater than one) coordinates because of buffer cells within MVT to handle geometry clipping. That difference can be as much as bufferSize / tileExtent depending on MVT creation parameters.

Note that local coordinates are relative to tile origin, which is in the top left.

import {MVTLoader} from '';
import {load} from '';

const geoJSONfeatures = await load(url, MVTLoader);

* Default loader options are:
* {
* mvt: {
* coordinates: 'local'
* }
* }


mvt.shape`'geojson'binarygeojson: returns GeoJSON objects. binary: returns binary data.
mvt.coordinates`'local'localwgs84: returns coordinates in longitude, latitude using the provided tile index. local returns local 0-1 coordinates relative to the tile origin.
mvt.tileIndex{x: number, y: number, z: number}N/AWhen the wgs84 coordinates option, the index of the tile being loaded (x, y, z) must be supplied.
mvt.layerPropertystring | null'layerName'When non-null, the layer name of each feature is added to[layerProperty]. If null, a layer name property will not be added.
mvt.layersstring[]N/AIf provided, only features belonging to the named layers will be included, otherwise features from all layers are returned.

If you want to know more about how geometries are encoded into MVT tiles, please read this documentation section.


The MVTLoader is a fork of @mapbox/vector-tile module under the BSD-3-Clause.