【问题标题】:Google maps Directions API - URL can be parameterized via POST?谷歌地图方向 API - 可以通过 POST 参数化 URL?
【发布时间】:2012-09-20 03:30:01
【问题描述】:

我想要求确认 Google 地图网址是否:

http://maps.googleapis.com/maps/api/directions/json

可以通过 POST 参数化。我尝试通过 GET in explorer 使用它,就像这样:

http://maps.googleapis.com/maps/api/directions/json?origin=41.90119000000001,-87.62979000000001&destination=34.052360,-118.243560&sensor=false&units=metric&language=en-US

并且工作正常,但如果我尝试通过 POST 在我的 Android 应用中使用它,请通过 OutputStream 发送此查询:

origin=19.369707,-99.266696&destination=19.022489,-98.615814&sensor=false&units=metric&language=es

我收到此错误:

{“路线”:[],“状态”:“REQUEST_DENIED”}

提前致谢。

【问题讨论】:

    标签: http google-maps post get


    【解决方案1】:

    在尝试从以下位置检索 JSON 对象进行一些测试后:

    http://maps.googleapis.com/maps/api/directions/json
    

    我可以假设只能通过 GET 对其进行参数化。

    您无法通过 POST 参数化 Google 地图路线 URL。

    我希望它对某人有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-25
      • 2019-05-11
      相关资源
      最近更新 更多