mapbox / mapbox/MapboxGeocoder.swift

Batch reverse geocoding doesn't work

未关闭
#198 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Swift
星标
133
派生
46
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 MapboxGeocoder.swift 中的 batchGeocode 入口开始,检查 v0.11.0 客户端如何解码批量响应,以及如何呈现报告的账户错误。将该行为与 batch reverse-geocoding API 响应进行比较;当失败模式和支持的解决方案得到清晰记录,或确定了一个针对性明确的客户端 issue 时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
swift
领域
api, mobile-dev
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。