Re: MapKit on iPad
Re: MapKit on iPad
- Subject: Re: MapKit on iPad
- From: Fritz Anderson <email@hidden>
- Date: Mon, 8 Nov 2010 11:16:16 -0600
On 7 Nov 2010, at 8:41 PM, William Squires wrote:
> 1) I know that an MKMapView can display a location given GPS coords, and that it can do reverse geo-caching to get the nearest address to a GPS coordinate. Can it go the other way - i.e. can I feed it an address (in an NSString) of the form: "<physical address>,<city>,<state> <zip>" (these are all US addresses) and get it to show that location directly, or at least give me the GPS coords to feed to it? Will it work for addresses in Mexico (if I leave off the zip code)?
No. Reading the MapKit docs will tell you affirmatively that MapKit does not geocode (the word you mean instead of geocache). Google for "free geocoding service." Further, examine the Google license referenced in most of the docs: I believe you are forbidden to use the reverse-geocoding service for any purpose other than use with a Google-provided map.
You can use the Google Static Map API directly to get a smallish PNG of a map centered on an address, if that's all you need.
> 2) Can I take a snapshot of an MKMapView (in a format UIImage can handle) and use it to cache the display once the MKMapView loads and the user is finished zooming in/out, sliding it around, etc... by touching a UIButton?
I believe the Apple/Google ecosystem intends that MapKit maps are to be used only for immediate display to the user. I don't see any way to capture a map image as data.
> 3) what are the odds Apple dev would be willing to update the iPhone simulator to be initialized to display any GPS coords (when using an MKMapView) instead of their corporate HQ if I file a feature request? Even better if the simulator, on startup, would detect any iDevice (iPod Touch/iPhone/iPad) and use its hardware features (GPS, accelerometer, mag compass, camera, etc...) during the simulation if the device shows up in Xcode's Organizer window. It would be OK if you had to load a special iOS program onto the device (from the App store) to make this work as long as it was free for those in the iOS dev program (i.e. they paid the $99 fee)
I don't know the odds, but you can do something about it. File a bug at bugreporter.apple.com requesting the features. I have heard that Apple has a defaults switch for the simulator that allows it to use the Mac Location Services location instead of the static Cupertino one; there have been requests to expose/document that setting. Add your voice with a bug report.
But you'll have to test on a real device sooner or later. This is just one more thing you need to test.
— F
_______________________________________________
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