Unify getMapConfig signature for overviews adapter
This commit is contained in:
@@ -182,7 +182,8 @@ MapController.prototype.create = function(req, res, prepareConfigFn) {
|
||||
function addOverviewsInformation(err, requestMapConfig, datasource) {
|
||||
assert.ifError(err);
|
||||
var next = this;
|
||||
self.overviewsAdapter.getMapConfig(req.context.user, requestMapConfig, analysesResults,
|
||||
context.analysesResults = analysesResults;
|
||||
self.overviewsAdapter.getMapConfig(req.context.user, requestMapConfig, req.params, context,
|
||||
function(err, requestMapConfig) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
|
||||
@@ -9,10 +9,11 @@ function MapConfigOverviewsAdapter(overviewsMetadataApi, filterStatsApi) {
|
||||
|
||||
module.exports = MapConfigOverviewsAdapter;
|
||||
|
||||
MapConfigOverviewsAdapter.prototype.getMapConfig = function(user, requestMapConfig, analysesResults, callback) {
|
||||
MapConfigOverviewsAdapter.prototype.getMapConfig = function(user, requestMapConfig, params, context, callback) {
|
||||
var self = this;
|
||||
|
||||
var layers = requestMapConfig.layers;
|
||||
var analysesResults = context.analysesResults;
|
||||
|
||||
if (!layers || layers.length === 0) {
|
||||
return callback(null, requestMapConfig);
|
||||
|
||||
@@ -139,8 +139,8 @@ NamedMapMapConfigProvider.prototype.getMapConfig = function(callback) {
|
||||
function addOverviewsInformation(err, _mapConfig, datasource) {
|
||||
assert.ifError(err);
|
||||
var next = this;
|
||||
|
||||
self.overviewsAdapter.getMapConfig(self.owner, _mapConfig, self.analysesResults, function(err, _mapConfig) {
|
||||
context.analysesResults = self.analysesResults;
|
||||
self.overviewsAdapter.getMapConfig(self.owner, _mapConfig, rendererParams, context, function(err, _mapConfig) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user