Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bir isteğe rota değiştirici ekleyerek ücretli geçişlerden veya otoyollardan kaçınmak gibi hangi rota özelliklerinden kaçınmak istediğinizi belirtirsiniz. Ardından API, bu özellikleri gerektirmeyen bir rota sağlamaya çalışır.
RouteModifiers türündeki bir istekte routeModifiers mülkünü kullanın. avoidTolls, avoidHighways, avoidFerries ve avoidIndoor değerlerini belirtebilirsiniz.
Bir yol değiştirici belirtmek, kısıtlanmış özelliği içeren yolları kaldırmaz. API, sonucu daha uygun rotalara yönlendirmek için değiştiriciyi kullanır. Bir kaçınma seçeneği istemenin rotanızı değiştirmemesinin birkaç nedeni olabilir. Örneğin, başlangıç noktasından varış noktasına giden tek rota, otoyol veya feribottan kaçınmayı imkansız kılıyor. Alternatif rota, seyahat süresini önemli ölçüde uzatıyor olabilir.
Aşağıdaki örnekte, computeRoutes yöntemi (REST) istek gövdesinde rota değiştiricilerin nasıl ayarlanacağı gösterilmektedir. Bu seçeneği ComputeRoutes yönteminde (gRPC) de belirtebilirsiniz. Bu örnekte, ücretli geçişleri ve otoyolları atlayacağınızı belirtirsiniz:
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-02-06 UTC."],[[["The Routes API's Compute Route Matrix feature does not support avoiding route features."],["You can request routes that avoid tolls, highways, ferries, and indoor travel using the `routeModifiers` property."],["While route modifiers bias the results, they may not eliminate the specified features if alternatives are unavailable or significantly increase travel time."],["You can specify route modifiers in both REST and gRPC requests, using the `avoidTolls`, `avoidHighways`, `avoidFerries`, and `avoidIndoor` fields within the `routeModifiers` property."]]],[]]