I want to auto-complete the address for the user as same as what google api provides in this link:
https://developers.google.com/maps/documentation/javascript/places-autocomplete?hl=en
How can i implement the same functionality using apple map kit?
I have tried to use the Geo Coder, i wrote this for example:
@IBAction func SubmitGeoCode(sender: AnyObject) {
let address = "1 Mart"
let coder = CLGeocoder()
coder.geocodeAddressString(address) { (placemarks, error) -> Void in
for placemark in placemarks! {
let lines = placemark.addressDictionary?["FormattedAddressLines"] as? [String]
for addressline in lines! {
print(addressline)
}
}
}
}
However the results are very disappointing.
Any Apple APIs available to implement such functionality, or should i head for google api ?
Thank you