             toAdd.minusSet(toKeep as Set<NSObject>)
             let toRemove = NSMutableSet(set: before)
             toRemove.minusSet(after as Set<NSObject>)
-        
+            
             if let toAddAnnotations = toAdd.allObjects as? [MKAnnotation]{
                 mapView.addAnnotations(toAddAnnotations)
             }

        let maxX:Int = Int(floor(MKMapRectGetMaxX(rect) * scaleFactor))
        let minY:Int = Int(floor(MKMapRectGetMinY(rect) * scaleFactor))
        let maxY:Int = Int(floor(MKMapRectGetMaxY(rect) * scaleFactor))

        var clusteredAnnotations = [MKAnnotation]()

        lock.lock()

        for i in minX...maxX {

            for j in minY...maxY {

                let mapPoint = MKMapPoint(x: Double(i)/scaleFactor, y: Double(j)/scaleFactor)
                
                let mapSize = MKMapSize(width: 1.0/scaleFactor, height: 1.0/scaleFactor)

    
    var lock:NSRecursiveLock = NSRecursiveLock()
    
    public var maxZoomLevel = 1.0
    
    public override init(){
        super.init()
    }
