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

Support for multiple Cluster Managers #16

Closed
GranitGjevukaj opened this issue May 9, 2017 · 7 comments
Closed

Support for multiple Cluster Managers #16

GranitGjevukaj opened this issue May 9, 2017 · 7 comments

Comments

@GranitGjevukaj
Copy link

Hello,

Kudos for the great work on the library so far :)

I faced an issue when I tried to group pins based on a given type that I have.
It would be really convenient if I could configure multiple Cluster Manager instances. I've seen that feature in some older libs.

Do you think that would be possible to achieve in your library?

Thank you,
Granit

@efremidze
Copy link
Owner

Yes, what kind of implementation r u looking for? Can u point me to some other libraries that do that?

@GranitGjevukaj
Copy link
Author

Hello,

This library supports multiple Cluster Managers: https://github.com/choefele/CCHMapClusterController

@GranitGjevukaj
Copy link
Author

Hello @efremidze ,

Do you have any updates on this last outstanding issues?

Thank you in advance!

Best,
Granit

@efremidze
Copy link
Owner

Ill take a look tonight. Should be easy to support.

@efremidze
Copy link
Owner

I'm almost done adding support. I found the issue.

@GranitGjevukaj
Copy link
Author

@efremidze did you manage to add this?

@efremidze
Copy link
Owner

efremidze commented Jun 29, 2017

I haven't fixed it but basically the cluster manager is removing all the pins and then adding new pins. It should remove only the pins related to the individual manager. If u want to fix that, ill merge it in. I haven't had the time to fully fix it yet.

let before = NSMutableSet(array: mapView.annotations) <-- this is a problem
before.remove(mapView.userLocation)

let after = NSSet(array: clusteredAnnotations)

let toKeep = NSMutableSet(set: before)
toKeep.intersect(after as Set<NSObject>)

let toAdd = NSMutableSet(set: after)
toAdd.minus(toKeep as Set<NSObject>)

let toRemove = NSMutableSet(set: before)
toRemove.minus(after as Set<NSObject>)

It would also be nice to replace NSSet with swift sets. This needs refactoring.

@efremidze efremidze mentioned this issue Aug 9, 2017
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

2 participants