-
Notifications
You must be signed in to change notification settings - Fork 138
Fix cluster sites not rendering #3430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…om threshold was crossed
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3430 +/- ##
============================================
+ Coverage 69.91% 70.01% +0.09%
- Complexity 1599 1608 +9
============================================
Files 320 320
Lines 8590 8600 +10
Branches 945 945
============================================
+ Hits 6006 6021 +15
+ Misses 2010 2005 -5
Partials 574 574
🚀 New features to boost your workflow:
|
| super.shouldRender(oldClusters, newClusters) | ||
| } | ||
|
|
||
| private fun hasRenderingModeChanged(): Boolean = isClusterMode(oldZoom) != isClusterMode(zoom) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update the value of oldZoom in this method after it has returned true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that value is updated by setZoom, which is called by each onCameraIdle. Then rendering related methods, such as this one, only consume that state to decide whether a re-render is needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just wondering if there's a way to optimize things by re-rendering the clusters even if the zoom hasn't changed.
Fixes #3387
There was an issue when zooming in on map clusters, where the individual items wouldn't render. This happened when the clusters themselves didn't change, but the zoom crossed the threshold where individual items should be displayed.
In order to fix that, a new override was added
shouldRenderwhich forces the rerender in this particular case, when the clusters don't change but the rendering type did.Before fix
Screen_recording_20260107_175849.webm
With fix
Screen_recording_20260107_175947.webm
@shobhitagarwal1612 PTAL?