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

putting Facebook places image as annotation image on MKMapView

I am working on an app in which I am getting Facebook places and displaying them on MKMapView as annotations using following method. -(void) connectionDidFinishLoading: (NSURLConnection *) connection { latitudeArray = [[NSMutableArray…
0
votes
1 answer

how to add multiple pin at the same lat/long

I am trying to add multiple pin at the same location. for (int i = 0; i < [arrListing count]; i++) { List *obj = [arrListing objectAtIndex:i]; NSLog(@"Title %@",obj.Title); CLLocationCoordinate2D…
Mohammed Ebrahim
  • 849
  • 1
  • 12
  • 22
0
votes
5 answers

Rotating a display image of MKAnnotationView

I'm currently rotating the image property of an MKAnnotationView using CGAffineTransformMakeRotation. However, the whole view in this case gets rotated, as well as the callout bubble. So I followed the suggestion within MKAnnotationView Only Rotate…
mservidio
  • 12,817
  • 9
  • 58
  • 84
0
votes
1 answer

How to set multiple images for MKAnnotationViews?

I'm working on an app that makes use of the MapKit Classes Mkannotation and MKAnnotationView (Both subclassed, of course). My question is, how can I put multiple FGAnnotationViews on my map (about 5) that all have different images? I know that I…
Finn Gaida
  • 4,000
  • 4
  • 20
  • 30
0
votes
1 answer

Check if Annotation callout is clicked

I want to check if the annotation is clicked: So it goes from this: To : Here's my code that shows the annotation: - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation { static NSString *identifier =…
David Raijmakers
  • 1,369
  • 1
  • 16
  • 40
0
votes
1 answer

Because of MKMapView app get crashed on pushViewController and PopviewController frequently?

I am new in iOS development, I need a MKMapView with custom pin annotation and custom callout bubble,I already achieved this, I need another situation when button clicked the mapview get refreshed with new points. For this purpose I tried to remove…
user4003752
0
votes
1 answer

Map view adding only one Annotation

I dont know i have mutable array ok mkannotation it is adding only one that too last one here is my code code http://web.missouri.edu/~dnk6y2/Screen%20Shot%202012-11-12%20at%2011.46.05%20PM.png
Dheeraj Kaveti
  • 309
  • 1
  • 2
  • 9
0
votes
1 answer

Properties of custom Annotation don't visible in delegate methods

I have many custom annotations to whom I gave the property (NameTable and ID). I set this property before AddAnnotation the moment of creation, but these property in the delegate methods are no longer visible. I have multiple annotation associated…
Ortensia C.
  • 4,666
  • 11
  • 43
  • 70
0
votes
3 answers

Pass a string together an annotationView

In my map there are many annotationView, each with their own image, the data of annotationView are taken from different tables in a database. When I select un'annotationView I want to display another viewController and to do this I need to pass the…
Ortensia C.
  • 4,666
  • 11
  • 43
  • 70
0
votes
1 answer

Custom Button of type UIButtonTypeInfoLight

I created a CustomButton why do I need to pass as parameter in a @selector. The custom button is part of a annotationView. In CustomButton I put as property UIButtonType, but in the output nothing comes out. The output is a button with nothing, and…
Ortensia C.
  • 4,666
  • 11
  • 43
  • 70
0
votes
1 answer

Custom pin in UIMapView

I am trying to replace the standard pin for a custom pin. In iOS 6 the following code works and replaces it perfectly! static NSString* AnnotationIdentifier = @"AnnotationIdentifierDealer"; MKPinAnnotationView* pinView = [[[MKPinAnnotationView…
Alex van Rijs
  • 803
  • 5
  • 17
  • 39
0
votes
1 answer

Getting the bounds of annotation having custom view

I have a number of pins on my map and I want to know the coordinates of top-left and bottom-right corners of their views to perform specific manipulations with them. Here is the code where I need to insert the code getting the bounds of specific…
Stanislav Pankevich
  • 11,044
  • 8
  • 69
  • 129
0
votes
3 answers

MKMapView, pre-load annotation

At different places in my new ios App displays small MKMapView in which the scrolling and user interaction are disabled. Each map will always have a single custom annotation. As shown in the screenshot, everything looks well. However, there is a…
philouuuu
  • 983
  • 1
  • 10
  • 19
0
votes
1 answer

What CallOut have I pressed?

If I have many Annotation in my map view… how to understand what CallOut I've pressed? In tableview for example we have "didSelectRowAtIndexPath"... but here? -(void)button:(id)sender { [self performSegueWithIdentifier: @"dettaglio"sender:…
user1639377
  • 117
  • 1
  • 7
0
votes
2 answers

One Implementation: Two Possible Superclasses -- Cleanest Approach?

I am working on a module to put custom annotations on a MKMapView. Much of my logic is currently in a class that inherits from MKAnnotationView. I have manually copied and pasted all the same code into another class that inherits from…