mapbox / mapbox/MapboxGeocoder.swift
Placeholder Attributes Not Correctly Set
まだ誰も着手していません。
- 主要言語
- Swift
- スター
- 133
- フォーク
- 46
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Description
When making a forward Geocoding request, all the placemarks in the response should have their usual attributes (i.e. the attributes included in a vanilla cURL request to the Geocoding API). However, for some reason there are placemark attributes that are not being set.
Here's an example request:
let options = ForwardGeocodeOptions(query: "Hong Kong")
options.allowedScopes = [.place, .locality]
options.maximumResultCount = 5
geocodingDataTask = geocoder.geocode(options) { [unowned self] (placemarks, attribution, error) in
if let error = error {
NSLog("%@", error)
} else if let placemarks = placemarks, !placemarks.isEmpty {
for placemark in placemarks {
print(placemark.name)
print(placemark.code)
print(placemark.country?.code)
print(placemark.administrativeRegion?.address)
}
} else {
self.resultsLabel.text = "No results"
}
}
Expected
In the Geocoding API playground, the result of a query with the same parameters includes "short_code" which should be the placemark.code value that is printed in the above code block.

Actual
When the above code block is run, all but placemark.name return nil values:
Hong Kong
nil
nil
nil
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず「Hong Kong,」に対する ForwardGeocodeOptions と geocoder.geocode の例を再現し、返された placemark を Geocoding API playground のレスポンスと比較します。forward-geocoding のレスポンスが placemark.name、placemark.code、country.code、administrativeRegion.address にどのように値を設定するかを追跡します。これらの期待される属性が nil でなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- swift
- 領域
- api, mobile-dev
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100