Manos Chorianopoulos

fix coupon map pins

...@@ -475,21 +475,27 @@ import MapKit ...@@ -475,21 +475,27 @@ import MapKit
475 475
476 let currentMerchant = merchantModel 476 let currentMerchant = merchantModel
477 477
478 - if let parent = self.parentMerchantsArray.first(where: {($0._uuid == currentMerchant._parent)}) { 478 + if (self.isMarket == true) {
479 - let currentMerchantParent = parent 479 + if let parent = self.parentMerchantsArray.first(where: {($0._uuid == currentMerchant._parent)}) {
480 - 480 + let currentMerchantParent = parent
481 - if (self.isMarket == true) { 481 +
482 logoImageView.load(link: currentMerchantParent._img_preview , placeholder: UIImage(), cache: URLCache()) 482 logoImageView.load(link: currentMerchantParent._img_preview , placeholder: UIImage(), cache: URLCache())
483 +
484 + pinImageView.addSubview(logoImageView)
485 + annotationView?.addSubview(pinImageView)
486 +
487 + return annotationView
483 } else { 488 } else {
484 - logoImageView.load(link: currentMerchant._img_preview , placeholder: UIImage(), cache: URLCache()) 489 + return nil
485 } 490 }
486 491
492 + } else {
493 + logoImageView.load(link: currentMerchant._img_preview , placeholder: UIImage(), cache: URLCache())
494 +
487 pinImageView.addSubview(logoImageView) 495 pinImageView.addSubview(logoImageView)
488 annotationView?.addSubview(pinImageView) 496 annotationView?.addSubview(pinImageView)
489 497
490 return annotationView 498 return annotationView
491 - } else {
492 - return nil
493 } 499 }
494 500
495 } else { 501 } else {
......