diff --git a/lib/cartodb/controllers/map.js b/lib/cartodb/controllers/map.js index c314039a..baed016d 100644 --- a/lib/cartodb/controllers/map.js +++ b/lib/cartodb/controllers/map.js @@ -16,7 +16,7 @@ var Datasource = windshaft.model.Datasource; var NamedMapsCacheEntry = require('../cache/model/named_maps_entry'); var MapConfigNamedLayersAdapter = require('../models/mapconfig_named_layers_adapter'); -var MapConfigAnalysisLayersAdapter = require('../models/mapconfig_analysis_layers_adapter'); +var AnalysisMapConfigAdapter = require('../models/analysis_mapconfig_adapter'); var NamedMapMapConfigProvider = require('../models/mapconfig/named_map_provider'); var CreateLayergroupMapConfigProvider = require('../models/mapconfig/create_layergroup_provider'); var MapConfigOverviewsAdapter = require('../models/mapconfig_overviews_adapter'); @@ -48,7 +48,7 @@ function MapController(authApi, pgConnection, templateMaps, mapBackend, metadata this.userLimitsApi = userLimitsApi; this.layergroupAffectedTables = layergroupAffectedTables; - this.analysisLayersAdapter = new MapConfigAnalysisLayersAdapter(); + this.analysisMapConfigAdapter = new AnalysisMapConfigAdapter(); this.namedLayersAdapter = new MapConfigNamedLayersAdapter(templateMaps); this.overviewsAdapter = new MapConfigOverviewsAdapter(this.overviewsMetadataApi); } @@ -154,7 +154,7 @@ MapController.prototype.create = function(req, res, prepareConfigFn) { apiKey: req.params.api_key } }; - self.analysisLayersAdapter.getLayers(analysisConfiguration, requestMapConfig, this); + self.analysisMapConfigAdapter.getLayers(analysisConfiguration, requestMapConfig, this); }, function beforeLayergroupCreate(err, requestMapConfig) { assert.ifError(err); diff --git a/lib/cartodb/models/mapconfig_analysis_layers_adapter.js b/lib/cartodb/models/analysis_mapconfig_adapter.js similarity index 91% rename from lib/cartodb/models/mapconfig_analysis_layers_adapter.js rename to lib/cartodb/models/analysis_mapconfig_adapter.js index de3ea242..99d34f5a 100644 --- a/lib/cartodb/models/mapconfig_analysis_layers_adapter.js +++ b/lib/cartodb/models/analysis_mapconfig_adapter.js @@ -4,11 +4,11 @@ var camshaft = require('camshaft'); var dot = require('dot'); dot.templateSettings.strip = false; -function MapConfigAnalysisLayersAdapter(templateMaps) { +function AnalysisMapConfigAdapter(templateMaps) { this.templateMaps = templateMaps; } -module.exports = MapConfigAnalysisLayersAdapter; +module.exports = AnalysisMapConfigAdapter; var SKIP_COLUMNS = { 'the_geom': true, @@ -34,7 +34,7 @@ function shouldAdaptLayers(requestMapConfig) { Array.isArray(requestMapConfig.analyses) && requestMapConfig.analyses.length > 0; } -MapConfigAnalysisLayersAdapter.prototype.getLayers = function(analysisConfiguration, requestMapConfig, callback) { +AnalysisMapConfigAdapter.prototype.getLayers = function(analysisConfiguration, requestMapConfig, callback) { if (!shouldAdaptLayers(requestMapConfig)) { return callback(null, requestMapConfig);