Skip to content

Commit

Permalink
upgrade Supercluster to v7.1.2, uncap clusterMaxRadius
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Jan 19, 2021
1 parent 07179fe commit 583e09f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"potpack": "^1.0.1",
"quickselect": "^2.0.0",
"rw": "^1.3.3",
"supercluster": "^7.1.0",
"supercluster": "^7.1.2",
"tinyqueue": "^2.0.3",
"vt-pbf": "^3.1.1"
},
Expand Down
4 changes: 1 addition & 3 deletions src/source/geojson_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ class GeoJSONSource extends Evented implements Source {
generateId: options.generateId || false
},
superclusterOptions: {
maxZoom: options.clusterMaxZoom !== undefined ?
Math.min(options.clusterMaxZoom, this.maxzoom - 1) :
(this.maxzoom - 1),
maxZoom: options.clusterMaxZoom !== undefined ? options.clusterMaxZoom : this.maxzoom - 1,
minPoints: Math.max(2, options.clusterMinPoints || 2),
extent: EXTENT,
radius: (options.clusterRadius || 50) * scale,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10295,10 +10295,10 @@ sugarss@^2.0.0:
dependencies:
postcss "^7.0.2"

supercluster@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/supercluster/-/supercluster-7.1.0.tgz#f0a457426ec0ab95d69c5f03b51e049774b94479"
integrity sha512-LDasImUAFMhTqhK+cUXfy9C2KTUqJ3gucLjmNLNFmKWOnDUBxLFLH9oKuXOTCLveecmxh8fbk8kgh6Q0gsfe2w==
supercluster@^7.1.2:
version "7.1.2"
resolved "https://registry.yarnpkg.com/supercluster/-/supercluster-7.1.2.tgz#cf02a60283a0118212024f3bf02e4e63bb148e2c"
integrity sha512-bGA0pk3DYMjLTY1h+rbh0imi/I8k/Lg0rzdBGfyQs0Xkiix7jK2GUmH1qSD8+jq6U0Vu382QHr3+rbbiHqdKJA==
dependencies:
kdbush "^3.0.0"

Expand Down

0 comments on commit 583e09f

Please sign in to comment.