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, maxZoom?: number,
/** /**
* The number of elements per tile needed to start clustering * 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 minNeededElements?: number
} | false, } | false,

View file

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