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

Use zoom level to determine if the new region has zoomed or not #120

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kusamakura
Copy link

As discussed in #119.
I saw that self.zoomLevel is implemented via CCHMapClusterControllerZoomLevelForRegion, so I used that.
Please advise as to what I need to change or improve upon. Thank you! :)

@choefele
Copy link
Owner

There are two changes in this PR:

  1. The algorithm to figure out if a zoom has occurred now uses the zoom level
  2. updateAnnotationsWithCompletionHandler is only called if the zoom has changed
  1. The code looks easier to read, but does it improve the functionality? I'd like to understand if this issue has been fixed (can you use setCenterCoordinate:animated: without changing the clustering) and wether the new code fixes Annotations are not deselected when heading changes #66 (can you change the camera altitude without changing the clustering)

  2. This breaks clustering when panning the map. For example: use the example app and zoom in quite a bit (~zoom level 14) and then pan the map. This results in clusters that won't show outside the initial clustering region

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants