Closed BinLei001 closed 8 months ago
@BinLei001 did you got the solution.same issue also I have when a cluster click need get details how its possible ?
The Clusterer
component is just a simple wrapper and doesn't implement a ref
. You can either use the getExpansionRegion()
property (before v2.0.0 it was getClusterExpansionRegion()
) that is provided for all clusters features in both Clusterer
and useClusterer
, or implement it yourself with the Supercluster
class.
I use Clusterer as React componet. When the point is clicked, if it is a cluster, I need to get all leaves. But Clusterer is a
FunctionComponent
I tried to useref
, failed. So how do I getsuperclusterer
, and then call its method togetLeaves
?