tilelive 0,1 eslint travis-ci npm

fast interface to tiles with pluggable backends

3 years after


Build Status Coverage Status

  • Tilelive is a module to help interactions between tilelive source modules.
  • A tilelive source is an interface implemented by node modules that deal with reading and writing map tiles.

Awesome tilelive modules

Ecosytem of tilelive



Tilelive doesn't ship with any implementing modules by default. To register a module as one tilelive recognizes:

  • tilelive.list(source, callback): Lists all tilesets in a directory. source is a folder that is used by registered implementations to search for individual tilesets. callback receives an error object (or null) and a hash hash with keys being Tilestore IDs and values being Tilestore URIs. Example:
    "world-light": "mbtiles:///path/to/file/world-light.mbtiles",
    "mapquest": "tilejson:///path/to/file/mapquest.tilejson"
  • tilelive.findID(source, id, callback): Looks for a particular tileset ID in a directory. callback receives an error object (or null) and the URI of the tileset.

  • tilelive.load(uri, callback): Loads the Tilestore object associated with the specified uri. callback receives an error object (or null) and the Tilestore object.

  • tilelive.info(uri, callback): Loads the Tilestore object associated with the specified uri and retrieves its metadata in a TileJSON compliant format. callback receives an error object (or null), the metadata hash and the Tilestore object.

  • tilelive.all(source, callback): Loads metadata in a TileJSON compliant format for all tilesets in the source directory. callback receives an error object (or null) and an array with TileJSON metadata about each tileset in that directory.

  • tilelive.verify(tilejson): Validates a TileJSON object and returns error objects for invalid entries.

Read/write streams

Tilelive provides an implementation of node object streams for copying tiles from one source to another.

// Copy all tiles and metadata from source A to source B.
var get = tilelive.createReadStream(sourceA);
var put = tilelive.createWriteStream(sourceB);
put.on('finish', function() {

See tilelive-copy and the streams tests for example usage of copy streams.

Parallel read streams

Tilelive can split a read operation into an arbitrary number of jobs. Pass a job parameter to options when using tilelive.createReadStream or tilelive.deserialize:

var readable = tilelive.createReadStream(src, { type: 'scanline', job: { total: 4, num: 1 } });

This instructs tilelive to only read tiles that would fall into job 1 of 4. A complete read would mean four calls each with a different num.


tilelive can be used to copy data between tilestores. For a full list of options, run tilelive-copy.


To run the tests

npm test

Related Repositories



awesome implementations of the Mapbox Vector Tile specification ...



A tilelive-based tile server. ...



Mapnik vector tile-based geocoder with support for swappable data sources ...



Wikipedia Maps Tile Server ...

Top Contributors

yhahn tmcw kkaefer rclark springmeyer GretaCB jakepruitt flippmoke tomhughes willwhite dmitrig01 jingsam sbma44 mojodna anandthakker gravitystorm bwhtmn JasonSanford mick robpvn garnertb nyurik


package version
minimist ~0.2.0
progress-stream ~0.5.x
@mapbox/sphericalmercator ~1.0.1
queue-async ~1.0.7
dev concat-stream 1.4.x
coveralls ~2.11.1
eslint ^0.24.0
istanbul ~0.3.0
@mapbox/mbtiles ~0.9.0
stream-combiner ^0.2.2
tape 2.13.3
@mapbox/tilejson ~1.0.4


-   v5.12.2 zip tar
-   v5.12.1 zip tar
-   v5.12.0 zip tar
-   v5.11.0 zip tar
-   v5.10.0 zip tar
-   v5.9.1 zip tar
-   v5.9.0 zip tar
-   v5.8.3 zip tar
-   v5.8.2 zip tar
-   v5.8.1 zip tar
-   v5.8.0 zip tar
-   v5.7.1 zip tar
-   v5.7.0 zip tar
-   v5.6.3 zip tar
-   v5.6.2 zip tar
-   v5.6.1 zip tar
-   v5.6.0 zip tar
-   v5.5.4 zip tar
-   v5.5.3 zip tar
-   v5.5.2 zip tar
-   v5.5.1 zip tar
-   v5.5.0 zip tar
-   v5.4.1 zip tar
-   v5.4.0 zip tar
-   v5.3.3 zip tar
-   v5.3.2 zip tar
-   v5.3.1 zip tar
-   v5.3.0 zip tar
-   v5.2.3 zip tar
-   v5.2.2 zip tar