         if pin == nil {
             // If the pin is not in the cache, we create it.
             pin = MKAnnotationView(annotation: annotation, reuseIdentifier: "net.zygotelabs.annotation")
+        }
+        
+        if annotation.isKindOfClass(AnnotationCluster) {
+            if let clusterAnnotation = annotation as? AnnotationCluster {
+            var reuseId = "cluster"
+            if let clusterView = mapView.dequeueReusableAnnotationViewWithIdentifier(reuseId) as? AnnotationClusterView {
+                clusterView.reuseWithAnnotation(clusterAnnotation)
+                return clusterView
+            }
+            else {
+                let clusterView = AnnotationClusterView(annotation: clusterAnnotation, reuseIdentifier: reuseId, options: nil)
+                return clusterView
+            }
+            } else {
+                return nil
+            }
         }
         
         if (annotation is AnnotationCharger) {

import UIKit
import MapKit

class MapViewController: UIViewController, MKMapViewDelegate, UIPopoverPresentationControllerDelegate, UISearchBarDelegate {
    
    var chargers: [ChargerPrimary] = [ChargerPrimary]()
    lazy var dataManager: DataManager = DataManager()

            }
        })
        
    }
    
    func updateClusteringAnnotations(){
        NSOperationQueue().addOperationWithBlock { [unowned self] in
            let mapBoundsWidth = Double(self.mapView.bounds.size.width)
            let mapRectWidth:Double = self.mapView.visibleMapRect.size.width
            let scale:Double = mapBoundsWidth / mapRectWidth
            let annotationArray = self.clusterManager.clusteredAnnotationsWithinMapRect(self.mapView.visibleMapRect, withZoomScale:scale)
            self.clusterManager.displayAnnotations(annotationArray, mapView: self.mapView)
        }
    }
    
    @IBAction func refreshDataFromCurrentLocation(){
