Questions tagged [mkannotationview]

MKAnnotationView is part of Apple's Map Kit framework for developing iOS applications, an object that represents annotations visually in a map view.

Annotation views are loosely coupled to a corresponding annotation object, which is an object that corresponds to the MKAnnotation protocol. When an annotation’s coordinate point is in the visible region, asks its delegate to provide a corresponding annotation view. Alternatively (and simpler in many cases), you can simply register an particular annotation view with a particular identifier (notably the MKMapViewDefaultAnnotationViewReuseIdentifier and MKMapViewDefaultClusterAnnotationViewReuseIdentifier identifiers). Annotation views may be recycled later and put into a reuse queue that is maintained by the map view

Annotation views remain anchored to the map at the point specified by their associated annotation object. Although they scroll with the map contents, annotation views reside in a separate display layer and are not scaled when the size of the visible map region changes.

You can use the MKAnnotationView class as-is, use an existing subclass (such as MKMarkerAnnotationView), or subclass it yourself to provide custom behavior as needed. The image property of the class lets you set the appearance of the annotation view without subclassing directly.

See also

986 questions
0
votes
1 answer

Xcode 4.3.3 Mapview, annotation not showing

My annotation (homeMark) are not showing in mapView. I have made my viewController delegate in IB For some reason in the delegate method if ([annotation isKindOfClass:[HomeMark class]]) { Fails.....Annotation is not part of "Homemark" class... What…
0
votes
1 answer

The rightCalloutAccessory button is not shown

I try to manage annotations, and to display an info button on the right of the view when a PIN get selected, my relevant code is this: - (MKAnnotationView *)mapView:(MKMapView *)map viewForAnnotation:(id )annotation { …
Luca
  • 20,399
  • 18
  • 49
  • 70
0
votes
2 answers

custom annotation pin

I have class @interface MyLocation : NSObject @property (copy) NSString *name; @property (copy) NSString *address; @property (nonatomic, readonly) CLLocationCoordinate2D coordinate; @property (nonatomic, strong) UIImage…
0
votes
1 answer

MKAnnotationView memory leak issue

I needed recently to test my app with Allocations because of memory warnings. Even there are no leaks, the heap keeps growing with annotations added to the map. Every time I zoom in or out, the old annotations are removed, new ones are created and…
Templar
  • 1,694
  • 1
  • 14
  • 32
0
votes
2 answers

Tapping on MKAnnotationView doesn't call didSelectAnnotationView delegate

Take a look at this code and see if you can help me fixing it: - (void)viewDidLoad { //Initialize the array and add annotations for the location on the map annotations = [[NSMutableArray alloc] init]; CustomAnnotation…
turtle
  • 928
  • 1
  • 11
  • 23
0
votes
2 answers

How to create custom annotation and callout in iphone

I want to create a custom annotation and callout on MKMapView. I have to create annotations with bigger in size and have to display three or four lines of text(labels). So how to create a custom annotation and callout bubble. Thanks in…
ashishraval
  • 53
  • 1
  • 6
0
votes
1 answer

iphone Detect selected MKPinAnnotation in a MapView

I have a custom MKPinAnnotation in which I have added a couple of peroperties , like the Id of the object and the type. What I want is when someone selects a pin in the MapView to detect which pin is selected and get that data. And Show a button…
Panos
  • 7,227
  • 13
  • 60
  • 95
0
votes
1 answer

How to determine what coordinate is further North in objective-c

I'm writing a custom annotation view for my latest iOS 5 app and I'm looking for the latest SDK friendly way to compare 2 CLLocationCoordinate2D coordinates? CLLocationCoordinate2D coordinate =…
Toran Billups
  • 27,111
  • 40
  • 155
  • 268
0
votes
2 answers

Perform backend operations on MKPointAnnotation

I have populated a couple of locations on MKMapView using MKPointAnnotation(s). On tapping annotations I am showing some options with UIActionSheet menu. The options have some delete functionality which would delete the selected annotation on map…
Firdous
  • 4,624
  • 13
  • 41
  • 80
0
votes
2 answers

Is there a way to open multiple callouts on many MKPointAnnotations on a MKMapView?

I was wondering if it is possible to to that or if it is not what are the alternatives? I need some information that need to be shown on the map and I'm having trouble with it... MKPointAnnotation gives a good interface but I haven't been able to…
P. Sami
  • 2,115
  • 2
  • 21
  • 39
0
votes
1 answer

MKAnnotationView - MKAnnotation Parameter Warnings

I currently have a map view that is populated with several objects following the MKAnnotation protocol. There is two separate types of objects, stores and competitors. The different objects have different types of data attached to them. When the…
Kyle
  • 14,036
  • 11
  • 46
  • 61
0
votes
1 answer

How can I create a custom callout view for MapKit user location?

I have created a custom MKPinAnnotationView for all my map pins, but I'm having a problem customising the user location pin. If I create a custom pin for it, then I lose the blue pulsating dot and it is replaced with a pin, which I don't want. So I…
jowie
  • 8,028
  • 8
  • 55
  • 94
0
votes
1 answer

animating an update to the image property in mkannotationview

i want to animate a change to the image used when displaying my mkannotationview. i know that uiimageview allows for animating its image, but the mkannotationview is just a uiview with an image property. i also realize that i could override the…
ilyashev
  • 371
  • 3
  • 14
0
votes
2 answers

Objective C how to block user interaction with my current location pin on map

How can I block user interaction with the my current location pin? I have problem like this: I have many pins on my map and if they are close and they are around "my current location" pin, that pin takes the click event I wan to block it. i don't…
Toshe
  • 459
  • 1
  • 6
  • 20
-1
votes
1 answer

MKAnnotationView and ImageView

Possible Duplicate: how to call pin annotation on button click in iphone Sorry if question is strange. I'm trying to have an image and drop pins on certain parts and name those parts. Anytime I search Image+Iphone+Drp Pins I get MKAnnotationView…
Mikayil Abdullayev
  • 12,117
  • 26
  • 122
  • 206