1

Apple's geocoding class, CLGeocoder, takes a single address string (or other types of address) and searches for matches.

If you type an address into Apple's Maps application, it shows a table view of possible matches as you type. You can then either select one of those or hit enter to geocode ALL of the possible matches.

Is there any Apple-provided API that lets me, as a 3rd party developer, get a list of possible address matches that I can display?

I believe the answer to this is no, and that Apple is using an API that's not exposed to third party developers, but I'm hoping that I'm wrong and that somebody knows a way to do this

(It's my understanding that the paid version of Google's Google Places API offers this feature, but that it's not available for free.)

I'm working in Swift, so Swift-based tutorials/sample code are preferred, but this question is really language independent.

Duncan C
  • 128,072
  • 22
  • 173
  • 272
  • Apple does not provide any public api for auto complete to my knowledge. But Google Place API does. Place Autocomplete counts toward your Google Place rate limit which has a free tier up to [1000 calls](https://developers.google.com/places/ios-api/usage) per 24 hour period. There is also an [attribution requirement](https://developers.google.com/places/ios-api/attributions) as well. – beyowulf Sep 01 '16 at 19:55
  • Why the down vote on my question? Is there something I can change to improve it's quality? – Duncan C Sep 01 '16 at 20:25
  • @beyowulf, that's my understanding about the Apple APIs as well. Can you post your response as an answer and I'll accept it after waiting in the hope that somebody else knows an Apple API we don't know about? – Duncan C Sep 01 '16 at 23:04
  • This is for a client with hundreds of thousands of customers, so they'll blow through 1000 calls in the first 1/2 hour of each day. They haven't committed to paying Google's fees yet, so for now I've only implemented a single geocode after the user presses return, using Apple's geocoding API. – Duncan C Sep 01 '16 at 23:07
  • Yeah, bummer. I would like it if Apple made whatever they're using for Maps public. `CLGeocoder` isn't designed for and doesn't really work well for autocompletion and is itself [rate limited](https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLGeocoder_class/#//apple_ref/occ/instm/CLGeocoder/geocodeAddressDictionary:completionHandler:) but in an undefined way. – beyowulf Sep 02 '16 at 00:13
  • hey @DuncanC how are you - TBC are you aware of THIS MKLocalSearchCompleter .. http://stackoverflow.com/a/38497997/294884 ?? it seems to be exactly what you are asking? – Fattie Apr 14 '17 at 15:16
  • BTW regarding down votes on this site, they are totally irrational - ignore. – Fattie Apr 14 '17 at 15:17

0 Answers0