-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix #384 - Show clustered markers in exact same location #413
base: main
Are you sure you want to change the base?
Conversation
…th the same location.
…l location when user taps in the cluster and the zoom is the maximum allowed. Cluster gets back to previous state when user zooms out the map.
…arkes are in the same location.
…er have the same lat/lng. Added to the demo activity ClusteringSameLocationActivity the use of this new method.
…s all the items in the exact same lat/lng.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
Added the second email as an alternative email in both Github and Gmail. |
Would love to have this merged. And for iOS too, ideally, because if on Android only the topmost marker is shown, in iOS google map utils markers blink =) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing and re-opening to try and kick-start the CLA bot... |
This needs cla from the initial commits from israel@cobaas.com. |
@menismu Is israel@cobaas.com your email? If so you'll need to configure this email with GitHub for Google's bot to recognize the CLA on file: |
Hi @menismu . Did you have the chance to check the latest message regarding the CLA? |
Sorry we aren't able to merge this. If you can recreate the PR from an account that you're able to sign the CLA with, feel free to propose a new PR. |
This pull request implements a solution for a situation where more than one marker have the exact same location (lat and lng), an issue reported in #384.
The activity ClusteringSameLocationActivity shows 5 markers in the exact same location and use this new implementation. Basically, if the user does zoom in till the maximum zoom value and touch the cluster with the markers in the same location, markers are distributed in new locations based in the default implementation of ClusterItemsDistributor interface. A new distributor can be implemented and used calling ClusterManager.setClusterItemsDistributor.
There is a potential backward compatibility break as ClusterItem interface requires now a copy method to copy the cluster item with a new location to be used to distribute the markers. It is important to keep BC compatibility I could make changes to this feature or function.
This implementation requires to implement OnClusterClickListener and OnCameraMoveListener, this means if the library consumer needs to implement those listeners, it is a requirement to call to ClusterManager.handleClickListener or ClusterManager.OnCameraMove to keep the feature working well. This could be improved also if it is required.