Is it possible to change the blue dot which indicates the user\'s location in MKMapView to an image? For example a little car or any .png image?
Ok, here is the Swift version:
func mapView(mapView: MKMapView!, viewForAnnotation annotation: MKAnnotation!) -> MKAnnotationView! {
let identifier = "User"
var annotationView = mapView.dequeueReusableAnnotationViewWithIdentifier(identifier)
if annotationView == nil{
annotationView = MKPinAnnotationView(annotation: annotation, reuseIdentifier: identifier)
annotationView.canShowCallout = true
} else {
annotationView.annotation = annotation
}
annotationView.image = UIImage(named: "image")
return annotationView
}