tilestrata-merge
v0.0.4
Published
A TileStrata plugin allowing tiles from multiple layers to be merged with custom logic
Downloads
1
Keywords
Readme
tilestrata-merge
A TileStrata plugin allowing tiles from multiple layers to be merged with custom logic.
Example
var merge = require('tilestrata-merge');
var layer = server.layer('merged-layer', {minZoom: 5, maxZoom: 14});
// .../merged-layer/tile.pbf
layer
.route('tile.pbf')
.use(headers({
'Access-Control-Allow-Origin': '*'
}))
.use(merge({
contentType: 'application/x-protobuf',
layers: [
['layer-1', 't.pbf'],
['layer-2', 't.pbf']
]
merge: function(buffers) {
return Buffer.concat(buffers);
}
}));