Rename adapter
This commit is contained in:
parent
1535820d4f
commit
3f41f19ab9
@ -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);
|
||||
|
@ -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);
|
Loading…
Reference in New Issue
Block a user