Be able to aggregate by a field
This commit is contained in:
@@ -43,7 +43,7 @@ module.exports = class AggregatedFeaturesLayergroupController {
|
||||
authorize(this.authBackend),
|
||||
dbConnSetup(this.pgConnection),
|
||||
rateLimit(this.userLimitsBackend, RATE_LIMIT_ENDPOINTS_GROUPS.ATTRIBUTES),
|
||||
cleanUpQueryParams(),
|
||||
cleanUpQueryParams([ 'aggregation' ]),
|
||||
createMapStoreMapConfigProvider(
|
||||
this.mapStore,
|
||||
this.userLimitsBackend,
|
||||
@@ -67,11 +67,13 @@ function getClusteredFeatures (clusterBackend) {
|
||||
const { user, token } = res.locals;
|
||||
const { dbuser, dbname, dbpassword, dbhost, dbport } = res.locals;
|
||||
const { layer, z: zoom, clusterId } = req.params;
|
||||
const { aggregation } = req.query;
|
||||
|
||||
const params = {
|
||||
user, token,
|
||||
dbuser, dbname, dbpassword, dbhost, dbport,
|
||||
layer, zoom, clusterId
|
||||
layer, zoom, clusterId,
|
||||
aggregation
|
||||
};
|
||||
|
||||
clusterBackend.getClusterFeatures(mapConfigProvider, params, (err, features, stats = {}) => {
|
||||
|
||||
Reference in New Issue
Block a user