Add PLACEMENT default getter
This commit is contained in:
@@ -2,10 +2,6 @@ const MapConfig = require('windshaft').model.MapConfig;
|
||||
const aggregationQuery = require('./aggregation-query');
|
||||
|
||||
module.exports = class AggregationMapConfig extends MapConfig {
|
||||
static get THRESHOLD () {
|
||||
return 1e5; // 100K
|
||||
}
|
||||
|
||||
static get PLACEMENTS () {
|
||||
return [
|
||||
'centroid',
|
||||
@@ -14,6 +10,14 @@ module.exports = class AggregationMapConfig extends MapConfig {
|
||||
];
|
||||
}
|
||||
|
||||
static get PLACEMENT () {
|
||||
return AggregationMapConfig.PLACEMENTS[0];
|
||||
}
|
||||
|
||||
static get THRESHOLD () {
|
||||
return 1e5; // 100K
|
||||
}
|
||||
|
||||
constructor (config, datasource) {
|
||||
super(config, datasource);
|
||||
|
||||
@@ -25,7 +29,7 @@ module.exports = class AggregationMapConfig extends MapConfig {
|
||||
const {
|
||||
resolution = 1,
|
||||
threshold = AggregationMapConfig.THRESHOLD,
|
||||
placement = 'centroid',
|
||||
placement = AggregationMapConfig.PLACEMENT,
|
||||
columns = {},
|
||||
dimmensions = {}
|
||||
} = this.getAggregation(index);
|
||||
|
||||
Reference in New Issue
Block a user