Skip to content

Commit

Permalink
fix: allow configuration of radius (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoehnelt authored Sep 30, 2021
1 parent 9411b35 commit 8a8a0f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/algorithms/supercluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ export type SuperClusterOptions = SuperCluster.Options<
export class SuperClusterAlgorithm extends AbstractAlgorithm {
protected superCluster: SuperCluster;
protected markers: google.maps.Marker[];
constructor({ maxZoom, ...options }: SuperClusterOptions) {
constructor({ maxZoom, radius = 60, ...options }: SuperClusterOptions) {
super({ maxZoom });

this.superCluster = new SuperCluster({
maxZoom: this.maxZoom,
radius: 60,
radius,
...options,
});
}
Expand Down

0 comments on commit 8a8a0f0

Please sign in to comment.