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) {
…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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(_…