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

Custom annotation pin changes to default red pin at long tap

I have custom annotation pin at app: - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation { return [kml viewForAnnotation:annotation type:state]; } where I return custom view and make setImage for…
dive
  • 2,130
  • 1
  • 17
  • 26
8
votes
4 answers

How can drag MKPinAnnotationView pin only one tap?

i add MKPinAnnotationView and setDragAble. my code is here - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation { MKPinAnnotationView *annotationView = [[MKPinAnnotationView alloc]…
seapy
  • 878
  • 2
  • 13
  • 24
8
votes
3 answers

Dragging the map after dragging my MKAnnotationView does not move the MKAnnotationView with it

MKPinAnnotationView does not allow you to use a custom image as 'pin' and enable dragging at the same time, because the image will change back to the default pin as soon as you start dragging. Therefore I use an MKAnnotationView instead of an…
Pieter
  • 1,751
  • 3
  • 30
  • 65
6
votes
1 answer

Physical movement tracking on Live Mapview in Iphone sdk?

I want to track a person's movement on mapview in my iphone. I am using mapview which shows user's current location as well as one more pin which denotes another persons location say person A.I want to track person A physical Movement on my iphone…
Akshay Aher
  • 2,525
  • 2
  • 18
  • 33
6
votes
1 answer

MKPinannotation detail disclosure button - present new view

FirstViewController.h #import #import @interface TransparentToolbar : UIToolbar{ } @end @interface AddressAnnotation : NSObject { CLLocationCoordinate2D coordinate; NSString *title; NSString…
Jordan Brown
  • 638
  • 1
  • 5
  • 14
6
votes
3 answers

Using MKAnnotationView without MKMapView?

I'm wondering if it's possible to use the MKAnnotationView inside a UIView other than MKMapView? I'm trying to find an alternative to using the undocumented UICalloutView class. I can create the MKAnnotationView and add it to my view, but I can't…
Ed Anuff
  • 283
  • 2
  • 11
5
votes
1 answer

Should I remove or hide my annotations in MKMapView?

I was wondering which would be faster/more efficient when it comes to taking off annotations from the map: hiding or removing. I need to remove and add 100 or so pins every time the user zooms in or out. I can either loop through and hide all…
Vadoff
  • 9,219
  • 6
  • 43
  • 39
4
votes
1 answer

How to update information on MKPinAnnotationView?

I've had some past experience using MKMapView and MKPointAnnotation, which I used to put some pin on a map. This time I am trying to go one step further and use MKPinAnnotationView, to write a label along with some of the pins. Unfortunately, it…
Michel
  • 10,303
  • 17
  • 82
  • 179
4
votes
1 answer

How can I display a MKPinAnnotationView data (e.g. title, subtitle) in a fixed-size component below the map instead of the popup above the pin?

I have a map in my swift ios app and it is full of markers. Therefore I've decided to use marker clustering taken from here: https://github.com/ribl/FBAnnotationClusteringSwift After implementing it in my app I see pins and clusters, so that's…
user3766930
  • 5,629
  • 10
  • 51
  • 104
4
votes
1 answer

Swift - MKPinAnnotation image issue

I'm trying to change my pin annotation image to something other than the pin. func mapView(mapView: MKMapView!, viewForAnnotation annotation: MKAnnotation!) -> MKAnnotationView! { if annotation is MKUserLocation { //return…
leerob
  • 2,876
  • 1
  • 18
  • 38
4
votes
1 answer

MKMapView: Pins over the pop up

This question was asked earlier by someone else but never answered: MKAnnotation - Map Pin callout pops up behind other map pins. I ran into this problem yesturday and I have no clue what caused this problem and was hoping someone else has had this…
jakehschwartz
  • 1,005
  • 2
  • 13
  • 32
4
votes
3 answers

iPhone MapKit: Annotation images get reset back to pins

I'm adding several annotations to a MapView and using a custom image instead of the default pins. I am using the viewForAnnotation delegate method to set the custom image like this: view.image = [UIImage imageNamed:@"placemark.png"]; And I've also…
Kevin Cupp
  • 497
  • 4
  • 10
4
votes
3 answers

showsUserLocation returns pin instead of blue dot in iPhone simulator

This is my -mapView:viewForAnnotation method which drops pins when i create annotation views. But when i set mapView.showsUserLocation = YES; in -viewDidLoad, i get a pin dropped on Infinite Loop (expected - in simulator) and not the normal blue…
joec
  • 3,533
  • 10
  • 60
  • 89
4
votes
1 answer

how to show default user location and a customized annonation view in map kit?

I am using map kit and showing customized annotation view. One is carImage and the another one is userImage(as current location of user). Now I want to show current user location default which is provided by map kit.but unable to show it. How do I…
Rahul Vyas
  • 28,260
  • 49
  • 182
  • 256
4
votes
1 answer

Custom MKAnnotationView Callout

Possible Duplicates: Custom MKPinAnnotation callout bubble similar to default callout bubble How to customize the callout bubble for MKAnnotationView? Does anyone know, or have code that shows, how to create a custom MKAnnotationView Callout? I…
Ayal
  • 440
  • 1
  • 5
  • 15
1
2
3
10 11