You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the markers used for the cluster glitch when zooming in or out. I believe this is due to a change in the cluster id, which therefore forces a re render, also because I cannot therefore take advantage of the benefits of react.memo. Why this strange behavior of the cluster id? and how to avoid the problem?
The text was updated successfully, but these errors were encountered:
I came across the same issue. The cluster_id kept changing with different zoom levels, but stable while just moving the map, even if the cluster marker was memoized. As far as I understand supercluster, this is the intended algorithm - the zoom level is encoded in the cluster id. Which makes sense to me.
Now, I'm not sure if this is the correct way, but it seems to work if I use item.geometry.coordinates[0], item.geometry.coordinates[1] and item.properties.point_count instead of the cluster id for the memo keys as well as the cluster marker key.
Registrazione.schermo.2024-05-03.alle.15.22.55.mov
I noticed that the markers used for the cluster glitch when zooming in or out. I believe this is due to a change in the cluster id, which therefore forces a re render, also because I cannot therefore take advantage of the benefits of react.memo. Why this strange behavior of the cluster id? and how to avoid the problem?
The text was updated successfully, but these errors were encountered: