So I'm really confused. I used:
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation {
static NSString* AnnotationIdentifier = @"Annotation";
MKPinAnnotationView *pinView = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:AnnotationIdentifier];
if (!pinView) {
MKPinAnnotationView *customPinView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:AnnotationIdentifier];
if (annotation == mapView.userLocation){
customPinView.image = [UIImage imageNamed:@"303761_4417778996801_94858213_n.jpg"];
[customPinView.layer setMasksToBounds:NO];
[self setRoundedView:customPinView toDiameter:kPictureDiameter];
[customPinView.layer setBorderColor:[UIColor whiteColor].CGColor];
[customPinView.layer setBorderWidth:5.0f];
[customPinView.layer setShadowColor:[UIColor blackColor].CGColor];
[customPinView.layer setShadowOpacity:1.0f];
[customPinView.layer setShadowRadius:20.0f];
[customPinView.layer setShadowOffset:CGSizeMake(0, 0)];
[customPinView setBackgroundColor:[UIColor whiteColor]];
}
return customPinView;
} else {
pinView.annotation = annotation;
}
return pinView;
}
to add my own image to the user location pin. And that works. There's two problems though:
Shadows aren't working.
The image I set for the user location pin is off center and looks like this: user location picture
I've tried fooling around with CGRect, CGPoint, setting the frame, center ect (although I haven't tried changing the bounds as of yet) and nothing changes.
Any help would be so appreciated.