Minor bugfix

This commit is contained in:
Petr Sloup 2016-12-06 22:04:20 +01:00
parent becb46ab80
commit d330a9743c

View file

@ -77,6 +77,7 @@ module.exports = function(options, repo, params, id, styles) {
return res.status(404).send('Not found'); return res.status(404).send('Not found');
} else { } else {
if (tileJSON['format'] == 'pbf') { if (tileJSON['format'] == 'pbf') {
data = zlib.unzipSync(data);
var style = req.query.style; var style = req.query.style;
if (style && tileshrinkGl) { if (style && tileshrinkGl) {
if (!shrinkers[style]) { if (!shrinkers[style]) {
@ -95,7 +96,7 @@ module.exports = function(options, repo, params, id, styles) {
} }
} }
if (shrinkers[style]) { if (shrinkers[style]) {
data = shrinkers[style](zlib.unzipSync(data), z, tileJSON.maxzoom); data = shrinkers[style](data, z, tileJSON.maxzoom);
//console.log(shrinkers[style].getStats()); //console.log(shrinkers[style].getStats());
} }
} }