I have a query regarding clgeocoder apis , basically in our app we have a provision to add address manually by user by giving region, city and place details etc; when I try to fetch lat long values via CLgeocoder geocodeAddressString api its throwing following error Error Domain=kCLErrorDomain Code=8 "(null)" (Here the region selected is peru). When i change region to India in device and add address manually it works and iam able to fetch lat long values.
Iam attaching code below for reference
Can some one help to resolve this region specific issue func getLatLong () { let address = " 1850, Av. angamos este , Municipalidad Metropolitana de Lima, Surquillo, PERU" let geocoder = CLGeocoder()
geocoder.geocodeAddressString(address) { (placemarks, error) in
if error == nil {
print(placemarks)
} else {
print(error)
}
}
}
ima expecting to receive lat long values irrespective of selected region in device