Redefine aggregation torque to match Torque
Now the resolution aggregation parameter has the same meaning as in Torque (-torque-resolution in CartoCSS)
This commit is contained in:
parent
9d8ce6bc44
commit
f95c310462
@ -19,13 +19,14 @@ const templateForOptions = (options) => {
|
||||
/**
|
||||
* Generates an aggregation query given the aggregation options:
|
||||
* - query
|
||||
* - resolution
|
||||
* - resolution - defined as in torque:
|
||||
* aggregation cell is resolution*resolution pixels, where tiles are always 256x256 pixels
|
||||
* - columns
|
||||
* - placement
|
||||
*/
|
||||
const queryForOptions = (options) => templateForOptions(options)({
|
||||
sourceQuery: options.query,
|
||||
res: options.resolution,
|
||||
res: 256/options.resolution,
|
||||
columns: options.columns
|
||||
});
|
||||
|
||||
|
@ -6,7 +6,7 @@ module.exports = class Aggregation {
|
||||
}
|
||||
|
||||
constructor (mapconfig, query, {
|
||||
resolution = 256,
|
||||
resolution = 1,
|
||||
threshold = Aggregation.THRESHOLD,
|
||||
placement = 'centroid',
|
||||
columns = {}
|
||||
|
Loading…
Reference in New Issue
Block a user