Add missing aggregation columns to ST_AsMVT
Aggregation results always should have the cartodb_id and the feature count
This commit is contained in:
parent
3d36802686
commit
e8cd6856b5
@ -171,6 +171,8 @@ module.exports = class AggregationMapConfig extends MapConfig {
|
||||
_getLayerAggregationRequiredColumns (index) {
|
||||
const { columns, dimensions } = this.getAggregation(index);
|
||||
|
||||
let finalColumns = ['cartodb_id', '_cdb_feature_count'];
|
||||
|
||||
let aggregatedColumns = [];
|
||||
if (columns) {
|
||||
aggregatedColumns = Object.keys(columns);
|
||||
@ -181,7 +183,7 @@ module.exports = class AggregationMapConfig extends MapConfig {
|
||||
dimensionsColumns = Object.keys(dimensions);
|
||||
}
|
||||
|
||||
return removeDuplicates(aggregatedColumns.concat(dimensionsColumns));
|
||||
return removeDuplicates(finalColumns.concat(aggregatedColumns).concat(dimensionsColumns));
|
||||
}
|
||||
|
||||
doesLayerReachThreshold(index, featureCount) {
|
||||
|
Loading…
Reference in New Issue
Block a user