Use aggregation-mapconfig's method to discover columns to be exposed used to aggregate
This commit is contained in:
parent
d42257127b
commit
9a1bc51fdb
@ -101,18 +101,13 @@ module.exports = class AggregationMapConfigAdapter {
|
||||
aggregationSql = sqlQueryWrap.replace(/<%=\s*sql\s*%>/g, aggregationSql);
|
||||
}
|
||||
|
||||
if (!mapConfig.isDefaultLayerAggregation(index)) {
|
||||
layer.options.sql = aggregationSql;
|
||||
return resolve({ layer, index, adapted: shouldAdapt });
|
||||
}
|
||||
|
||||
const skipGeoms = true;
|
||||
mapConfig.getLayerColumns(index, skipGeoms, (err, columns) => {
|
||||
mapConfig.getLayerAggregationColumns(index, (err, columns) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
layer.options.sql = aggregationSql;
|
||||
layer.options.columns = columns;
|
||||
|
||||
return resolve({ layer, index, adapted: shouldAdapt });
|
||||
|
Loading…
Reference in New Issue
Block a user