-
Notifications
You must be signed in to change notification settings - Fork 155
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
The regionSpan can change slightly #20
Comments
Thanks for reporting this issue! It's expected that I have no idea why the cell size changes when calling If you print out the cell size returned by Really strange. |
Thanks for your answer! I have the feeling, that Apple is internally using
But the last part does not seem to be true, really weird. I've checked OpenRadar, if this is a known issue, but no luck so far. |
You are right, the zoom changes. It seems to be a problem specific to iOS 7. I can't reproduce this on iOS 6, but I can on iOS 7 and 7.1 Beta 5 (tested on simulator). As a workaround, I suggest the following code, which avoids zooming in my tests:
@plu Could you please have a look whether this solves your problem? |
This does fix my problem, thanks a lot! You can close this ticket, if you want to :). Maybe we should file a Radar then for iOS 7? The other day I was already looking into OpenRadar for similar issues, but could not identify any. |
I added a code example for this to the documentation. Thanks again for reporting this issue. |
I'm still facing issues even with using |
I've done some testing with According to the Apple Docs, I assume that the return value of The funny (or annoying) thing is that the calculated rect via
never matches the rect returned by I haven't found any cool way to set the center coordinate or change the visible map rect by not (slightly) changing I was thinking about adding something like a "zoom change tolerance" so that we ignore marginal zoom changes and only re-cluster when the zoom changed significantly. @choefele what do you think? Should we re-open this issue? |
Hmm, the "zoom change tolerance" prevents the |
Hi Claus,
I've noticed the clusters to rearrange when I programmtically change the region of the map. When the user is moving the map by hand, everything is fine and the clusters stay the same. But whenever I use
setCenterCoordinate:animated:
orsetRegion:animated:
, the annotation clusters rearrange themselves. I've noticed that theCCHMapClusterController
stores theMKCoordinateSpan
right before the region is changed, and compares it to the new span afterwards.In the documentation of
setCenterCoordinate:animated:
Apple promises:This is true from a human point of view. At least I cannot see the map zoom in. But the span value changes slightly. I've created a branch here to illustrate the issue: https://github.com/plu/CCHMapClusterController/compare/regionSpanBeforeChange
There are three commits. If you reset to the first one (5451b4f) and tap on any of the annotations, you'll see that while it's being centered, the clusters are rearranged. The other two commits are not meant to be a proper fix. Just to illustrate the difference.
Do you have any idea how to properly fix this?
Best regards,
plu
The text was updated successfully, but these errors were encountered: