路线中转APIGoogle更多建议?

Directions transit API Google more suggestions?

我正在尝试使用 google 地图 API 路线获取一些交通建议:

https://maps.googleapis.com/maps/api/directions/json?origin=Hauptbahnhof+M%C3%BCnchen&destination=Pasing,%2081241&mode=transit&transit_mode=train|tram|subway&key=MY(private)API

但是google returns 我只有一个最接近的bus/train。有什么方法可以让我获得至少 3 个关于如何到达定义点的最接近建议?

我的回复是这样的:只有一列火车

                 "start_location" : {
                    "lat" : 48.12606599999999,
                    "lng" : 11.663375
                 },
                 "transit_details" : {
                    "arrival_stop" : {
                       "location" : {
                          "lat" : 48.149852,
                          "lng" : 11.461872
                       },
                       "name" : "München-Pasing"
                    },
                    "arrival_time" : {
                       "text" : "20:31",
                       "time_zone" : "Europe/Berlin",
                       "value" : 1511033460
                    },
                    "departure_stop" : {
                       "location" : {
                          "lat" : 48.12606599999999,
                          "lng" : 11.663375
                       },
                       "name" : "München-Trudering"
                    },
                    "departure_time" : {
                       "text" : "20:03",
                       "time_zone" : "Europe/Berlin",
                       "value" : 1511031780
                    },
                    "headsign" : "Geltendorf",
                    "line" : {
                       "agencies" : [
                          {
                             "name" : "Deutsche Bahn AG",
                             "url" : "http://www.bahn.de/"
                          }
                       ],
                       "short_name" : "S4",
                       "vehicle" : {
                          "icon" : "//maps.gstatic.com/mapfiles/transit/iw2/6/rail2.png",
                          "local_icon" : "//maps.gstatic.com/mapfiles/transit/iw2/6/de-sbahn.png",
                          "name" : "S-Bahn",
                          "type" : "COMMUTER_TRAIN"
                       }
                    },
                    "num_stops" : 13
                 },
                 "travel_mode" : "TRANSIT"

我也在接受步行指导。老实说,我只想获得公共汽车|地铁|火车的路线 ;)

如果有聪明的人能给我一个线索,我将不胜感激:)

根据 the documentation:设置 &alternatives=true

Optional parameters

alternatives — If set to true, specifies that the Directions service may provide more than one route alternative in the response. Note that providing route alternatives may increase the response time from the server.

https://maps.googleapis.com/maps/api/directions/json?origin=Hauptbahnhof+M%C3%BCnchen&destination=Pasing,%2081241&mode=transit&transit_mode=train|tram|subway&alternatives=true&key=MY(private)API

returns 我有 4 个结果。