Questions tagged [mkmapsnapshotter]

MKMapSnapshotter is part of iOS 7 MapKit

It allows to capture map snapshots that can be processed as an image.

44 questions
2
votes
1 answer

Download and cache the MKMapSnapshotter image using SDWebimage

I want to show mapView in UITableViewCells, So I actually wrote this code class DataPointTableCell: UITableViewCell { @IBOutlet weak var mapView: MKMapView! func addAnnotaionToMapView(_ coordinates: Coordinate) { …
Anirudha Mahale
  • 2,526
  • 3
  • 37
  • 57
2
votes
1 answer

How to draw a CLLocationCoordinate2Ds on MKMapSnapshotter (drawing on mapView printed image)

I have mapView with array of CLLocationCoordinate2D. I use these locations to draw lines on my mapView by using MKPolyline. Now i want to store it as a UIimage. I found that theres class MKMapSnapshotter but unfortunately i can't draw overlays on it…
ShadeToD
  • 403
  • 9
  • 22
2
votes
1 answer

How do I use MKMapSnapshotter in the background?

I've got an app that is supposed to fetch objects in the background and use their location data to generate a map snapshot for them. Naturally I tried MKMapSnapshotter. It turns out (after weeks of being confused about black map snapshots) that this…
TealShift
  • 842
  • 5
  • 19
2
votes
2 answers

MKMapSnapshotter startWithCompletionHandler never called

Is there any reason why the completion handler on MKMapSnapshotter's startWithCompletionHandler method would not get called back? (not even with error!!) I'm not doing anything fancy, just grabbing a snapshot and displaying it, all in the…
static0886
  • 784
  • 9
  • 25
2
votes
1 answer

MKMapSnapshotter WatchKit memory error

I have some major issues with the MKSnapshotter when testing my 'Watch Application' / iOS app watch extension on a real iPhone connected to a Apple Watch! Inside one of my Interface Controllers I call the following function: func…
iVentis
  • 993
  • 6
  • 19
2
votes
1 answer

MKMapSnapshotter in MKTileOverlay appears displaced

I'm overriding the loadTileAtPath:result: method of MKTileOverlay with the following code. It simply converts the MKTileOverlayPath into an MKMapRect, and then uses MKMapSnapshotter to take a snapshot of the map area that's being looked at. From…
Andrew
  • 7,693
  • 11
  • 43
  • 81
2
votes
1 answer

Convert MKTileOverlayPath to MKMapRect?

I'm using the method: - (void)loadTileAtPath:(MKTileOverlayPath)path result:(void (^)(NSData *data, NSError *error))result The MKTileOverlayPath gives me an x, y and z. I'm trying to take this path and take a snapshot of what the…
Andrew
  • 7,693
  • 11
  • 43
  • 81
2
votes
0 answers

MKMapSnapshotter satellite error image when camera zoom / altitude level is close in

I am getting an error image when I use MKMapsnapshotter. I tried manually zooming out (setting a higher camera altitude) and that seems to fix the issue, but I am not sure how to handle this programmatically. Is there a way to detect this kind of…
leok
  • 31
  • 7
2
votes
3 answers

Share MKMapView screenshot

I have a MKMapView and I would like to take a screenshot of it and share it to a social network, for example to Facebook. I've found a nice way to make the screenshot, using MKMapSnapshotter (which is available starting with iOS 7), but my question…
iOS Dev
  • 4,143
  • 5
  • 30
  • 58
1
vote
0 answers

MKMapSnapshotter doesn't return exact region

Given a specific region, I want to get a map image, which I am doing with the Swift MKMapSnapshotter. The image is well received, however when I use the snapshot.point function to find the right pixel based on corner coordinates, it's not exactly…
1
vote
1 answer

Create a clickable map preview using MKMapSnapshotter

I have a map that currently shows the user's current location with no pin to show them exactly where they are. I want to make the map a photo of where the user's set location is. I only know how to show where their device is and need them to be able…
1
vote
1 answer

How to set fillColor and strokColor for path in swift

I am getting image of certain area using MKMapSnapshotter. I draw lines on the image using UIGraphicsGetCurrentContext() to show polygon, I can set the lines colour but I am unable to set fill color to the polygon. Below is the code private func…
Anirudha Mahale
  • 2,526
  • 3
  • 37
  • 57
1
vote
0 answers

iOS MKMapSnapshotter in simulator not working?

I try desperately to get the MKMapSnapshotter running on the simulator. However it works without issues on real devices, but not on the simulator which brings some trouble for me now with different iOS versions I do not have as hardware. Is it by…
CptLeChuck70
  • 85
  • 10
1
vote
1 answer

Objective-C: Pass a map snapshot to view controller in prepareForSegue

I'm trying to segue from a mapView to a page that contains a snapshot of a chosen location on that mapView. Here is my prepareForSegue method: - (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier…
Philip S
  • 502
  • 6
  • 18
1
vote
0 answers

High resolution screen shot from map

I want screen shot from specific location of my Mapview. and i have used following code. its worked properly but screen shot is little bit blur. i want high resolution of Screen shot. please check my code. Thanks.! func takeSnapShotForSaveSearch(_…
Khushbu Desai
  • 1,003
  • 1
  • 10
  • 32