Pass only needed params to tile backend

This commit is contained in:
Daniel García Aubert
2018-03-22 18:27:40 +01:00
parent d3cbd70054
commit 79955c7fac

View File

@@ -543,7 +543,10 @@ function getTile (tileBackend, profileLabel = 'tile') {
req.profiler.start(`windshaft.${profileLabel}`);
const { mapConfigProvider } = res.locals;
const params = getRequestParams(res.locals);
const { token } = res.locals;
const { layer, z, x, y, format } = req.params;
const params = { token, layer, z, x, y, format };
tileBackend.getTile(mapConfigProvider, params, (err, tile, headers, stats = {}) => {
req.profiler.add(stats);