MKMapView, screen grabs and other discussions
MKMapView, screen grabs and other discussions
- Subject: MKMapView, screen grabs and other discussions
- From: Graham Cox <email@hidden>
- Date: Fri, 29 Nov 2013 14:14:28 +0100
Hi all,
What I want to do is to use MapKit to get imagery of a particular region, display it as a layer in an app, and allow the user to trace over it.
MapKit makes this hard, probably deliberately.
First, MKMapView is the only object available for displaying the map - there is no lower-level object that will render map data into a view of your own. This doesn’t fit very well with the existing architecture of my app - I already have a view that renders the layered content, adding the map view as a subview is not the same thing. It might be possible to make that work though, assuming I can force it to be semi-transparent, and somehow route mouse events around it to the enclosing view.
Next, MKMapView deliberately prevents -dataWithPDFInRect: from returning anything useful, so I can’t use that to capture the graphics by that route.
So, I was wondering if a screenshot approach would be feasible. I can take a screenshot of the map view and that works, but if I’m to make that work in code, it would be nice if the screenshot could be done without having to make an actual window visible and free of overlap from any other view/window. Does that sound even remotely possible?
In general, is using MapKit in such a way even allowed? It seems it could well be highly legally encumbered anyway. Thoughts?
—Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden