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
15
votes
7 answers

How to suppress the "Current Location" callout in map view

Tapping the pulsating blue circle representing the userLocation brings up a "Current Location" callout. Is there a way to suppress that?
charudatta
  • 409
  • 1
  • 7
  • 15
12
votes
1 answer

MKAnnotation Pin won't drag, even though set as draggable

I have been trying to put a draggable annotation on a mapview for ages. (I'm using the default pin, not my own) So far I can only display it at set coordinates (not much of an achievement, really) and I need to get the annotation first of all to…
10
votes
4 answers

Render MKMapView offscreen

I'm trying to render an MKMapView into an UIImage, without showing it on the screen. I init the map: let mapView = MKMapView(frame: CGRect(x: 0, y: 0, width: 1000, height: 1000)) mapView.delegate = self let region =…
TotoroTotoro
  • 17,524
  • 4
  • 45
  • 76
8
votes
3 answers

Smooth Movement of annotation image on Mapview

I have loaded the custom annotation image for user current location.I am updating the current user location after every 1 sec in background. NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [self…
Akshay Aher
  • 2,525
  • 2
  • 18
  • 33
8
votes
3 answers

How do you let a user add a pin to a map and get the coordinates in SwiftUI?

I have a map in a view that is centered on Chicago. I want the user to be able to place a pin/annotation on the map and then retrieve those coordinates. The map loads Chicago fine but I can't get the annotation code to work. I can't seem to find an…
7
votes
2 answers

is there a way of showing MKMapView from an angle (not directly from the top) on a specific zoom level?

In swift I'm using MapKit. I set up the outlet @IBOutlet weak var mapView: MKMapView!, used the MKMapViewDelegate, and then I'm adding some annotations. I was wondering if there's a possibility to show my map tilted and disable changing it until…
user3766930
  • 5,629
  • 10
  • 51
  • 104
7
votes
1 answer

Swift 2 MKMapViewDelegate rendererForOverlay optionality

In Swift 1.2 I have this: class UVC: NSViewController, MKMapViewDelegate { // ... // ************************************** // MARK: MapView Delegate // ************************************** func mapView(mapView: MKMapView,…
Grimxn
  • 22,115
  • 10
  • 72
  • 85
7
votes
2 answers

didUpdateUserLocation not called when view for userLocation is custom

I have an MKMapView that's supposed to track the user's location using a custom view (not the blue dot). In order to substitute this view for the blue dot, I return it thusly: - (MKAnnotationView *)mapView:(MKMapView *)mapView…
Patrick Perini
  • 22,555
  • 12
  • 59
  • 88
7
votes
2 answers

Detecting when MapView tiles are displayed

Since - (void)mapViewDidFinishLoadingMap:(MKMapView *)mapView is not called when the tiles are loaded from cache, is there a way to know when all the tiles have been loaded (either from cache or from the mapping servers) and displayed? Is there any…
Iñigo Beitia
  • 6,303
  • 4
  • 40
  • 46
6
votes
4 answers

Is this a bug with MKMapKitDelegate mapView:didUpdateUserLocation?

I've created a test application with only one view containing an MKMapView and a controller which acts as the MapView's delegate. When I do a fresh build (removed from the device completely before re-installing) and log the callbacks, I can see that…
bodacious
  • 6,608
  • 9
  • 45
  • 74
6
votes
5 answers

MKMapView crashes app when view controller popped

I have a view controller with an MKMapView that calls [self.mapView setRegion:region animated:YES]; which repositions the map from A to B. The view controller which holds the MKMapView is set as the delegate and in - (void)mapView:(MKMapView…
Jiho Kang
  • 2,482
  • 1
  • 28
  • 38
6
votes
1 answer

In each cell in UITableViewController I have embedded map. Is there a way of changing it to screenshots of map instead?

In my ios swift app I have a UITableViewController with cells added dynamically. Each cell has a MKMapView embedded and I'm setting the center of the map for each cell on different coordinates. I'm doing so by calling this method: func…
user3766930
  • 5,629
  • 10
  • 51
  • 104
6
votes
2 answers

Swift 2 MKMapViewDelegate rendererForOverlay compiler warning

I am trying to draw a polyline on a map in Swift 2. It all works well, but I get a compiler warning for this code: func mapView(mapView: MKMapView!, rendererForOverlay overlay: MKOverlay!) -> MKOverlayRenderer! { if overlay is MKPolyline { …
6
votes
4 answers

MKMapViewDelegate Command failed due to signal: Segmentation fault: 11

i have a very weird problem with a MKMapViewDelegate when i implement this method give me an error that i do not understand The error only disappear when i delete the whole function, i tried to make a empty function returning nil but give me the…
Hugo Fortis
  • 429
  • 1
  • 3
  • 16
6
votes
2 answers

mapViewDidFinishLoadingMap: called too early

My problem is simple: I'm waiting to take a screenshot of an MKMapView, and I want to do it only once the map is loaded. Unfortunately, this delegate method is almost always called before the map is actually loaded. I just get a grid, or a few…
eric.mitchell
  • 8,817
  • 12
  • 54
  • 92
1
2 3
10 11