تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
المطوّرون في المنطقة الاقتصادية الأوروبية
يشير المصطلح "مركبة ذات عجلتين" إلى المركبات الآلية ذات العجلتين (مثل الدرّاجات النارية).
يختلف وضع السفر باستخدام مركبة ذات عجلتين عن وضع السفر باستخدام الدراجة، والذي يُعدّ أحد أوضاع التنقّل التي تعتمد على القوة البشرية.
استخدِم السمة travelMode للطلب لتحديد الوضع. يتم تحديد
القيم المحتملة لهذه السمة من خلال التعدادات في
RouteTravelMode (REST) و
RouteTravelMode (gRPC).
تحديد وضع التنقّل بواسطة مركبة ذات عجلتين
عند استدعاء واجهة برمجة تطبيقات Routes API، يمكنك تحديد قيمة التعداد RouteTravelMode
لتحديد وضع التنقّل.
يوضّح المثال التالي كيفية ضبط وضع التنقّل على TWO_WHEELER
في computeRoutes method (REST)
body request. يمكنك أيضًا تحديد هذا الخيار لطريقة
ComputeRoutes (gRPC).
في هذا المثال، يتم احتساب الاتجاهات بين موقعَين جغرافيَّين في الهند
يتم تحديدهما باستخدام رموز Plus Codes:
تاريخ التعديل الأخير: 2025-06-20 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-06-20 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe \u003ccode\u003eTWO_WHEELER\u003c/code\u003e travel mode is used to request routes specifically for motorcycles and similar motorized two-wheeled vehicles, distinct from bicycles.\u003c/p\u003e\n"],["\u003cp\u003eUsing the \u003ccode\u003eTWO_WHEELER\u003c/code\u003e travel mode will result in higher billing rates compared to other travel modes.\u003c/p\u003e\n"],["\u003cp\u003eRoutes generated for two-wheeled vehicles are in beta and might not always include optimal paths for motorcycles; it's crucial to display a warning to users about this.\u003c/p\u003e\n"],["\u003cp\u003eYou can specify the \u003ccode\u003eTWO_WHEELER\u003c/code\u003e travel mode within the \u003ccode\u003etravelMode\u003c/code\u003e property of your Routes API request to obtain routes optimized for motorcycles.\u003c/p\u003e\n"],["\u003cp\u003eSupported regions for two-wheeled vehicle routes may vary, so consult the documentation for coverage details.\u003c/p\u003e\n"]]],[],null,["# Get a two-wheeled vehicle route\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nTwo-wheeled refers to two-wheeled motorized vehicles (for example, motorcycles).\nThe two-wheeler travel mode differs from the bicycle travel mode, which is a\nhuman-powered travel mode.\n| **Caution:** Requests using a travel mode of `TWO_WHEELER` are billed at a higher rate. [Learn more about billing](/maps/documentation/routes/usage-and-billing) for Routes API.\n\nUse the `travelMode` property of a request to specify the mode. The possible\nvalues of this property are defined by enumerations in\n[RouteTravelMode](/maps/documentation/routes/reference/rest/v2/RouteTravelMode) (REST) and\n[RouteTravelMode](/maps/documentation/routes/reference/rpc/google.maps.routing.v2#routetravelmode) (gRPC).\n\n\u003cbr /\u003e\n\n| **Note:**Walking, bicycling, and two-wheel routes are in beta and might sometimes be missing clear sidewalks, pedestrian paths, or bicycling paths. You must display this warning to the user for all walking, bicycling, and two-wheel routes that you display in your app.\n\n\u003cbr /\u003e\n\nSpecify the two-wheeler travel mode\n-----------------------------------\n\nWhen you call a Routes API, you specify the `RouteTravelMode`\nenumeration value to specify the travel mode.\n\nThe following example shows how to set the travel mode to `TWO_WHEELER`\nin a [computeRoutes](/maps/documentation/routes/reference/rest/v2/TopLevel/computeRoutes) method (REST)\nrequest body. You can also specify this option to the\n[ComputeRoutes](/maps/documentation/routes/reference/rpc/google.maps.routing.v2#google.maps.routing.v2.Routes.ComputeRoutes)\nmethod (gRPC).\n\nIn this example, you compute the directions between two locations in India\nspecified by Plus codes: \n\n```json\n{\n \"origin\":{\n \"address\": \"H8MW+WP Kolkata India\"\n },\n \"destination\":{\n \"address\": \"GCG2+3M Kolkata India\"\n },\n \"travelMode\":\"TWO_WHEELER\"\n}\n```\n| **Note:** For details on supported routes for 2-wheeled vehicles, see [Countries and regions supported for two-wheeled vehicles](/maps/documentation/routes/coverage-two-wheeled)."]]