Home

GeoJSONVT

GeoJSON-VT is a lightweight JavaScript library for converting GeoJSON data into vector tiles suitable for client-side rendering. It ingests a GeoJSON object and, using a set of options, builds a tile index that can be queried for any tile at a given zoom, x, and y coordinate. It is designed to handle very large GeoJSON datasets efficiently by streaming and indexing features across a tiled grid, rather than decoding the entire dataset for every tile.

It uses a fixed tile extent (default 4096 units) and can clip and simplify geometries to fit

The API provides a factory geojsonvt(geojson, options) that returns an object with a getTile(z, x, y) method.

GeoJSON-VT is used to render dense or large-scale geographic datasets efficiently in browsers without pre-tiling on

tile
boundaries.
Options
include
maxZoom
(maximum
zoom
level
to
index),
indexMaxZoom
(number
of
zoom
levels
to
index
for
faster
tile
retrieval),
indexMaxPoints
(limit
on
point
count
per
feature
before
it
is
indexed),
extent
(tile
extent),
and
buffer
(extra
surrounding
area
around
the
tile
to
avoid
clipping).
A
returned
tile
includes
a
features
array;
each
feature
carries
a
geometry
in
tile
coordinates,
a
type,
and
a
copy
of
original
properties.
This
enables
rendering
with
vector
tile-aware
libraries,
such
as
Mapbox
GL
JS,
Leaflet
with
vector
tiles,
or
other
MVT
consumers.
the
server.
It
is
open-source
and
widely
referenced
in
web
mapping
workflows.