Skip to content

Batch reverse geocoding doesn't work #198

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 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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