2

我正在使用 Google 路线的 JSON 输出在我的 Android 应用程序中解析它,有没有办法使用另一种语言检索路线?在 KML 中,我曾经为另一种语言方向添加此参数 hl=xx,但我在 JSON 上尝试了这一点,但它没有效果(仍然获得英语方向)。有区域参数但我不明白如何使用它,这是解决方案(使用区域参数)吗?有任何想法吗?

这是一个示例链接:http ://maps.google.com/maps/api/directions/json?hl=fr&origin=26.2,50.6&destination=26.3,50.7&sensor=true

4

1 回答 1

4

只需language在 url 中添加参数,如下所示:

http://maps.google.com/maps/api/directions/json?origin=26.2,50.6&destination=26.3,50.7&sensor=true&language=cs

于 2012-08-01T17:35:25.987 回答