TransitPreferences
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
반환되는 경로에 영향을 미치는 TRANSIT
기반 경로에 대한 환경설정입니다.
필드 |
allowedTravelModes[] |
enum (TransitTravelMode )
TRANSIT 경로를 가져올 때 사용할 이동 수단의 집합입니다. 기본적으로 지원되는 모든 이동 모드로 설정됩니다.
|
routingPreference |
enum (TransitRoutingPreference )
지정된 경우 반환되는 TRANSIT 경로에 영향을 미치는 라우팅 환경설정입니다.
|
TransitTravelMode
대중교통 수단을 지정하는 데 사용되는 값 집합입니다.
열거형 |
TRANSIT_TRAVEL_MODE_UNSPECIFIED |
지정된 대중교통 이동 수단이 없습니다. |
BUS |
버스로 이동 |
SUBWAY |
지하철로 이동하세요. |
TRAIN |
기차를 이용해 보세요. |
LIGHT_RAIL |
경전철 또는 전차로 이동 |
RAIL |
기차를 이용해서 이동하세요. 이는 SUBWAY , TRAIN , LIGHT_RAIL 의 조합과 동일합니다. |
TransitRoutingPreference
열거형 |
TRANSIT_ROUTING_PREFERENCE_UNSPECIFIED |
선호사항이 지정되지 않았습니다. |
LESS_WALKING |
경로 계산 시 도보 이동을 제한해야 함을 나타냅니다. |
FEWER_TRANSFERS |
경로 계산 시 환승 횟수를 제한해야 함을 나타냅니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003e\u003ccode\u003eTransitPreferences\u003c/code\u003e influence the \u003ccode\u003eTRANSIT\u003c/code\u003e based routes that are returned.\u003c/p\u003e\n"],["\u003cp\u003eYou can specify transit travel modes such as \u003ccode\u003eBUS\u003c/code\u003e, \u003ccode\u003eSUBWAY\u003c/code\u003e, \u003ccode\u003eTRAIN\u003c/code\u003e, \u003ccode\u003eLIGHT_RAIL\u003c/code\u003e, and \u003ccode\u003eRAIL\u003c/code\u003e or use the default of all supported modes.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTransitPreferences\u003c/code\u003e also allow you to indicate preferences for \u003ccode\u003eLESS_WALKING\u003c/code\u003e or \u003ccode\u003eFEWER_TRANSFERS\u003c/code\u003e when calculating a route.\u003c/p\u003e\n"]]],["The content outlines preferences for `TRANSIT` routes, using a JSON structure with `allowedTravelModes` and `routingPreference`. `allowedTravelModes` specifies transit modes like `BUS`, `SUBWAY`, `TRAIN`, `LIGHT_RAIL`, or `RAIL`. `routingPreference` allows choosing between `LESS_WALKING` or `FEWER_TRANSFERS`, to influence the transit route, and it allows for selecting no preferences. All available preferences have a corresponding unspecified value. The default `allowedTravelModes` is all available options.\n"],null,["# TransitPreferences\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [TransitTravelMode](#TransitTravelMode)\n- [TransitRoutingPreference](#TransitRoutingPreference)\n\nPreferences for `TRANSIT` based routes that influence the route that is returned.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"allowedTravelModes\": [ enum (/maps/documentation/routes/reference/rest/v2/TransitPreferences#TransitTravelMode) ], \"routingPreference\": enum (/maps/documentation/routes/reference/rest/v2/TransitPreferences#TransitRoutingPreference) } ``` |\n\n| Fields ||\n|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `allowedTravelModes[]` | `enum (`[TransitTravelMode](/maps/documentation/routes/reference/rest/v2/TransitPreferences#TransitTravelMode)`)` A set of travel modes to use when getting a `TRANSIT` route. Defaults to all supported modes of travel. |\n| `routingPreference` | `enum (`[TransitRoutingPreference](/maps/documentation/routes/reference/rest/v2/TransitPreferences#TransitRoutingPreference)`)` A routing preference that, when specified, influences the `TRANSIT` route returned. |\n\nTransitTravelMode\n-----------------\n\nA set of values used to specify the mode of transit.\n\n| Enums ||\n|-----------------------------------|---------------------------------------------------------------------------------------------|\n| `TRANSIT_TRAVEL_MODE_UNSPECIFIED` | No transit travel mode specified. |\n| `BUS` | Travel by bus. |\n| `SUBWAY` | Travel by subway. |\n| `TRAIN` | Travel by train. |\n| `LIGHT_RAIL` | Travel by light rail or tram. |\n| `RAIL` | Travel by rail. This is equivalent to a combination of `SUBWAY`, `TRAIN`, and `LIGHT_RAIL`. |\n\nTransitRoutingPreference\n------------------------\n\nSpecifies routing preferences for transit routes.\n\n| Enums ||\n|------------------------------------------|----------------------------------------------------------------------------------|\n| `TRANSIT_ROUTING_PREFERENCE_UNSPECIFIED` | No preference specified. |\n| `LESS_WALKING` | Indicates that the calculated route should prefer limited amounts of walking. |\n| `FEWER_TRANSFERS` | Indicates that the calculated route should prefer a limited number of transfers. |"]]