Questions tagged [mkmapviewdelegate]

MKMapViewDelegate is a protocol that describes events originating from an MKMapView.

MKMapViewDelegate is a protocol that describes events originating from an MKMapView. Interested classes can get messages for changes to the map's annotations, overlays, visible region, and user location updates.

For more information, see the Apple Documentation for MKMapViewDelegate.

160 questions
6
votes
1 answer

MKMapView Clicking on pins won't call didSelectAnnotationView

I am using a mapView and am trying to make a callout pop up when you click on a pin which is shown on the map. The pins manage to be placed in the proper locations so I think the annotations work but when I click on the pin it won't show a callout.…
5
votes
2 answers

In which case that mapView:viewForAnnotation: will be called?

Now I want to add a static pin annotation on map in my iOS app. But I just want to know if the delegate method mapView:viewForAnnotation: will be called. In the Apple documentation, it is said that When it needs an annotation view, the map view…
dannail
  • 455
  • 2
  • 10
  • 27
5
votes
1 answer

Is there a way to set z-order in the annotation view layer?

I want to have some annotationView images appear on top of the others so they are easier to see. Is there a way to set the order? I thought I would try something like [theMap addAnnotations:arrayOfLessImportantItems]; [theMap…
Jim
  • 5,940
  • 9
  • 44
  • 91
5
votes
1 answer

is there any way of allowing zooming MKMapView only to a specific region, while disabling any other user interaction?

I have a swift app with a MapView. These are my settings on story board for the map: Also, in the code I'm doing: let regionRadius: CLLocationDistance = 10000 let initialLocation = CLLocation(latitude: latitude, longitude:…
user3766930
  • 5,629
  • 10
  • 51
  • 104
5
votes
1 answer

MKMapView setting zoom limit without bouncing

There is a lot of questions and answers on stackoverflow about max zoom for MKMapView, for exmaple: Is there way to limit MKMapView maximum zoom level? Unfortunately non of the answers actually worked for me (or I just did not implement correctly).…
sash
  • 8,423
  • 5
  • 63
  • 74
5
votes
1 answer

Why is my MKPointAnnotation not Custom?

My MKPointAnnotation should with this code be custom: -(MKPointAnnotation*)setAnnotation: (NSString*) title atLocation:(CLLocationCoordinate2D)Location withImage:(UIImage*) LocationImage{ Pin = [[MKPointAnnotation alloc] init]; Pin.title =…
Black Magic
  • 2,706
  • 5
  • 35
  • 58
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
2 answers

Swift MKMapViewDelegate - Transferring coordinates between view controllers

I am trying to construct a Map App that can receive user inputs of latitude and longitude coordinates that when entered, will place a pin on a map in a different tab. My FirstVC consists of a button "Add Locations" that segues to OtherVC which the…
Kevin
  • 1,189
  • 2
  • 17
  • 44
4
votes
2 answers

Map view Annotation Delegates for swift 3.0

// MARK: - MapView Delegate override func mapView(_ mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -> MKAnnotationView? { var anView = mapView.dequeueReusableAnnotationView(withIdentifier: annotationReuseId) if anView ==…
samad5353
  • 381
  • 1
  • 5
  • 18
4
votes
3 answers

Center MKMapView BEFORE displaying callout

I am trying to center an MKMapView after an annotation was selected. I also have enabled canShowCallout but it seems that iOS is first displaying the callout (which is shifted when it would not fit in the screen) and then the map is being moved,…
Ch1llb4y
  • 331
  • 2
  • 13
4
votes
0 answers

MKAnnotation with custom bubleview in put button for ios?

I have create BubbleView in mapview. In bubble i have put the button but i have not click on button. How can i implement please help me. I have tried....... customCalloutView.h #import @interface customCalloutView :…
Rohit suvagiya
  • 1,005
  • 2
  • 12
  • 40
4
votes
1 answer

can not override GetRendererForOverlay on monotouch

I want to draw an overlay on top of my MKMapView So I defined this delegate class for defining the view of overlays. but as you can see it seems that from iOS 7 it is recommended that we use GetRendererForOverlay instead of GetViewForOverlay. The…
Husein Behboudi Rad
  • 5,434
  • 11
  • 57
  • 115
4
votes
1 answer

MKPinAnnotationView rightCalloutAccessoryView doesn't send calloutAccessoryControlTapped on iOS7

I'm trying to update one of my applications to iOS7. The problem is that, on my MKMapView, when I tap a pin, it shows the Callout, but when clicking on the rightCalloutAccessoryView, it doesn't send any callback to the delegate anymore. Thus I can't…
Nerkatel
  • 1,805
  • 16
  • 25
4
votes
1 answer

Detecting panning + decelerate of MKMapView

I'm trying to capture panning and the 'end of scrolling' on an MKMapView. Panning is easy to do with a gesture recognizer. However, MKMapView doesn't seem to implement a UIScrollViewDelegate in iOS 6. That makes the solution in Is there way to limit…
JeremyDay
  • 430
  • 6
  • 19
3
votes
1 answer

Issue with Map view delegate method 'mapView:regionDidChange:' do not call

while using map view in my application some times MKMapKit delegate method 'mapView: regionDidChange' do not call. Its happens only when I drag the map. but when i zoom in or Zoom out Its working perfectly. So its create issue related to place new…
Victor
  • 127
  • 1
  • 8
1
2
3
10 11