この変数の結果とステータスは何を参照していますか? 彼らはどこから来たのか?出発地、目的地、旅行モードはどのように関数に渡されますか? 関数の結果はどこに行きますか?
$('#directions-form').submit(function(e) {
$('#error').hide();
ds.route({
origin: $('#from').val(),
destination: $('#to').val(),
travelMode: $('#mode').val()
}, function(result, status) {
if (status == google.maps.DirectionsStatus.OK) {
fitBounds = true;
dr.setDirections(result);
}
else {
$('#error').text(status).show();
}
recalcHeight();
});
e.preventDefault();
return false;
});