4

我向 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>

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

4

2 回答 2

2

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

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

于 2015-12-08T22:56:43.210 回答
0

对于请求中的每个航路点,路线响应包括一个附加条目,以提供旅程该段的相应详细信息

于 2015-09-09T16:50:55.193 回答