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);
|
aggregationSql = sqlQueryWrap.replace(/<%=\s*sql\s*%>/g, aggregationSql);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mapConfig.isDefaultLayerAggregation(index)) {
|
layer.options.sql = aggregationSql;
|
||||||
layer.options.sql = aggregationSql;
|
|
||||||
return resolve({ layer, index, adapted: shouldAdapt });
|
|
||||||
}
|
|
||||||
|
|
||||||
const skipGeoms = true;
|
mapConfig.getLayerAggregationColumns(index, (err, columns) => {
|
||||||
mapConfig.getLayerColumns(index, skipGeoms, (err, columns) => {
|
|
||||||
if (err) {
|
if (err) {
|
||||||
return reject(err);
|
return reject(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
layer.options.sql = aggregationSql;
|
|
||||||
layer.options.columns = columns;
|
layer.options.columns = columns;
|
||||||
|
|
||||||
return resolve({ layer, index, adapted: shouldAdapt });
|
return resolve({ layer, index, adapted: shouldAdapt });
|
||||||
|
Loading…
Reference in New Issue
Block a user