Make clustering less aggressive

This commit is contained in:
pietervdvn 2022-01-27 01:23:51 +01:00
parent 83eb030c5c
commit dd81ed8987
2 changed files with 3 additions and 3 deletions

View file

@ -216,7 +216,7 @@ export interface LayoutConfigJson {
maxZoom?: number,
/**
* The number of elements per tile needed to start clustering
* If clustering is defined, defaults to 25
* If clustering is defined, defaults to 250
*/
minNeededElements?: number
} | false,

View file

@ -120,7 +120,7 @@ export default class LayoutConfig {
this.clustering = {
maxZoom: 16,
minNeededElements: 25,
minNeededElements: 250,
};
if (json.clustering === false) {
this.clustering = {
@ -130,7 +130,7 @@ export default class LayoutConfig {
} else if (json.clustering) {
this.clustering = {
maxZoom: json.clustering.maxZoom ?? 18,
minNeededElements: json.clustering.minNeededElements ?? 25,
minNeededElements: json.clustering.minNeededElements ?? 250,
}
}