@mapbox/tileset-thumb
v0.0.1
Published
![travis](https://travis-ci.org/mapbox/tileset-thumb.svg?branch=master)
Downloads
3
Maintainers
Keywords
Readme
Maintainer: @yhahn
tileset-thumb
Pipe a tileset's tilelive stream into tileset-thumb
to generate a PNG thumbnail summarizing coverage of that tileset's tiles.
Example usage:
const Mbtiles = require('mbtiles');
const createThumb = require('tileset-thumb').createThumb;
const fs = require('fs');
new Mbtiles('./some.mbtiles', (err, source) => {
if (err) throw err;
// Create a ZXY stream from an mbtiles file
source.createZXYStream()
// Pipe the stream to tileset-thumb
.pipe(createThumb({ zxy: true }))
// Pipe the resulting PNG to a file
.pipe(fs.createWriteStream('./some.thumb.png'));
});