-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);
}
});
}
谢谢!