Feature: second iteration of clustering

This commit is contained in:
Pieter Vander Vennet 2025-07-21 22:02:04 +02:00
parent 8360ab9a8b
commit 5bc8f11d24
3 changed files with 25 additions and 5 deletions

View file

@ -351,7 +351,6 @@ export default class ShowDataLayer {
drawLines?: true | boolean
}
) {
console.trace("Creating a data layer for", options.layer.id)
this._options = options
this.onDestroy.push(map.addCallbackAndRunD((map) => this.initDrawFeatures(map)))
}
@ -397,7 +396,8 @@ export default class ShowDataLayer {
const clustering = new ClusteringFeatureSource(feats, state.mapProperties.zoom.map(z => z + 2),
options.layer.id,
{
cutoff: 5
cutoff: 2,
showSummaryAt: "tilecenter"
})
new ShowDataLayer(mlmap, {
features: clustering.summaryPoints,