تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تجد حزمة تطوير البرامج (SDK) الخاصة بخدمة Navigation API لنظام التشغيل Android تلقائيًا أسرع طريق إلى نقطة وسيطة، ولكن هذا لا يضمن وصول المركبة إلى الجانب الذي ينتظره المستهلك من الطريق أو أنّ مكان الوصول آمن للسائق للتوقف فيه. يوضّح هذا الدليل ميزتَين يمكنك استخدامهما في هذه الحالات:
الإعداد المفضّل للتوجيه على جانب الطريق
ميزة محطة التوقف
الإعدادات المفضّلة لتوجيه المسار
يمكنك ضبط إعدادات مفضّلة للوصول إلى جهة معيّنة من الطريق عند إنشاء نقطة توقّف. يمكنك تحديد خيارك المفضّل بإحدى طريقتين: تفضيل الجانب نفسه من الطريق، أو تقديم عنوان الوصول.
تفضيل الجانب نفسه من الطريق
عليك تقديم الإحداثيات الجغرافية لنقطة الطريق، ثم ضبط علامة
(setPreferSameSideOfRoad) تشير إلى أنّك تفضّل الوصول إلى نقطة الطريق على الجانب نفسه من الطريق، أي على الرصيف الأقرب.
عليك تقديم الإحداثيات الجغرافية لنقطة الطريق، ثم تقديم عنوان الوصول (setPreferredHeading) الذي يتطابق مع اتجاه حركة المرور على الجانب نفسه من الطريق الذي ينتظره المستهلك.
تختار حزمة تطوير البرامج (SDK) الخاصة بخدمة "التنقّل" الجزء من الطريق الأقرب إلى نقطة الطريق، والذي يتضمّن اتجاهًا للمسار يتوافق (في حدود 55 درجة +/-) مع جانب الطريق الذي تقع عليه نقطة الطريق.
ضبط الإعدادات المفضّلة للتوقف
في بعض الأماكن، لا يمكن للسائقين التوقف بأمان (على سبيل المثال، المناطق المرتفعة والعبّارات والمواقع تحت الأرض وغيرها من المناطق التي يصعب الوصول إليها). تنقل ميزة محطة التوقف نقطة الطريق إلى مكان قريب إذا كان موقعها الجغرافي غير مناسب لتوقف مركبة. عند ضبط
setVehicleStopover على true، تتم إعادة تحديد موقع نقطة الطريق تلقائيًا عند احتساب المسار، إذا كان يتوفّر موقع جغرافي بديل.
آلية العمل
يمكنك ضبط الإعدادات المفضّلة لمكان التوقّف عند إنشاء نقطة الطريق لهذا التوقّف.
لتنفيذ ذلك، حدِّد الإعداد setVehicleStopover كما هو موضّح في المثال التالي:
تاريخ التعديل الأخير: 2025-09-04 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-04 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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()"]]