Add overviews metadata to MapController instantiateTemplate
As in MapController create.
This commit is contained in:
@@ -193,7 +193,6 @@ MapController.prototype.create = function(req, res, prepareConfigFn) {
|
||||
};
|
||||
|
||||
MapController.prototype.instantiateTemplate = function(req, res, prepareParamsFn) {
|
||||
// TODO: use addOverviewsInformation as in create
|
||||
var self = this;
|
||||
|
||||
var cdbuser = req.context.user;
|
||||
@@ -224,7 +223,23 @@ MapController.prototype.instantiateTemplate = function(req, res, prepareParamsFn
|
||||
);
|
||||
mapConfigProvider.getMapConfig(this);
|
||||
},
|
||||
function createLayergroup(err, mapConfig_, rendererParams/*, context*/) {
|
||||
function addOverviewsInformation(err, requestMapConfig, rendererParams/*, context*/) {
|
||||
assert.ifError(err);
|
||||
var next = this;
|
||||
self.overviewsAdapter.getLayers(req.context.user, requestMapConfig.layers,
|
||||
function(err, layers) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
if (layers) {
|
||||
requestMapConfig.layers = layers;
|
||||
}
|
||||
return next(null, requestMapConfig, rendererParams);
|
||||
}
|
||||
);
|
||||
},
|
||||
function createLayergroup(err, mapConfig_, rendererParams) {
|
||||
assert.ifError(err);
|
||||
mapConfig = mapConfig_;
|
||||
self.mapBackend.createLayergroup(
|
||||
|
||||
Reference in New Issue
Block a user