forked from MapComplete/MapComplete
More work on clustering, more or less finished
This commit is contained in:
parent
a3c16d6297
commit
215aebce19
8 changed files with 276 additions and 185 deletions
|
@ -129,17 +129,12 @@ export default class LayoutConfig {
|
|||
|
||||
this.clustering = {
|
||||
maxZoom: 16,
|
||||
minNeededElements: 500
|
||||
minNeededElements: 25
|
||||
};
|
||||
if (json.clustering) {
|
||||
this.clustering = {
|
||||
maxZoom: json.clustering.maxZoom ?? 18,
|
||||
minNeededElements: json.clustering.minNeededElements ?? 1
|
||||
}
|
||||
for (const layer of this.layers) {
|
||||
if (layer.wayHandling !== LayerConfig.WAYHANDLING_CENTER_ONLY) {
|
||||
console.debug("WARNING: In order to allow clustering, every layer must be set to CENTER_ONLY. Layer", layer.id, "does not respect this for layout", this.id);
|
||||
}
|
||||
minNeededElements: json.clustering.minNeededElements ?? 25
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue