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
1
vote
3 answers

MKMapview delegate never called even with set delegate

I have a UIView that integrate a scrollview. Inside the scrollview I have a map where a user need to move a pin. I'm gonna reuse the location of pin later. I'm setting strong reference and setting delegate ( both design and code) for the map. …
giorgio
  • 105
  • 1
  • 8
1
vote
0 answers

How to take MKMapView snapshot in landscape mode

I am able to take MKMapView snapshot in portrait mode, but not in landscape mode. I automatically rotate my UIView to landscape using the functions given below. I can see the map-view as rotated to landscape. But, when I take snapshot using…
magarwal
  • 564
  • 4
  • 17
1
vote
3 answers

removing specific mapView.overlay

I'm currently doing a project which involves mapView that needs to show a line that connects two points and circle around the user's location. My code goes like this: self.mapView.delegate = self // on viewDidLoad func mapView(_ mapView:…
Lysdexia
  • 453
  • 8
  • 22
1
vote
1 answer

MKMapView hang/freeze app after leave viewcontroller in iPhone 5c

I have a viewcontroller where MKMapView is working fine, updating map based on current location. I followed this tutorial. The Problem is when I leave the view controller the app got stuck just after call dealloc. This is happening on iPhone 5c, it…
Shuvo Joseph
  • 894
  • 1
  • 12
  • 21
1
vote
3 answers

MKPinAnnotationView not showing title

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

Handling taps on a map

I have an iOS app where I need to interfere with a map. After searching a bit I came to the conclusion that I have to use an MKMapView object and probably implement the MKMapViewDelegate protocol. I am now wondering how I can capture the touch point…
Michel
  • 10,303
  • 17
  • 82
  • 179
1
vote
2 answers

ViewForAnnotation not Called in Swift 3

I want to open a new viewcontroller when i click the PinAnnotation. But ViewForannotation is not calling when i click, But It is showing a pop up message when i click on Pin. Don't know what is happening. Here is my Code: import UIKit import…
1
vote
1 answer

Hiding MKAnnotationView Swift

I'm trying to call the mapView(mapView: MKMapView, didDeselectAnnotationView view: MKAnnotationView) function programmatically using this code: dispatch_async(dispatch_get_main_queue()) { for item in self.largeMapView.selectedAnnotations { …
Alk
  • 5,215
  • 8
  • 47
  • 116
1
vote
1 answer

Position Call Out View Above Pin Swift ios MKMapView

I have a MKAnnotation with a custom CallOut View which is added in the following code : func mapView(mapView: MKMapView, didSelectAnnotationView view: MKAnnotationView) { if view.annotation is MKUserLocation { return …
Alk
  • 5,215
  • 8
  • 47
  • 116
1
vote
1 answer

Is it not possible to get altitude from MKUserLocation in IOS MKMapKit?

Is it possible to get altitude from MKUserLocation in IOS MKMapKit? Specifically I'm trying to get altitude within the MKMapViewDelegate's callback "didUpdateUserLocation" which provides an MKUserLocation object? If not should I really be using…
Greg
  • 34,042
  • 79
  • 253
  • 454
1
vote
1 answer

MKAnnotationView creates 2 Views when i call [locationManager startUpdatingLocation] again (refreshing)

I need to show the UiView with label On MKAnnotation I am able to show[refer MKAnnotationView created Like this] but I am refreshing the App again by calling locationsUpdateAgain Method, Starting of App MKAnnotationView works fine creates only one…
Sanju
  • 1,148
  • 11
  • 26
1
vote
0 answers

How can I show start location at top and end location at bottom on mapview for route?

I am showing route between start location and end location on map for iPhone app, i want to show start location at top in map and end location at bottom, also make sure that all route should be visible on map. Below is code i tried. -(void)…
1
vote
0 answers

Is it possible to make an editable MKMapAnnotation detailView header?

Is it possible to make an editable MKMapAnnotation detailView header? I want to change my custom annotation view header label editable.
Arunkumar
  • 55
  • 1
  • 8
1
vote
1 answer

Scrolling the map to user's location or clicking on an annotation on the map causes the container view move back to the place set in the storyboard

I have a view controller named MyMapViewController which is the delegate of the map view that is in the storyboard, a view controller (i.e. a container view, 'myContainerView', in the storyboard) named MyListViewController that is the child view…
Burak
  • 525
  • 4
  • 24
1
vote
1 answer

Swift compiler error on mapView declaration

I upgraded to a newer Swift compiler and ran into this compiler error I can’t figure out how to resolve. I have a bunch of mapView functions declared from the MKMapViewDelegate. They all seem to match up except this one which throws this…
Kokanee
  • 975
  • 4
  • 9
  • 20