mapbox / mapbox/MapboxGeocoder.swift
Batch reverse geocoding doesn't work
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 133
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
I'm experiencing an issue when I triggered batch reverse geocoding. Single reverse geocoding worked for me.
Here is my batch reverse geocoding code:
let options = ReverseBatchGeocodeOptions(coordinates: coordinates)
let task = self.geocoder.batchGeocode(options) { (results, attributes, error) in
DispatchQueue.main.async {
if let error = error {
print("batch lookup error: \(error)")
}
if let results = results {
print("got results")
}
}
}
task.resume()
And here is error message:
[LocationLookUp] batch lookup error: Error Domain=NSCocoaErrorDomain Code=4864 "Expected to decode Array<Any> but found a dictionary instead." UserInfo={NSDebugDescription=Expected to decode Array<Any> but found a dictionary instead., NSLocalizedFailureReason=Permanent geocodes are not enabled for this account. Contact support@mapbox.com to enable this feature., NSUnderlyingError=0x2805972a0 {Error Domain=NSCocoaErrorDomain Code=4864 "Expected to decode Array<Any> but found a dictionary instead." UserInfo={NSDebugDescription=Expected to decode Array<Any> but found a dictionary instead., NSCodingPath=(
)}}, NSCodingPath=(
)}
How can I resolve the issue?
MapboxGeocoder.swift version is v0.11.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the batchGeocode entry point in MapboxGeocoder.swift and inspect how the v0.11.0 client decodes batch responses and surfaces the reported account error. Compare that behavior with the batch reverse-geocoding API response; done means the failure mode and supported resolution are clearly documented or a focused client issue is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api, mobile-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100