-
Notifications
You must be signed in to change notification settings - Fork 21
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
Is there a way to intercept the click to does not expand the pins in the last zoom level? #31
Comments
Hi,
|
Hi, If possible I would to suggest a little modification. If there are a lot of places very close to each other, with another places with exactly the same coordinates, the algorithm not call the method below: -(BOOL)mapView:(TSClusterMapView *)mapView shouldForceSplitClusterAnnotation:(ADClusterAnnotation *)clusterAnnotation; Debugging the code, I find out the reason. Because the method is only called when the groupedRounded annotations count is equal to 1: //...TSClusterMapView class, in "splitClusterToOriginal:clusterAnnotation" method
NSDictionary *groupedRoundedLatLonAnnotations = [TSClusterOperation groupAnnotationsByLocationValue:[NSSet setWithArray:clusterAnnotation.cluster.originalAnnotations]];
//Here the condition
if (groupedRoundedLatLonAnnotations.allKeys.count == 1) {
if ([_clusterDelegate respondsToSelector:@selector(mapView:shouldForceSplitClusterAnnotation:)]) {
if (![_clusterDelegate mapView:self shouldForceSplitClusterAnnotation:clusterAnnotation]) {
return;
}
}
}
Maybe this condition can be parameterized (count value). In my case, for example, I don't need this condition. Thank you very much! |
@pcsantana Hmm yeah I guess the idea there was that if they weren't close enough to get grouped together into 1 single shared coordinate it should always split. I think we can just get rid of that if statement of that solves your problem? |
Yes @ashare80, I commented the if statement and it solved my problem |
@pcsantana ok cool next version will remove it |
Thank you! :) |
Hii,
First, thank you for sharing this great and useful lib.
I am trying to use it, but I want a little different behavior when I give zoom in the last level and is not be possible to ungroup the pins. In this scenario, I want to intercept the default behavior (replace the pins around the original coordinate when the user tap on pin). In my case I wish to display some list with the places data (because I need to show all shops (200+) in the mall, for example). But I was not be able to disable this default behavior and insert my code.
If there is a way, I appreciate it if you could help me.
Thank you very much!
Best regards,
Paulo Santana.
The text was updated successfully, but these errors were encountered: