Generic MapConfig adapter can receive an arbitrary number of adapters

This commit is contained in:
Raul Ochoa
2016-05-26 11:02:43 +02:00
parent 730486b27b
commit 2ff33b5010
2 changed files with 4 additions and 4 deletions
@@ -1,7 +1,7 @@
'use strict';
function MapConfigAdapter(adapters) {
this.adapters = adapters;
function MapConfigAdapter() {
this.adapters = Array.apply(null, arguments);
}
module.exports = MapConfigAdapter;
+2 -2
View File
@@ -156,13 +156,13 @@ module.exports = function(serverOptions) {
var turboCartoParser = new TurboCartoParser(pgQueryRunner);
var mapConfigAdapter = new MapConfigAdapter([
var mapConfigAdapter = new MapConfigAdapter(
new MapConfigNamedLayersAdapter(templateMaps, pgConnection),
new SqlWrapMapConfigAdapter(),
new AnalysisMapConfigAdapter(analysisBackend),
new MapConfigOverviewsAdapter(overviewsMetadataApi, filterStatsApi),
new TurboCartoAdapter(turboCartoParser)
]);
);
var namedMapProviderCache = new NamedMapProviderCache(
templateMaps,