Merge branch 'fix-buffersize-undefined-in-mapconfig' into 664-layergroup-stats

This commit is contained in:
Daniel García Aubert
2017-05-18 15:58:12 +02:00
4 changed files with 28 additions and 2 deletions
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## 3.7.1
Released 2017-mm-dd
## 3.7.0
Released 2017-05-18
@@ -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];
}
});
+1 -1
View File
@@ -1,7 +1,7 @@
{
"private": true,
"name": "windshaft-cartodb",
"version": "3.7.0",
"version": "3.7.1",
"description": "A map tile server for CartoDB",
"keywords": [
"cartodb"
+18 -1
View File
@@ -396,7 +396,24 @@ describe('buffer size per format for named maps w/o placeholders', function () {
assert: function (tile, callback) {
assert.utfgridEqualsFile(tile, this.fixturePath, 2, callback);
}
}
},
{
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: {
buffersize: {
png: 0
}
},
fixturePath: './test/fixtures/buffer-size/tile-7.64.48-buffer-size-0.png',
template: createBufferSizeTemplate('named-no-buffer-size-mapconfig-png-0', undefined, {}),
assert: function (tile, callback) {
assert.imageIsSimilarToFile(tile, this.fixturePath, IMAGE_TOLERANCE_PER_MIL, callback);
}
},
];
testCases.forEach(function (test) {