Questions tagged [mkpinannotationview]

MKPinAnnotationView implements an MKAnnotationView to display a push pin and is the only system-provided annotation view.

MKPinAnnotationView implements an MKAnnotationView to display a push pin and is the only system-provided annotation view. It is the pin used in the Apple Maps application and enjoys widespread use in third party apps as well. Red, green, and purple pins are the only pin colors supported as of iOS 6.

For more information, see the Apple Documentation for MKPinAnnotationView.

165 questions
39
votes
9 answers

MKPinAnnotationView: Are there more than three colors available?

According to the Apple docs, MKPinAnnotationView's pin color is available in red, green and purple. Is there any way to get other colors also? I've found nothing in the docs.
Stefan
  • 28,843
  • 15
  • 64
  • 76
31
votes
4 answers

How to capture Tap gesture on MKMapView

I am trying to capture tap event on my MKMapView, this way I can drop a MKPinAnnotation on the point where user tapped. Basically I have a map overlayed with MKOverlayViews (an overlay showing a building) and I would like to give user more…
30
votes
7 answers

How do I animate MKAnnotationView drop?

I have a custom MKAnnotationView where I set my image myself in viewForAnnotation. How do I animate it's drop like I can with MKPinAnnotationView? My code is - (MKAnnotationView *)mapView:(MKMapView *)map viewForAnnotation:(id…
30
votes
7 answers

Wanted: How to reliably, consistently select an MKMapView annotation

After calling MKMapView's setCenterCoordinate:animated: method (without animation), I'd like to call selectAnnotation:animated: (with animation) so that the annotation pops out from the newly-centered pushpin. For now, I simply watch for…
Joe D'Andrea
  • 5,141
  • 6
  • 49
  • 67
24
votes
5 answers

How can I create a custom "pin-drop" animation using MKAnnotationView?

I have an instance of MKMapView and would like to use custom annotation icons instead of the standard pin icons supplied by MKPinAnnotationView. So, I've setup a subclass of MKAnnotationView called CustomMapAnnotation and am overriding…
user226010
15
votes
2 answers

Custom MKPinAnnotation callout bubble similar to default callout bubble

I want to create a custom callout bubble on MKMapView. But I want to create the call out bubble in the same manner of default bubble. So how to create a View look like annotaion in this image (source: objectgraph.com) I want a custom custom view…
S.P.
  • 5,427
  • 11
  • 56
  • 83
15
votes
3 answers

Z-ordering of MKAnnotationViews

I'm getting fairly frustrated with the limitations of MKMapKit. My current problem has to do with the z-ordering of annotation views, particularly as it relates to touches. If you accept the default z-order the mapkit gives you: The order appears…
btschumy
  • 1,435
  • 1
  • 18
  • 35
12
votes
1 answer

MKAnnotation Pin won't drag, even though set as draggable

I have been trying to put a draggable annotation on a mapview for ages. (I'm using the default pin, not my own) So far I can only display it at set coordinates (not much of an achievement, really) and I need to get the annotation first of all to…
11
votes
1 answer

MKPinAnnotationView: Pin width and height

What is the width and the height of the MKPinAnnotationView pin in pixels? Edit: To be more concrete, the width and height of imaginary rectangle on iPhone screen containing the pin.
Mitry
  • 375
  • 4
  • 13
11
votes
3 answers

Changing pin color MKMapView

I add annotations to my map in this way: MyAnnotation *annotationPoint2 = [[MyAnnotation alloc] init]; annotationPoint2.coordinate = anyLocation; annotationPoint2.title = [NSString stringWithFormat:@"%@", obj]; annotationPoint2.subtitle = @""; //or…
Alessandro
  • 4,000
  • 12
  • 63
  • 131
10
votes
1 answer

pin drop animation

The default pin drop animation doesn't work in my app, here is some code I wrote: - (void)viewDidLoad { /* some code... */ [theMapView addAnnotation:addAnnotation]; [addAnnotation release]; } - (MKAnnotationView…
Michael
  • 2,075
  • 7
  • 32
  • 46
10
votes
2 answers

MKPinAnnotationView custom Image is replaced by pin with animating drop

I'm displaying user avatar images on a MapView. The avatars appear to be working if they are rendered without animation, however I'd like to animate their drop. If I set pinView.animatesDrop to true, then I lose the avatar and it is replaced by the…
Billy Coover
  • 3,827
  • 5
  • 36
  • 50
9
votes
7 answers

MKMapView refresh after pin moves

A custom AnnotationView is updated with new coordinates. But the problem is that it visually updates only after some manipulations with MKMapView, e.g. zooming or moving. What should I do to manually update visual position on a map? PS. I've tried…
slatvick
  • 1,207
  • 2
  • 16
  • 25
9
votes
1 answer

How to set the rotation center of an MKAnnotationView

I've got a problem with my MKAnnotationViews when MKUserTrackingModeFollowWithHeading is enabled on the MKMapView. I positioned my images using the centerOffset property of the MKAnnotationView. Specifying the coordinates of the pin's tip relative…
Chris
  • 3,192
  • 4
  • 30
  • 43
8
votes
3 answers

Smooth Movement of annotation image on Mapview

I have loaded the custom annotation image for user current location.I am updating the current user location after every 1 sec in background. NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [self…
Akshay Aher
  • 2,525
  • 2
  • 18
  • 33
1
2 3
10 11