vectorTilesToGeoJSON(uri, tiles, layers)

Stream GeoJSON from a Mapbox Vector Tile source

parameter type description
uri String

the tilelive URI for the vector tile source to use.

tiles Array

The tiles to read from the tilelive source. Can be:

  • An array of [x, y, z] tiles.
  • A single [x, y, z] tile.
  • A [minx, miny, maxx, maxy] bounding box
  • Omitted (will attempt to read entire extent of the tile source.
layers Array

The layers to read from the tiles. If empty, read all layers.

Returns

ReadableStream<Feature> :

A stream of GeoJSON Feature objects. Emits 'warning' events with { tile, error } when a tile from the requested set is not found.