Description
Hi,
I don't know if it is the default behavior, but both methods, onBeforeClusterItemRendered and onBeforeClusterRendered, are called every time that I zoom out the map, even when there are not clusters or items visible. Is there a way to just renderer the visible clusters and items?
I have a map with 1000 items, and every item has his own image, so I need to render only the visible elements.
Thanks!
From duplicate issue #82, from @kaads123:
Summary:
ClusterManager draws all the markers/clusters, not only visible ones. It should draw only those that are in visibleRegion. This causes a map with 2000 markers skip frames and ANR (even on new devices) when zooming in/out.
Steps to reproduce:
Add 2000 or more markers and try zooming in and zooming out fast. This can be reproduced in the sample app
Expected behavior:
Draw only those markers/clusters which are in visibleRegion.latLngBounds of the GoogleMap
Observed behavior:
Draws every marker added to ClusterManager
Device and Android version:
Moto G3 with Android 6.0.1
Nexus 6P with Android 7.1.2
Screenshots:
Zoomed out from 20f to 1f quickly