diff --git a/lib/cartodb/models/mapconfig/adapter/mapconfig-buffer-size-adapter.js b/lib/cartodb/models/mapconfig/adapter/mapconfig-buffer-size-adapter.js index 3296d0ea..7e9e93a1 100644 --- a/lib/cartodb/models/mapconfig/adapter/mapconfig-buffer-size-adapter.js +++ b/lib/cartodb/models/mapconfig/adapter/mapconfig-buffer-size-adapter.js @@ -9,8 +9,13 @@ MapConfigBufferSizeAdapter.prototype.getMapConfig = function (user, requestMapCo return callback(null, requestMapConfig); } + this.formats.forEach(function (format) { if (Number.isFinite(context.templateParams.buffersize[format])) { + if (requestMapConfig.buffersize === undefined) { + requestMapConfig.buffersize = {}; + } + requestMapConfig.buffersize[format] = context.templateParams.buffersize[format]; } }); diff --git a/test/acceptance/buffer-size-format.js b/test/acceptance/buffer-size-format.js index 15be2e66..c32f62d1 100644 --- a/test/acceptance/buffer-size-format.js +++ b/test/acceptance/buffer-size-format.js @@ -283,7 +283,7 @@ describe('buffer size per format for named maps', function () { }); -describe.only('buffer size per format for named maps w/o placeholders', function () { +describe('buffer size per format for named maps w/o placeholders', function () { var testCases = [ { desc: 'should get png tile using buffer-size 0 overriden by template params', @@ -398,7 +398,8 @@ describe.only('buffer size per format for named maps w/o placeholders', function } }, { - desc: 'should get png tile using buffer-size 0 overriden by template params with no buffersize in mapconfig', + desc: 'should get png tile using buffer-size 0' + + ' overriden by template params with no buffersize in mapconfig', coords: { z: 7, x: 64, y: 48 }, format: 'png', placeholders: {