forked from MapComplete/MapComplete
Feature: second iteration of clustering
This commit is contained in:
parent
8360ab9a8b
commit
5bc8f11d24
3 changed files with 25 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue