api - 如何在 Google Maps Directions api 中获取所有公交站?

标签 api google-maps google-directions-api transit

我向 Google Maps Directions 发出了 HTTP 请求,其中包括公交步骤。响应中的运输步骤仅返回带有出发和到达站点以及它们之间的站点数量的信息的对象 (5)。

<transit_details>
      <departure_stop>
        <name>Wien Mitte-Landstraße</name>
        <location>
          <lat>48.2060950</lat>
          <lng>16.3848860</lng>
        </location>
      </departure_stop>
      <arrival_stop>
        <name>Wien Hbf (Bahnsteige 1-2)</name>
        <location>
          <lat>48.1861220</lat>
          <lng>16.3755230</lng>
        </location> 
      </arrival_stop>
      <line>  
        <short_name>S 1</short_name>
        <vehicle>
          <name>Commuter train</name>
          <type>COMMUTER_TRAIN</type>
          <icon>//maps.gstatic.com/mapfiles/transit/iw2/6/rail.png</icon>
        </vehicle>
        <agency>
          <name>ÖBB</name>
          <url>http://www.oebb.at/</url>
        </agency>
      </line>
      <num_stops>5</num_stops>
      <headsign>Mödling</headsign>
      <departure_time>
        <value>1439805780</value>
        <text>12:03pm</text>
        <time_zone>Europe/Berlin</time_zone>
      </departure_time>
      <arrival_time>
        <value>1439806200</value>
        <text>12:10pm</text>
        <time_zone>Europe/Berlin</time_zone>
      </arrival_time>
    </transit_details>

我需要的是沿途所有单独停靠点的详细信息。有没有办法获取这种信息?

最佳答案

目前无法在 Google API 中获取该信息。 gmaps api 错误跟踪器中有一个正在审核中的问题:https://code.google.com/p/gmaps-api-issues/issues/detail?id=7807

请务必单击星标以表示您对添加它的支持。

关于api - 如何在 Google Maps Directions api 中获取所有公交站?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32479372/

相关文章:

python - 使用 python 更新 Google 搜索方法

java - 使用 Bloomberg API 绘制历史最新价格图表

java - Android中获取当前位置方向的位置

javascript - AngularJS 谷歌地图点击事件不会在 ios 设备 ipad 和 iphone 中触发

android - 两个纬度和经度之间的行程距离

asp.net - Facebook API - 无效的签名请求。 (签名无效。)

javascript - 检查网页上是否安装了特定的 Chrome 扩展程序

ios - 适用于 iOS 的 Google map [ map 气球]

google-apps-script - 提供 API key 以避免 Apps 脚本中的 map 服务出现命中限制错误

java - 如何让 Google 路线保持在指定路线上到达某个地方?