更新时间:2023-02-14 13:48:50
当设置为true时,provideRouteAlternatives(可选)指定路线服务可以在响应中提供多个
路线替代方案。请注意,提供路由选择可能会增加
服务器的响应时间。
provideRouteAlternatives (optional) when 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.
example
var request = {
origin: start,
destination: end,
travelMode: google.maps.DirectionsTravelMode.DRIVING,
provideRouteAlternatives: true
};