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
0
votes
1 answer

Error "Missing argument for parameter 'coordinate' in call"

I have a custom MkAnnotation that has a title, subtitle, and extra information associated with it for use on an map view. I am passing this information to another UIViewController. However there seems to be some issue with my coordinate that I have…
0
votes
1 answer

Different info for different pin annotations

I have two different pins placed on my mapview. I have an info button on each. The info buttons will segue to the a UIViewController that has a Image view (to hold a picture of the place) and a Text label ( To hold info about the place). My problem…
user5740195
0
votes
1 answer

Users location (blue dot) keeps turning into red pin

I would like to have the users location as a blue dot while having pins also on the mapview. I would like the pins to have an annotation that has a an info button. I can get the blue dot for users location and the enable the pins to have an…
user5740195
0
votes
1 answer

Custom Annotation callout bubble button method is not called after removal of previous annotation

The problem is that removing annotation disables custom annotation button for rightCalloutAccessoryView. When custom button is tapped, the protocol method mapView:annotationView:calloutAccessoryControlTapped is called but sender method for custom…
0
votes
2 answers

MKPinAnnotationView doesn't set custom image

I have to set custom image for different pins. With my code I'm able to set custom color for each of them but when I try to set custom image instead of colors, it doesn't work. - (MKAnnotationView *)mapView:(MKMapView *)mapView…
Armando
  • 3
  • 2
0
votes
1 answer

swift 2.0 case from nsmutablearray to unrelated type mkannotation always fails AND not set image in mapview Pin

I am working on swift 2.1 xcode 7 , i have to add multiple Annotations in map view But it's warning cast from NSMutableArray to unrelated type MKAnnotation always fails on this code mapView.addAnnotations(aryNotation as! [MyAnnotation]) for…
0
votes
1 answer

Custom Map Pin Image Objective-C

I am currently struggling to use a custom map pin image instead of the default coloured pins. I have tried some guides online but can’t seem to integrate it into my current set up. Currently I have a certain coloured (tinted) pin set during certain…
0
votes
1 answer

UIButton inside MKPinAnnotationView with image

i need to do MKPinAnnotationView with UIButton to the left side with a image like this: i try to write this code but it's not work: let navBtn = UIButton(type: .Custom) navBtn.setImage(UIImage(named: "TakeMe.png"), forState: .Selected) …
Tzahi
  • 259
  • 3
  • 12
0
votes
1 answer

How can I Drop and Drag a pin on a map in Objective-C

Hope someone can help, I'm trying to implement dropping one single Pin on a mapView. But I want the pin to be able to be dragged around and and dropped and for this annotation to be separate from the annotation for the user's location. Whilst the…
0
votes
2 answers

Different colour of MKPinAnnotationColor dependant on time

I am kind of new to coding, around 4 weeks experience so go easy on me. I basically want to show a green pin on the map during specified times and when it is not these times a red pin will be shown. Currently with the code for setting two different…
0
votes
2 answers

How can we change the color of the callout that comes when we press a pin in MKMapView?

The callout that is being displayed when we press an MKAnnotationPin can be customised to have image, title and also subtitle. Is it possible to change the blackcolor of the callout to some other color, say brown?
0
votes
1 answer

Decorating MKPinAnnotation

How can I use the MKPinAnnotation and add another graphic underneath it? I want to add direction arrows to the pin, not replace the pin with another graphic. Somebody have any ideas / links?
El Dude
  • 5,328
  • 11
  • 54
  • 101
0
votes
2 answers

Refresh my mapView

i have a mapView with pins on it, and the following code for CLLocation and getDistance between me and another points on the map: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation …
Marco
  • 461
  • 1
  • 10
  • 22
0
votes
1 answer

show pins around 100kilometers

i am implementing an app, that show customers and my userLocation on a map. But now i have a problem, because there are a lot of costumers and the map is very uncomfortable. How can i only see pins on a map or in a list, that are around 100…
Marco
  • 461
  • 1
  • 10
  • 22
0
votes
1 answer

Pin colors not showed as expected as a regular basis

Following the first part of the answer to my question Detecting selected annotation to change pin color, I have updated my code as follows: - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation { //7 …
mvasco
  • 4,965
  • 7
  • 59
  • 120