Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Trasa pojazdu
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Interfejsy Routes Preferred API obsługują 4 tryby podróży:
- Dysk
- Spacer
- Rower
- Motocykl
Motocykl odnosi się do pojazdów dwukołowych z napędem (np. motocykli).
Tryb podróży motocyklem różni się od trybu podróży rowerem, który jest trybem podróży z napędem ręcznym.
Określanie trybu podróży motocyklem
Gdy wywołujesz interfejsy Routes Preferred API, używasz wartości typu wyliczeniowego
RouteTravelMode
, aby określić tryb podróży.
Przykład
Poniższy przykład pokazuje, jak ustawić tryb podróży w treści żądania metody ComputeRoutes().
{
"origin":{
"location":{
"latLng":{
"latitude":37.419734,
"longitude":-122.0827784
}
}
},
"destination":{
"location":{
"latLng":{
"latitude":37.417670,
"longitude":-122.079595
}
}
},
"travelMode":"TWO_WHEELER"
}
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2026-05-31 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2026-05-31 UTC."],[],["The Routes Preferred APIs support four travel modes: Drive, Walk, Bicycle, and Two-wheeler, where Two-wheeler refers to motorized two-wheeled vehicles. To use a specific mode, utilize the `RouteTravelMode` enumeration in the API call. For example, to specify the two-wheeler mode in the `ComputeRoutes()` method request body, set the `\"travelMode\"` parameter to `\"TWO_WHEELER\"`. The two-wheeler mode is distinct from the bicycle mode, which is human-powered.\n"]]