Home

Awesome

tilelive-cardboard

build status

Implements the tilelive API for creating mapnik vector tiles from a cardboard datasource.

Initialization

var CardboardTiles = require('tilelive-cardboard');

var config = {
    table: 'geo',
    dataset: 'my-cardboard-dataset',
    bucket: 's3-bucket-for-large-geometries',
    prefix: 's3-prefix-for-large-geometries',
    region: 'region-for-cardboard-data'
};

new CardboardTiles(config, function(err, source) {
    source.getTile(9, 98, 207, function(err, tile) {
        console.log('queried cardboard and got a tile!');
    });
});

// You you can also specify these parameters as a URI:
var uri = 'cardboard://table/dataset/bucket/prefix/region';
new CardboardTiles(uri, function(err, src) { ... });

Assumptions