Reputation: 1051
I'm trying to compare two sets of RMAnnotations
(Annotations used in the MapBox SDK for iOS), using the following code:
NSMutableSet *before = [NSMutableSet setWithArray:self.mapboxView.annotations];
if(self.mapboxView.userLocation)
[before removeObject:[self.mapboxView userLocation]];
NSSet *after = [NSSet setWithArray:annotations];
NSMutableSet *toKeep = [NSMutableSet setWithSet:before];
[toKeep intersectSet:after];
NSLog(@"to keep %lu", (unsigned long)toKeep.count);
NSMutableSet *toAdd = [NSMutableSet setWithSet:after];
[toAdd minusSet:toKeep];
NSLog(@"to add %lu", toAdd.count);
Which works great in MKMapKit for MKAnnotations, but has no effect in MapBox. Would anybody have any idea why this might be the case?
Thanks!
Upvotes: 0
Views: 37