首页 > 解决方案 > 对于 Uber 开发 API,是否可以将源地址和目标地址作为参数传递以获取成本估算响应

问题描述

对于 Uber 乘车请求,它需要开始位置(开始地理位置)、结束位置(结束地理位置)和公平 ID。

从用户的角度来看,我可以传递源地址和目标地址。是否可以将开始和结束位置作为用户提供的地址传递,或者需要使用任何 google api 手动将地址转换为地理位置。

第三个参数 fair Id,我应该在哪里找到 fair id?

我已阅读developer.uber.com 文档,对于开始位置和结束位置,地理位置是强制性的,开始和结束地址是可选的。

请协助解决问题。

标签: uber-api

解决方案


For version v1.2, you must pass the latitude and longitude of the place. The best solution is to use another api to get the latitude/longitude of a place then send the lat/longitude to thje uber api. There are a few free lat/longitude apis out there, such as google location api.

Answering this for others who may look for this in the future, since I had same question a few weeks ago.


推荐阅读