This commit is contained in:
Javier Goizueta 2016-01-20 13:12:45 +01:00
parent 4ca8ecf64c
commit 3dad225568

View File

@ -8,6 +8,7 @@ function MapConfigNamedLayersAdapter(overviewsApi) {
module.exports = MapConfigNamedLayersAdapter;
MapConfigNamedLayersAdapter.prototype.getLayers = function(username, layers, callback) {
var self = this;
if (!layers) {
return callback(null);
@ -16,7 +17,7 @@ MapConfigNamedLayersAdapter.prototype.getLayers = function(username, layers, cal
var augmentLayersQueue = queue(layers.length);
function augmentLayer(layer, done) {
this.overviewsApi.getOverviewsMetadata(username, layer.options.sql, function(err, metadata){
self.overviewsApi.getOverviewsMetadata(username, layer.options.sql, function(err, metadata){
if ( !_.isEmpty(metadata) ) {
layer = _.extend({}, layer, { overviews: metadata });
}