-
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
Annotations are deselected when zooming #65
Comments
The deselection is caused by this line of code. I included this because a cluster will change its content when zooming so I'm not sure how much point there is to keep the annotation selected. Can you describe the scenario where you find this behavior problematic? |
I didn't see this issue and, at first, I thought to add an option to exclude this mechanism at all, I confess. After all I agreed with you that there is no much sense to keep a callout opened when content is changed. It would be great if callout would be closed only when clustering changes selected annotation, but I don't know how to detect this easily. My PR only fixes the case when zoom is detected badly, which is the case of map with heading enabled. Also if I don't touch the map, every time I move a little bit heading changes and so callout is dismissed. |
Scenario: The problem here is that I can not tell who deselected the annotation. Was it the clusterer or the user? A nice solution would be an exclusion list / lock for annotations which will not be touched by the clusterer (I think OCMapView does it that way). |
@tarbrain Have you seen this API? It will allow you to zoom in to an annotation and select it. |
I do not want to explicitly zoom into a cluster. I want to zoom the map to a size that both user location pin and annotation are visible. |
Using an |
But default MapKit does not change visible annotation views after zooming. Is it possible to get a delegate message to discover which clusters have changed? If so everything would be simpler ;) |
When a cluster gets selected, you can keep a reference to the annotations in it and compare this information in |
I agree, but |
Both |
You're right but I don't know when that |
Another scenario: |
Hello Claus,
thanks for implementing this great library.
What i have noticed is that when i select a cluster annotation and zoom the map the annotation is automatically deselected which I find is a problem sometimes.
Is there a way to exclude a selected cluster annotation from the clustering mechanism? So it stays put and selected?
Best Regards
Julian
The text was updated successfully, but these errors were encountered: