 
 class ArticlePlaceView: MKAnnotationView {
     let imageView: UIImageView
+    let dotView: UIView
     let countLabel: UILabel
     let collapsedDimension: CGFloat = 15
     let groupDimension: CGFloat = 30

    override init(annotation: MKAnnotation?, reuseIdentifier: String?) {
        imageView = UIImageView()
        countLabel = UILabel()
        super.init(annotation: annotation, reuseIdentifier: reuseIdentifier)
        
        let dimension = 50
        frame = CGRect(x: 0, y: 0, width: dimension, height: dimension)
        
        imageView.contentMode = .scaleAspectFill
        imageView.layer.borderWidth = 2
        imageView.layer.borderColor = UIColor.white.cgColor

    func update() {
        if let articlePlace = annotation as? ArticlePlace {
            if articlePlace.articles.count == 1 {
                dotView.backgroundColor = UIColor.wmf_green()
                let article = articlePlace.articles[0]
                if let thumbnailURL = article.thumbnailURL {
                    imageView.backgroundColor = UIColor.white
                    imageView.wmf_setImage(with: thumbnailURL, detectFaces: true, onGPU: true, failure: { (error) in
                         self.imageView.backgroundColor = UIColor.wmf_green()
                    }, success: {
                        
                    })
                } else {
                    imageView.image = nil
                    imageView.backgroundColor = UIColor.wmf_green()
                }
            } else {
                dotView.backgroundColor = UIColor.wmf_green().withAlphaComponent(0.7)
                countLabel.text = "\(articlePlace.articles.count)"
            }
        }
