I've written this method to get the UIImage from the MKMapSnapshotter:
- (void)createSnapshot:(void (^)(UIImage *))image withOptions:(MKMapSnapshotOptions *)options
{
MKMapSnapshotter *snapshotter = [[MKMapSnapshotter…
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 =…
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:…
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…
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;
…
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,…
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…
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…
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]…
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…
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.…
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…
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…
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.