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

ios-mapkit, strange behavior with custom image annotations

I've written some code for showing annotations with custom images in a mapview. My mapview delegate implements this method to customize annotation when they are put in the map: - (MKAnnotationView *) mapView:(MKMapView *) mapView…
Matteo
  • 276
  • 1
  • 4
  • 18
3
votes
2 answers

EXC_BAD_ACCESS with MKPinAnnotationView

I have a problem displaying my MKPinAnnotationView on the mapView in iOS. I get this error but i don't understand where the error comes from : "EXC_BAD_ACCESS". My code seems good : -(MKAnnotationView *)mapView:(MKMapView *)mapView…
Dimitri
  • 8,122
  • 19
  • 71
  • 128
3
votes
1 answer

Showing the Pin Information by Default

I am working with MKPinAnnotationView annotations pins over a MKMapView. Into the view that I am developing, there is a map centered on a pin. When I call the view the pin drops down and if I make a click over it, it shows the annotation information…
Daniel García Baena
  • 1,191
  • 4
  • 19
  • 33
3
votes
4 answers

Trying to change MKPointAnnotation colour but losing the title

I am trying to change my pin colour to purple, when I do it I lose the title though. Code is: - (void)viewDidLoad { [super viewDidLoad]; self.navigationController.navigationBarHidden=YES; //init the location manager …
Kex
  • 8,023
  • 9
  • 56
  • 129
3
votes
2 answers

MKPinAnnotationView not centered

After uploading a custom image for the MKPinAnnotationView, I noticed that the pin was off-centered. The pin is supposed to be on a point on the route's polyline, and in the center of an mkcircle; however, the pin seems to be to the right of the…
Chris Gong
  • 8,031
  • 4
  • 30
  • 51
3
votes
0 answers

custom annotation callout disappears when it's tapped

When I choose from a tableView, it goes back to my map and display the custom annotation callout over the pin selected. If I tap on another pin on the map, the custom callout view disappears from from the previous pin and is displayed over the…
Nilzone-
  • 2,766
  • 6
  • 35
  • 71
3
votes
4 answers

MKAnnotationViews with image in satellite map mode

I successfully set a custom image on MKAnnotationView to replace pins (I used the function setImage). But it only works when the MKMapView type is "Standard". Satellite and Hybrid modes always display pins. Does anyone have an idea to solve this…
Tom
  • 31
  • 3
3
votes
3 answers

Add image behind MKPinAnnotationView

I'm trying to add an image behind a MKPinAnnotationView. Seems like it should be rather easy to just do this in here: - (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views { for (MKAnnotationView *aView in views) [[aView…
Adolfo
  • 4,969
  • 4
  • 26
  • 28
3
votes
1 answer

MKPinAnnotationView pinColor

I can't figure out why a MKPinAnnotationView associated (in theory) with a MKPointAnnotation doesn't appear on the map. In fact, the pin appears but it isn't purple as it should be... Here is the code: MKPointAnnotation *myPersonalAnnotation=…
Pao
  • 206
  • 3
  • 10
3
votes
2 answers

MKPinAnnotationView versus MKAnnotationView

I've inherited a project which throws this warning Incompatible pointer types assigning to 'MKPinAnnotationView *' from 'MKAnnotationView *' at this line pinView=[[[MKAnnotationView alloc]initWithAnnotation:annotation…
JulianB
  • 1,686
  • 1
  • 19
  • 31
2
votes
2 answers

Displaying contact name when a pin is clicked on the mapview

I'm using the MapKit framework and I have used pins to display the exact address location of the contacts in my addressbook. Till now everything is working fine. But when i click on a pin I need to show the name of the contact, that particular pin…
Xavi Valero
  • 2,047
  • 7
  • 42
  • 80
2
votes
2 answers

How To Detect A User Is Within Range Of An Annotation

So I am working on a project that includes many uses placing annotations all around a map. The annotation, (which is a custom image with a much larger circular range) appears on the screen and, ideally, I would like for a user to be: Notified if…
Ethan
  • 1,905
  • 2
  • 21
  • 50
2
votes
1 answer

How to add text under the button previously placed as leftCalloutAccessoryView of MKPinAnnotationView

I want to basically do this: ETA info under the button with a car image How can I add text just at the bottom of the button? Thanks in advance.
2
votes
2 answers

MKAnnotationView update title and subtitle with distance when event is received

I'm developing an iphone app using mapkit and CLLocationManager. I put lots of MKPinAnnotationView on map (about 100) and I want to update all callout's subtitle whith user distance when I receive it. How to do it ? Thanks I try this to update…
Dragouf
  • 4,676
  • 4
  • 48
  • 55
2
votes
2 answers

MKPinAnnotationView downloaded image (@3x) not working for 6+

I am using map on my application, For pin drop, I want to set user's image instead of default pin. I am downloading users image and setting it as per code I paste below. For different scale of devices I am using image name as per device scale like…
Niks
  • 647
  • 5
  • 16
1 2
3
10 11