Closed i-mighty closed 2 years ago
I would love the points to be updated whenever the mapPoints or region changes. ATM, neither seems to work
@i-mighty When region change, the cluster get recalculated, that's why you have to listen to onRegionChange
on the MapView. About the points I can't confirm but I guess it works the same way
I just double-checked and updates on both values seem to be working just fine in the example project. Make sure that you are actually updating those values or post a reproducible demo.
Below is how I'm using the useClusterer hook
const [points, supercluster] = useClusterer(mapPoints, MAP_DIMENSIONS, region, { minPoints: 5, extent: 1000 });
mapPoint is a state. I expect the clusterer to reload the cluster points when mapPoint changes but that doesn't happen.