요청에 경로 수정자를 추가하여 통행료나 고속도로를 피하는 등 피하고 싶은 경로 기능을 지정합니다. 그러면 API는 이러한 기능이 필요하지 않은 경로를 제공하려고 시도합니다.
RouteModifiers 유형의 요청에서 routeModifiers 속성을 사용합니다. avoidTolls, avoidHighways, avoidFerries, avoidIndoor을 지정할 수 있습니다.
경로 수정자를 지정해도 제한된 기능이 포함된 경로가 반드시 삭제되는 것은 아닙니다. API는 수정자를 사용하여 결과를 더 유리한 경로로 편향시킵니다. 회피 옵션을 요청해도 경로가 변경되지 않는 데는 몇 가지 이유가 있을 수 있습니다. 예를 들어 출발지에서 목적지까지의 유일한 경로가 고속도로나 페리를 피할 수 없는 경우입니다. 또는 대체 경로로 인해 이동 시간이 크게 늘어납니다.
다음 예에서는 computeRoutes 메서드 (REST) 요청 본문에서 경로 수정자를 설정하는 방법을 보여줍니다. ComputeRoutes 메서드 (gRPC)에 이 옵션을 지정할 수도 있습니다. 이 예에서는 유료도로와 고속도로를 피하도록 지정합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-10(UTC)"],[[["\u003cp\u003eThe Routes API's Compute Route Matrix feature does not support avoiding route features.\u003c/p\u003e\n"],["\u003cp\u003eYou can request routes that avoid tolls, highways, ferries, and indoor travel using the \u003ccode\u003erouteModifiers\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eWhile route modifiers bias the results, they may not eliminate the specified features if alternatives are unavailable or significantly increase travel time.\u003c/p\u003e\n"],["\u003cp\u003eYou can specify route modifiers in both REST and gRPC requests, using the \u003ccode\u003eavoidTolls\u003c/code\u003e, \u003ccode\u003eavoidHighways\u003c/code\u003e, \u003ccode\u003eavoidFerries\u003c/code\u003e, and \u003ccode\u003eavoidIndoor\u003c/code\u003e fields within the \u003ccode\u003erouteModifiers\u003c/code\u003e property.\u003c/p\u003e\n"]]],["Route modifiers, set in the `routeModifiers` property of a request, allow users to express preferences for avoiding tolls, highways, ferries, or indoor routes. The `Compute Route Matrix` feature does not support avoiding route features. Modifiers bias the route calculation, but do not guarantee avoidance. `routeModifiers` also supports `vehicleInfo` and `tollPasses`. The API might include the feature to be avoided if no practical alternative exists. An example in a `computeRoutes` request demonstrates setting `avoidTolls` and `avoidHighways` to `true`.\n"],null,[]]