-1
我必須設置爲開車前的出行方式,它有阻力能夠標記在其中,我可以改變方向或選擇替代路線,當我沒有改變過境,不能這樣做。是否有任何限制或任何其他方式提前實現這一目標(travelMode: google.maps.TravelMode.TRANSIT
)谷歌地圖旅行中轉模式也不能拖動
function displayRoute(origin, destination, service, display) {
debugger;
service.route({
origin: { 'placeId': origin_place_id },
destination: { 'placeId': destination_place_id },
travelMode: google.maps.TravelMode.TRANSIT,
unitSystem: google.maps.UnitSystem.IMPERIAL
//travelMode: TravelMode,
//transitOptions: TransitOptions,
//drivingOptions: DrivingOptions
///avoidTolls: true
}, function (response, status) {
if (status === google.maps.DirectionsStatus.OK) {
display.setDirections(response);
} else {
alert('Could not display directions due to: ' + status);
}
});
}
謝謝!