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

Declustering not always working #24

Open
tudorcodarnai opened this issue Apr 6, 2014 · 4 comments
Open

Declustering not always working #24

tudorcodarnai opened this issue Apr 6, 2014 · 4 comments

Comments

@tudorcodarnai
Copy link

Example: 3 pins on the map -> zoom out -> 1 pin on the map (works every single time) -> zoom in -> :

  • goes well (for a maximum of 3 consecutive zoom out/in)
  • goes fairly bad declusters only 1 pin (resulting in 2 total pins)
  • goes really bad declusters none of the clustered pins (only one pin on the map, the cluster one).

I cannot find pattern on which this is happening...
Please take a look if you can, i really like your implementation.

Thanks!

@tudorcodarnai
Copy link
Author

I found that the problem is here...
Code in REMarkerClusterer.m:

if (self.markerAnnotations.count == 0) {
[_mapView addAnnotations:_clusters];
}
else if (self.markerAnnotations.count > _clusters.count) {
[self joinAnnotationsWithDictionary:dic];
//[self addAnnotationsWithOutSpliting:remainingAnnotations];
} else if(self.markerAnnotations.count < _clusters.count) {
[self splitAnnotationsWithDictionary:dic];
} else {
}

Dunno why but sometimes, if this "if (self.markerAnnotations.count > _clusters.count)" is false, it won't check this "if(self.markerAnnotations.count < _clusters.count)".

I don't understand...

@holidaycottages
Copy link

Did this get fixed?

@tudorcodarnai
Copy link
Author

Unfortunately no answer yet... I adapted and started using another library.

@MarkCSmith
Copy link
Contributor

I believe this is fixed by pull request #31.

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

No branches or pull requests

3 participants