[go: nahoru, domu]

Skip to content
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

setMinClusterSize() not respected #696

Closed
joknu1 opened this issue Apr 20, 2020 · 2 comments · Fixed by #759
Closed

setMinClusterSize() not respected #696

joknu1 opened this issue Apr 20, 2020 · 2 comments · Fixed by #759
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. released type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@joknu1
Copy link
joknu1 commented Apr 20, 2020

Summary

DefaultClusterRenderer.setMinClusterSize() is not respected since shouldRenderAsCluster() logic checks greater than mMinClusterSize

Expected behavior

When mMinClusterSize = 4, I would expect to see clusters of size 4.

Observed behavior

The cluster is of min size 5.

Environment details

  1. Sony Compact
  2. Android 9
  3. android-maps-utils:1.1.0

Code example

 protected boolean shouldRenderAsCluster(Cluster<T> cluster) {
        return cluster.getSize() > mMinClusterSize;
    }

Change to >=

@joknu1 joknu1 added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Apr 20, 2020
@barbeau barbeau added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed triage me I really want to be triaged. labels Jun 26, 2020
@barbeau
Copy link
Collaborator
barbeau commented Jun 26, 2020

@joknu1 Thanks for flagging this! I'll push a fix shortly.

barbeau added a commit that referenced this issue Jun 26, 2020
Previously, when `setMinClusterSize(4)` was called, clusters of size 4 would still be rendered as individual markers instead of clusters (only clusters of size 5 or more would be rendered as individual cluster markers).

With this change, now `setMinClusterSize(4)` will result in clusters of size 4 being rendered as clusters instead of individual markers.

Closes #696
arriolac pushed a commit that referenced this issue Jun 26, 2020
Previously, when `setMinClusterSize(4)` was called, clusters of size 4 would still be rendered as individual markers instead of clusters (only clusters of size 5 or more would be rendered as individual cluster markers).

With this change, now `setMinClusterSize(4)` will result in clusters of size 4 being rendered as clusters instead of individual markers.

Closes #696
googlemaps-bot pushed a commit that referenced this issue Jun 26, 2020
## [2.0.1](v2.0.0...v2.0.1) (2020-06-26)

### Bug Fixes

* Respect setMinClusterSize() correctly when clustering ([#759](#759)) ([8f30d5f](8f30d5f)), closes [#696](#696)
@googlemaps-bot
Copy link
Contributor

🎉 This issue has been resolved in version 2.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. released type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants