تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
عند تحديد أفضل مسار لرحلة مشاركة الركوب، قد لا يكون المسار الأسرع هو الخيار الأفضل دائمًا. قد تحتاج إلى التخطيط لمسارك.
تتيح لك واجهة Routes Preferred API تخطيط مسار من خلال تحديد هدف المسار باستخدام الطريقة ComputeCustomRoutes.
يمكن أن تساعد طريقة ComputeCustomRoutes أيضًا في الالتزام بالمسار من خلال السماح لك بتقليل الفرق بين المسار الذي يختاره المشغّل والمسار الذي يتم سلوكه.
استخدِم كلاً من Routes Preferred API وNavigation SDK للاستفادة بشكل كامل من مزايا تخطيط المسار.
تفعيل طريقة ComputeCustomRoutes
قبل أن تتمكّن من استخدام طريقة ComputeCustomRoutes في الرمز، عليك تفعيلها. لمزيد من المعلومات حول تفعيل طرق Routes Preferred API، يُرجى الاطّلاع على بدء الاستخدام.
استخدام طريقة ComputeCustomRoutes
تتطلّب طريقة ComputeCustomRoutes تحديد قناع حقل الردّ في الإدخال. يمكنك تقديم قناع حقل الاستجابة باستخدام مَعلمة عنوان URL $fields أو fields، أو باستخدام عنوان HTTP/gRPC X-Goog-FieldMask. لمزيد من المعلومات، يُرجى الاطّلاع على
مَعلمات النظام.
قيمة قناع الحقل هي قائمة مسارات حقول مفصولة بفواصل. مسار كل حقل هو قائمة بأسماء الحقول مفصولة بنقاط وتمثّل التسلسل الهرمي للرسالة.
اسم الحقل هو إما مفتاح عنصر JSON أو اسم علامة حقل protobuf.
يبدأ مسار الحقل من نوع رسالة الرد ذات المستوى الأعلى،
ويتبعه اختياريًا نقطة واحدة أو أكثر، ثم مستوى اسم الحقل التالي. بشكل عام، يتم إنشاء مسارات الحقول بالطريقة التالية:
تاريخ التعديل الأخير: 2025-07-22 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-07-22 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe Routes Preferred API's \u003ccode\u003eComputeCustomRoutes\u003c/code\u003e method enables planning routes based on objectives beyond the fastest route, such as compliance or driver preferences.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eComputeCustomRoutes\u003c/code\u003e supports optimizing routes for \u003ccode\u003eDRIVE\u003c/code\u003e and \u003ccode\u003eTWO_WHEELER\u003c/code\u003e travel modes, but excludes intermediate waypoints and other travel modes.\u003c/p\u003e\n"],["\u003cp\u003eUsing the Routes Preferred API with the Navigation SDK provides the best route planning outcomes, though they can utilize separate cloud projects.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the \u003ccode\u003eComputeCustomRoutes\u003c/code\u003e method, enable it and verify your quota limits, requesting increases if necessary through Google Cloud Support.\u003c/p\u003e\n"],["\u003cp\u003eTo specify desired data in the response, use field masks with the \u003ccode\u003eComputeCustomRoutes\u003c/code\u003e method, selecting fields using dot-separated paths from the top-level response.\u003c/p\u003e\n"]]],["The Routes Preferred API's `ComputeCustomRoutes` method allows route planning by specifying a route objective and minimizing deviations from the operator's selected route. This method supports `DRIVE` and `TWO_WHEELER` travel modes, excluding `via` waypoints. To use it, enable the method and specify a response field mask via `$fields`, `fields`, or `X-Goog-FieldMask`. Quota limits should be monitored. Use alongside the Navigation SDK to maximize route planning benefits. Additionally, toll fees can be calculated using this API.\n"],null,[]]