Im having trouble putting a "regular" pin on the user's current location. I searched around but couldn't find much. Right now, in the user's current location I just have the location beacon. How can I change it to just the regular "pin"? I tried nnotationView?.annotation = annotation but this did not seem to work.
extension ViewController: MKMapViewDelegate {
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {
var annotationView = mapView.dequeueReusableAnnotationView(withIdentifier: "AnnotationView")
if annotationView == nil {
annotationView = MKAnnotationView(annotation: annotation, reuseIdentifier: "AnnotationView")
}
if let title = annotation.title, title == "Park Test" {
annotationView?.image = UIImage(named: "Park icon test")
}
else if annotation === mapView.userLocation {
return nil
}
annotationView?.canShowCallout = true
return annotationView
}