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
53
votes
2 answers

VectorKit crash reports with MKMapSnapshotter on iOS

I'm getting different kind of crash reports related to VectorKit and MKMapSnapShotter. Crashes occur pretty random, but it seems like they happen most when returning from the background. The device does not send out any memory warnings before it…
Jorn van Dijk
  • 1,973
  • 1
  • 15
  • 23
43
votes
3 answers

Snapshot of MKMapView in iOS7

I am trying to create a snapshot of a MKMapView in iOS7 application the same way it's recommended everywhere for previous iOS versions: - (UIImage*) renderMapViewToImage { UIGraphicsBeginImageContextWithOptions(mapView.frame.size, NO, 0.0); …
Michael
  • 603
  • 2
  • 7
  • 8
13
votes
2 answers

Swift 3 Add custom annotation pin to MKMapSnapShotter snapshot

I'm learning Swift 3 on my own, and my current learning project involves allowing the user to snap a photo and get a map snapshot with the current location pinned. I've relied on this answer from Aug 2015 and this answer from Jun 2016 for guidance,…
niblettes
  • 165
  • 1
  • 8
13
votes
1 answer

Creating an MKMapSnapshotter with an MKPolylineRenderer

I thought iOS 7's MKMapSnapshotters would be a simple way to take a snapshot of an MKMapView, the benefit is that you can do it without loading the map into view. Even though it seems like more work to add pins and overlays (because of the need for…
PostCodeism
  • 1,070
  • 1
  • 12
  • 20
11
votes
4 answers

iOS MKMapShapshotter completion block is not always being called

I am trying to use the new iOS7 MKMapSnapshotter to generate a static map image. Whenever my app needs a map, I call the following: MKMapSnapshotter *snapshotter = [[[MKMapSnapshotter alloc] initWithOptions:theOptions] autorelease]; dispatch_queue_t…
vm2000
  • 332
  • 1
  • 14
10
votes
0 answers

MKMapSnapshotter uses incredible amounts of CPU & RAM

MKMapSnapshotter seems to use up to 2GB of RAM when in the simulator, and triggers memory warnings and hangs my app for a very long time on the device. I'm not sure what part of my settings is causing this. This huge usage occurs when retrieving…
Morgan Harris
  • 2,589
  • 14
  • 17
9
votes
3 answers

How do you add MKPolylines to MKSnapShotter in swift 3?

Is there a way to take a screenshot of mapView and include the polyline? I believe I need to draw CGPoint's on the image that the MKSnapShotter returns, but I am unsure on how to do so. Current code func takeSnapshot(mapView: MKMapView,…
Derivative
  • 267
  • 1
  • 3
  • 11
7
votes
1 answer

MKMapSnapshotOptions : Adding snapshot of Custom Pin Annotation View or UIView

I am trying to get snapshot of map view with startWithCompletionHandler methods of MKMapSnapshotter. and I want to add Custom Pin Annotation View to snap shot. and there is a label in my custom annotation view. so I can not show that label when ı…
ali
  • 481
  • 5
  • 15
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

How to determine the correct altitude for an MKMapCamera focusing on an MKPolygon

I need to figure out how to set up MKMapSnapshotterOptions to take a snapshot of aerial/satellite imagery associated with a polygonal region of the earth. Filling out the 'region', 'scale', 'size', and 'mapType' properties are trivial, as I have an…
4
votes
0 answers

Capturing the whole world with MKMapSnapshotter

I am trying to get an image of the whole world with the MKMapSnapshotter Api for iOS. It doesn't matter whether I set the MKMapSnapshotterOptions's mapRect to MKMapRectWorld or the region to Span(180,360) it always creates an image from the edge of…
leoMehlig
  • 53
  • 5
4
votes
1 answer

Keep MKMapSnapshotter as NSData in memory - Swift

I'm trying to take a screenshot of my MKMapView. I usually achieved this using the below code in Objective C. I'm wondering how I would keep the NSData object in memory, rather than saving the image, and then reading from it straight away. I'm also…
Fudgey
  • 3,793
  • 7
  • 32
  • 53
4
votes
2 answers

MKMapSnapshotter removes "Legal" from snapshots

I am using the MKMapSnapshotter to create a UIImage screenshot of a small MKMapView (and stored for later use). But one thing I have noticed is that it removes the "Legal" label from the snapshot. Here the answer states that removing the "Legal" is…
n00bProgrammer
  • 4,261
  • 3
  • 32
  • 60
3
votes
0 answers

MapKit: MKMapSnapshotter with custom tile source

How can I set a custom tile source (GCTileOverlay) of the MKMapSnapshotter? Is there any way or workaround to do so?
KrauseFx
  • 11,551
  • 7
  • 46
  • 53
2
votes
1 answer

Android: how to get an image of a location with latitude and longitude

On iOS, when we have a location's latitude and longitude, we can use MKMapSnapshotter to create an image. How to achieve this on Android? In the screenshot below from an iOS app, a snapshot of the map can be created with a latitude and a longitude.
Anky An
  • 620
  • 7
  • 19
1
2 3