기본적으로 Android용 Navigation SDK는 경유지로 가는 가장 빠른 경로를 찾지만, 소비자가 기다리는 도로변에 차량이 도착하거나 도착 장소가 운전자가 정차하기에 안전하다는 보장은 없습니다. 이 가이드에서는 이러한 상황에 사용할 수 있는 두 가지 기능을 설명합니다.
도로 측면 경로 환경설정
경유지 기능
경로 측면 라우팅 환경설정
정류장의 경유지를 만들 때 도로의 특정 쪽으로 도착하도록 환경설정을 지정할 수 있습니다. 선호도를 지정하는 방법은 두 가지입니다. 도로의 동일한 쪽을 선호하거나 도착 방향을 제공할 수 있습니다.
같은 쪽 도로 선호
경유지의 지리적 좌표를 제공한 다음 경유지와 같은 쪽 도로에 도착하는 것을 선호한다는 것을 나타내는 플래그(setPreferSameSideOfRoad)를 설정합니다. 이 플래그는 가장 가까운 인도로 스냅됩니다.
Navigation SDK는 경유지와 가장 가까운 도로 구간을 선택합니다. 이 도로 구간은 차선 방향이 경유지가 있는 도로 측면과 +/- 55도 이내로 정렬되어 있습니다.
경유지 환경설정 지정
특정 장소에서는 운전자가 안전하게 정차할 수 없습니다 (예: 고가 도로, 페리, 지하 장소, 접근이 제한된 기타 지역). 경유지 기능은 차량이 정차하기에 적합하지 않은 위치인 경우 경유지를 근처 장소로 재배치합니다. setVehicleStopover을 true로 설정하면 대체 위치가 있는 경우 경로가 계산될 때 경유지가 자동으로 재배치됩니다.
작동 방식
정차 지점의 경유지를 만들 때 해당 정차 지점의 환경설정을 설정합니다.
이렇게 하려면 다음 예와 같이 setVehicleStopover 환경설정을 지정합니다.
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThe Navigation SDK for Android now uses \u003ccode\u003eWaypoint.Builder\u003c/code\u003e to create waypoints with options for side-of-road routing and stopover preferences.\u003c/p\u003e\n"],["\u003cp\u003eYou can ensure arrival on the desired side of the road by setting \u003ccode\u003esetPreferSameSideOfRoad\u003c/code\u003e or providing an arrival heading using \u003ccode\u003esetPreferredHeading\u003c/code\u003e when building a waypoint.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esetVehicleStopover\u003c/code\u003e preference within \u003ccode\u003eWaypoint.Builder\u003c/code\u003e relocates waypoints to safer nearby locations if the initial location isn't suitable for stopping.\u003c/p\u003e\n"]]],[],null,["# Manage waypoints\n\n| **Notice:** `fromLatLng()` and `fromPlaceId()`\n| are deprecated, but will remain available with no further updates. We\n| recommend migrating to the new [`Waypoint.Builder`](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/navigation/Waypoint.Builder).\n\nBy default, the Navigation SDK for Android finds the quickest route to a\nwaypoint, however this doesn't guarantee that the vehicle will arrive on the\nside of the road that the consumer is waiting on or that the arrival place is\nsafe for the driver to stop at. This guide describes two feature you can use for\nthese situations:\n\n- **Side of the road routing preference**\n- **Stopover feature**\n\nSide of the route routing preference\n------------------------------------\n\nYou can set a preference for arriving on a particular side of the\nroad when you create a waypoint for a stop. You can specify the preference\nin one of two ways: prefer the same side of the road, or provide an arrival\nheading.\n\n### Prefer the same side of the road\n\nYou provide the geographic coordinates of the waypoint, and then set a flag\n(`setPreferSameSideOfRoad`) that indicates that you prefer to arrive on the same\nside of the road as the waypoint---snapped to the nearest sidewalk. \n\n Waypoint waypoint =\n Waypoint.builder()\n .setLatLng(latitude, longitude)\n .setTitle(\"Somewhere in Sydney\")\n .setPreferSameSideOfRoad(true)\n .build()\n\n| **Key Point:** In some situations, when the waypoint is snapped to the side of the nearest road, the nearest road might not be the right one. For example, it might be a road around the corner from the waiting consumer. You can prevent this from occurring by using `setPreferredHeading` instead of `setPreferSameSideOfRoad` (see the next section for details).\n\n### Set an arrival heading\n\nYou provide the geographic coordinates of the waypoint, and then provide an\narrival heading (`setPreferredHeading`) that matches the direction of\ntraffic flow on the same side of the road as the waiting consumer. \n\n Waypoint waypoint =\n Waypoint.builder()\n .setLatLng(latitude, longitude)\n .setTitle(\"Somewhere in Sydney\")\n .setPreferredHeading(preferredHeading)\n .build()\n\nThe Navigation SDK chooses the road segment closest to the\nwaypoint---that has a lane direction that aligns (within +/- 55 degrees) with the\nside of the road that the waypoint is on.\n\nSet stopover preference\n-----------------------\n\nIn certain places, it's not possible for drivers to stop safely (for example,\nelevated areas, ferries, underground locations, and other areas of limited\naccess). The **Stopover** feature relocates the waypoint to a nearby place if\nits location is not suitable for a vehicle to make a stop. When you set\n`setVehicleStopover` to `true`, the waypoint is automatically relocated when\nthe route is calculated, if an alternate location is available.\n\n### How it works\n\nYou set the preference for a stopover when creating the waypoint for that stop.\nTo do this, specify the `setVehicleStopover` preference as shown in the\nfollowing example: \n\n Waypoint waypoint =\n Waypoint.builder()\n .setLatLng(latitude, longitude)\n .setTitle(\"Somewhere in Sydney\")\n .setVehicleStopover(true)\n .build()"]]