mapbox / mapbox/MapboxGeocoder.swift

Batch reverse geocoding doesn't work

オープン
#198 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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. リポジトリをフォークし、ブランチを切って変更します。
  4. 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 を短くまとめたダイジェスト。