I am implementing address search api in iOS application using the following reference link: https://developers.arcgis.com/ios/swift/sample-code/find-address/
My relevant code is,
private let locatorTask = AGSLocatorTask(url: URL(string: "https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer")!)
let geocodeParameters = AGSGeocodeParameters()
geocodeParameters.resultAttributeNames.append(contentsOf: ["*"])
geocodeParameters.countryCode = "NZL"
geocodeParameters.minScore = 75 // Perform geocode with input text.
self.locatorTask.geocode(withSearchText: text, parameters: geocodeParameters) { [weak self] (results: [AGSGeocodeResult]?, error: Error?) in guard let self = self else { return }
}
I am restricting my search country to "NZL". For a specific address search, it is not returning any result. (Eg: Mears Rd). But it is working if I enter the full address. For a few addresses, it is working fine (Eg: Kotare Rd). I have attached a screenshot for reference. Can anyone help me to make it work?
Thanks.