Skip to content

Batch reverse geocoding doesn't work #198

@thestrong21

Description

@thestrong21

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 [email protected] 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions