Mapconfig only support object for the buffer-size property
This commit is contained in:
parent
2f4e4246a4
commit
332a56b736
3
.gitignore
vendored
3
.gitignore
vendored
@ -8,6 +8,5 @@ tools/munin/windshaft.conf
|
|||||||
logs/
|
logs/
|
||||||
pids/
|
pids/
|
||||||
redis.pid
|
redis.pid
|
||||||
test.log
|
*.log
|
||||||
npm-debug.log
|
|
||||||
coverage/
|
coverage/
|
||||||
|
@ -479,9 +479,7 @@ TemplateMaps.prototype.instance = function(template, params) {
|
|||||||
// NOTE: we're deep-cloning the layergroup here
|
// NOTE: we're deep-cloning the layergroup here
|
||||||
var layergroup = JSON.parse(JSON.stringify(template.layergroup));
|
var layergroup = JSON.parse(JSON.stringify(template.layergroup));
|
||||||
|
|
||||||
if (typeof layergroup.buffersize === 'string') {
|
if (layergroup.buffersize && isObject(layergroup.buffersize)) {
|
||||||
layergroup.buffersize = parseInt(_replaceVars(layergroup.buffersize, all_params), 10);
|
|
||||||
} else if (isObject(layergroup.buffersize)) {
|
|
||||||
Object.keys(layergroup.buffersize).forEach(function(k) {
|
Object.keys(layergroup.buffersize).forEach(function(k) {
|
||||||
layergroup.buffersize[k] = parseInt(_replaceVars(layergroup.buffersize[k], all_params), 10);
|
layergroup.buffersize[k] = parseInt(_replaceVars(layergroup.buffersize[k], all_params), 10);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user