Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Developer Wilayah Ekonomi Eropa (EEA)
Anda menentukan fitur rute mana yang ingin dihindari, seperti menghindari jalan tol atau jalan raya, dengan menambahkan pengubah rute ke permintaan. Kemudian, API akan mencoba
menyediakan rute yang tidak memerlukan fitur tersebut.
Gunakan properti routeModifiers dalam permintaan, dengan jenis
RouteModifiers. Anda dapat menentukan avoidTolls,
avoidHighways, avoidFerries, dan avoidIndoor.
Menentukan pengubah rute tidak selalu menghilangkan rute yang menyertakan fitur yang dibatasi. API menggunakan pengubah untuk memihak hasil ke rute yang lebih
menguntungkan. Ada beberapa alasan mengapa meminta opsi penghindaran tidak mengubah rute Anda. Misalnya, satu-satunya rute dari tempat asal ke
tujuan membuat Anda tidak dapat menghindari jalan tol atau feri. Atau, rute alternatif justru memperpanjang waktu perjalanan secara signifikan.
Contoh berikut menunjukkan cara menyetel pengubah rute dalam isi permintaan
metode computeRoutes (REST). Anda juga dapat menentukan opsi ini ke metode
ComputeRoutes (gRPC). Dalam contoh ini, Anda menentukan untuk menghindari jalan tol dan jalan raya:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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,[]]