Include the layers metadata into the layergroup object
This commit is contained in:
parent
525c0f2afa
commit
568d6b5458
@ -372,8 +372,8 @@ MapController.prototype.afterLayergroupCreate = function(req, res, mapconfig, la
|
||||
return next(err);
|
||||
}
|
||||
if (layersStats) {
|
||||
res.metadata = res.metadata || {};
|
||||
res.metadata.layers = layersStats;
|
||||
layergroup.metadata = layergroup.metadata || {};
|
||||
layergroup.metadata.layers = layersStats;
|
||||
|
||||
// backwards compatibility for torque
|
||||
var torqueMetadata = layersStats.reduce(function(acc, layer, layerId) {
|
||||
@ -383,7 +383,7 @@ MapController.prototype.afterLayergroupCreate = function(req, res, mapconfig, la
|
||||
return acc;
|
||||
}, {});
|
||||
if (Object.keys(torqueMetadata).length) {
|
||||
res.metadata.torque = torqueMetadata;
|
||||
layergroup.metadata.torque = torqueMetadata;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user