im trying to change the marker or pin image to the one i download from firebase with alamofireimage. Please i need help
this is my code:
let coordinates = CLLocationCoordinate2D(latitude: milatitud!, longitude: milongitud!)
let annotation = MKPointAnnotation()
annotation.coordinate = coordinates
annotation.title = "JuanJo"
self.map.addAnnotation(annotation)
//print ("4444444444")
for annotation: MKAnnotation in self.map.annotations {
let anView = self.map.view(for: annotation)
if (anView != nil)
{
let url = URL(string: link!)
self.imagen.af_setImage(withURL: url!, placeholderImage: UIImage(named: "usuarioprevia.jpeg"), filter: CircleFilter(), imageTransition: .crossDissolve(0.5), runImageTransitionIfCached: true, completion: nil)
anView?.image = "image downloaded from firebase with alamofireimage"
}
i dont know the last part how to set it = for displaying the image, also i need to resize it. Please help