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

MKMapSnapshotter completion handler never works

I've written this method to get the UIImage from the MKMapSnapshotter: - (void)createSnapshot:(void (^)(UIImage *))image withOptions:(MKMapSnapshotOptions *)options { MKMapSnapshotter *snapshotter = [[MKMapSnapshotter…
alecnash
  • 1,750
  • 1
  • 18
  • 42
1
vote
1 answer

MKMapSnapshotter renders borders white

I am using MKMapSnapshotter to create a screenshot of a map which I then display in an UIImageView. let imageView = UIImageView() imageView.frame = view.bounds view.addSubview(imageView) let options = MKMapSnapshotOptions() options.scale =…
hennes
  • 9,147
  • 4
  • 43
  • 63
1
vote
1 answer

Clear MKSnapshotter memory

Im currently using the MKSnapshotter but I noticed (similar to MKMapView) that it holds on to a high memory consumption and never releases it for the duration of the app. I've tried releasing the memory but no use:…
DevC
  • 6,982
  • 9
  • 45
  • 80
1
vote
1 answer

Returning previous MKPinAnnotation coordinate from MKMapSnapShot

I have two view controllers, MapViewVC and MapDetailViewVC. I have several custom pin annotations on the MapView. When tapped, these annotations (with a certain default "altitude" view) initiate a the MapDetailVC that shows a snapshot of the…
jdlace
  • 341
  • 3
  • 8
1
vote
1 answer

MKAnnotationView image is not displayed on result snapshot image iOS 7

I`ve created similar code as was shown on WWDC for displaying pin on snapshots, but pin image is not displayed: MKMapSnapshotOptions *options = [[MKMapSnapshotOptions alloc] init]; options.region = self.mapView.region; options.scale = 2; …
Dimitrio
  • 151
  • 4
  • 12
0
votes
0 answers

How to avoid a segment connection between start point and end point on a map view to get printed image with MKMapSnapshotter?

I'm trying to draw a route on my Map View in Swift. The below is what I drew with MKMapSnapshotter. My problem is that the first and the last points of my route(coordinate) are always connected by segment so that they looks like a closed loop. Here,…
Hoyeon Lee
  • 103
  • 6
0
votes
2 answers

UITableView Async image not always correct

I have a UITableView and during the initial loading of my app it sends multiple API requests. As each API request returns, I add a new row to the UITableView. So the initial loading adds rows in random orders at random times (Mostly it all happens…
Darren
  • 10,182
  • 20
  • 95
  • 162
0
votes
1 answer

MKMapSnapshotter memory crash - multiple calls in a UITableView

We have an iOS app that has a UITableView containing map snapshots that are generated when the cells appear. The sample list we are using is simply showing the map snapshots based on a lat/long provided in a Model class. I started noticing memory…
svguerin3
  • 2,433
  • 3
  • 29
  • 53
0
votes
1 answer

MKMapSnapshotter 'completionHandler' not called on iPhone 6/6+

I'm developing app that works with MKMapSnapshotter API. It makes snap shot of map with required region. Code for it called from foreground app state and from main thread, like this: MKMapSnapshotOptions* options = [[MKMapSnapshotOptions alloc]…
Evgeny Karkan
  • 8,782
  • 2
  • 32
  • 38
0
votes
1 answer

MKMapSnapshotter completionHandler never called in parent app when called from WatchKit

I have this weird issue: I call the parent app with openParentApplication:reply: as normal. It is nicely doing its job getting some data from the internet using async NSURLRequests but when I want to get a map image using MKMapSnapshotter (still in…
Tibidabo
  • 21,461
  • 5
  • 90
  • 86
0
votes
1 answer

MKMapSnapshotter takes long time for creating Image

I have a working MKMapSnapshotter in my awakeWithContext and i want to set its image for my imageView. The problem is, that the MKMapSnapshotter is to slow and the image won't be set. Only one or two seconds later, it creates the snapshot image.…
Alex K.
  • 41
  • 5
0
votes
1 answer

Create multiple MKMapView snapshots serially

I wrote and use THIS CLASS to create small snapshot images of MKMapView with a custom annotation, and set them inside an UIImageView in a UITableViewCell. I wrote it in such a manner, to invoke and forget, without worrying too much about memory…
n00bProgrammer
  • 4,261
  • 3
  • 32
  • 60
0
votes
1 answer

MKMapSnapshotter works but I can't share the UIImage

I have a problem with MKMapSnapshotter. I currently have two views, one with a UIButton, which shows a UIActivityViewController and one with a MKMapView, which shows current user location. The UIActivityViewController is used to share user's…
Aluminum
  • 2,932
  • 5
  • 35
  • 63
-1
votes
1 answer

MKMapView to UIImage with Overlays

How do you take an UIImage of MKMapView with overlays like MKPolylines? I tried renderInContext and MKMapSnapshotter but none include the map and its overlays in the produced image. renderInContext doesn't work in iOS 7 at all.
smartfuse
  • 51
  • 6
1 2
3