FR: allow lat/lng str instead of float

未關閉
#503 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
python
領域
api

研究方向

從 client.elevation 入口開始,使用重現出的 latitude/longitude 字串清單,接著檢查 issue 中提到的 polyline-encoding 路徑。完成的標準是,所示的多位置請求能接受這些字串座標並回傳海拔結果,而不要求手動進行 float 轉換;如果專案有相關的測試位置,請為該範例新增或執行 coverage。

由索引模型根據 Issue 內容生成。

描述

triage me type: feature request

Is your feature request related to a problem? Please describe.
A multi-location elevation() request throws an err when the locs are a list of lat/lng strings.

Describe the solution you'd like
I would have expected this to work.

locations = [('40.714728', '-73.998672'), ('-34.397', '150.644')]
results = client.elevation(locations)

Since I'm retrieving them from json text and googlemaps eventually returns them as json text, why require manual/interim conversion to floats?

Additional context
It appears this might be due to the polyline encoding. But still...why is that mandatory for small lists of coords?

主要語言
Python
星號
5k
分支
1.4k
平均合併
5 小時 9 分鐘
30 天內合併 PR
1

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

googlemaps/google-maps-services-python 的其他 Issue

查看 googlemaps/google-maps-services-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。