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
2 answers

Scroll Down AnnotateViewer

Can you help me with this in VB.Net Im trying to have a shortcut here for my AnnotateViewer when i press "Ctrl + Down" the view must scroll down. Here's the code that i tried Dim pt As Point = iView.ScrollPosition If e.Control And e.KeyCode =…
kelvzy
  • 913
  • 2
  • 12
  • 19
0
votes
0 answers

How to set the roation center of MkAnnotationview custom image in IOS6 mapkit framework

Using mapkit framework I want to display a arrow and rotate it, depending on the viewing direction of the user. My problem is that the rotation center is in the lower left corner of the image. I read this article about setting the roation center of…
Senador
  • 5,580
  • 2
  • 15
  • 12
0
votes
1 answer

Assign a method when selecting annotation view

I try to call a method when the annotation view (and only the annotation view) is clicked. - (void)mapView:(MKMapView *)m didSelectAnnotationView:(MKAnnotationView *)view { [self openDetailView]; } But what i noticed, is…
Malloc
  • 15,434
  • 34
  • 105
  • 192
0
votes
2 answers

How to add different titles and subtitles to different Annotation points in a MapView?

I am displaying different annotation points in a mapview. I want to display different titles and subtitles for all the different annotations. I have my viewForAnnotation delegate method implemented in the below manner. - (MKAnnotationView…
Pradeep Reddy Kypa
  • 3,992
  • 7
  • 57
  • 75
0
votes
0 answers

unrecognized selector sent to instance when trying to get property value

The error is the same in many question posted here already, but i guess the cause is different. I have 3 classes: MapView.m that display the map and its plotted pins. Pins.m that mange all the pins data, and PinsCalloutAnnotationView.m which extends…
Malloc
  • 15,434
  • 34
  • 105
  • 192
0
votes
2 answers

How do I know which callout has been clicked?

I'm having alot of trouble trying to identify which callout bubble has been clicked. Is there a way of identifying the callout bubbles some how as I've tried a number of examples on here but because I'm quite new to Objective C I can't seem to work…
0
votes
1 answer

Screenshot defined (x,y,width,height)-MKAnnotationView

As you seen below code takes screenshot of whole view, but how could I modify below code to capture the screenshot. For example, I would like to get (x,y,width,height)--> (20,20,120,50) screenshot. My real problem is to capture the annotation…
casillas
  • 16,351
  • 19
  • 115
  • 215
0
votes
2 answers

How to change title of a dragged mkannotationview

I want to change the title of a mkannotationview when I drag it. MKannotationview doesn't have title property - i have a custom view for it. So how do I access it in the dragstate delegate method? -(void)mapView:(MKMapView *)mapView…
Ashwin G
  • 1,570
  • 1
  • 16
  • 23
0
votes
1 answer

iOS Changing the colours of pin annotations

G'day All, I am trying to change the colours of the pins in MKPointAnnotations. Most of the code examples I have tried to follow are too complex for me to follow. I have come up with this: // // ViewController.m // PlayingWithMaps // // Created…
Andrew H
  • 466
  • 10
  • 22
0
votes
1 answer

iOS SDK Custom pin image is being changed randomly on MapView

I have an application using MapView and I am adding custom pin annotations on it. Everything works fine, but sometimes there is another image displayed and I cannot figure out why. I am getting the data from an JSON API, and they are definitely…
Filip Majernik
  • 7,700
  • 13
  • 45
  • 53
0
votes
0 answers

How to save data in MKPinAnnotationViews

I have a mapView that drops pins with a UILongPressGesture. The annotations have a callout button that brings up a new view when pressed. Within this view, there are text fields and a UIImage. What I want to do is save the text and image that the…
Chandler De Angelis
  • 2,646
  • 6
  • 32
  • 45
0
votes
2 answers

Show Annotation Pin on mapView when button is pressed

trying to figure out if it is possible when a button is pressed to go to a certain longitude and latitude in mapView and drop a button. I copied my code for a "newAnnotation" pin which previously worked, but realize now it might not be working…
Greg
  • 276
  • 1
  • 3
  • 25
0
votes
1 answer

MapView annotation View without Clicking

In my application show Multiple Annotation between two city but when we move one Annotation to other (with map region set on next previous Button) how to show Annotation detail automatic without clicking on it???
Nims
  • 431
  • 6
  • 15
0
votes
1 answer

Showing custom Annotation View on MKMapView

I am working on a map application. I am done with fetching locations on certain conditions, showing annotation on map view and displaying my custom callout bubble. My requirement is to display the annotation pin as follow: A Image with rounded…
Kapil Choubisa
  • 5,152
  • 9
  • 65
  • 100
0
votes
1 answer

How do I make a different left accessory image for each annotation appear?

I'm stuck here and I thought I'd ask if anyone can help me with this as I'm getting ready to tear my hair out. I'm using the following tutorial/guide below and got as far the end and it works great for the one image but what I want is to be able to…