From 2068861988f443754adac52882fbd8aab90ffab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Mon, 18 Dec 2017 18:24:09 +0100 Subject: [PATCH] Add PLACEMENT default getter --- .../models/aggregation/aggregation-map-config.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/cartodb/models/aggregation/aggregation-map-config.js b/lib/cartodb/models/aggregation/aggregation-map-config.js index b2c3b60e..2c1781c4 100644 --- a/lib/cartodb/models/aggregation/aggregation-map-config.js +++ b/lib/cartodb/models/aggregation/aggregation-map-config.js @@ -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);