-
Notifications
You must be signed in to change notification settings - Fork 154
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
Clustering sometimes changes when changing region coordinates, but not zoom level #119
Comments
Does this recipe help? |
I used it before, but changing the clusters on the same zoom level (even when using the same region span, updateAnnotations would still get triggered) is not desirable for my use case. So I'm not actually sure if this is a bug, since what happens is contrary to what's intended – in the comments, at least. |
Sorry for the late reply. Might be a good idea to use Would you mind creating a pull request and trying out if this works? |
@choefele, sorry for the late reply as well. I'll get a PR working within this week. :) |
@choefele is there an equivalent of the recipe that you mentioned above for when when trying to select an annotation with Otherwise, selecting an annotation programatically would most of the times change clustering, even when zooming didn't change. I tried tried to use I did some experiments at bhapca@2988453 and bhapca@4e57c75 to provide a way of selecting without zooming. Is there a way to achieve the equivalent behaviour with the current API ? |
Also, if |
The code to select an annotation assumes that some zooming will happen anyway. I haven't worked on this behaviour for a while, so I don't know any workarounds |
I think there are several issues with selectAnnotation:andZoomToRegionWithLatitudinalMeters:longitudinalMeters:
These all can be seen with a change to the sample app that I made at: I placed a potential fix for all these issues on https://github.com/bhapca/CCHMapClusterController/tree/select-annotation-issues-fix, and created the PR at #126, if you wish to bring them into master. |
Sometimes when changing the map view's center region, the update annotation sequence triggers (namely, in CCHMapClusterController's
mapView:regionDidChangeAnimated:
). This is due to the longitude delta check. Since calculating the zoom level is already included in this project, wouldn't it be better to use that instead? I have a fork which does just that, and I set the epsilon/difference threshold to a value to something small enough, but not too small to trigger a 'zoom change' when changing the region center.The text was updated successfully, but these errors were encountered: