קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
כשמחשבים מטריצה של מסלולים, כדאי להביא בחשבון את החיובים על אגרות בכבישים במטריצה. בערים נבחרות, אפשר לחשב את סכום האגרה המשוער של מסלול מסוים במטבע המתאים.
רשימת מיקומי האגרות הנתמכים מופיעה במאמר העזרה בנושא TollPass.
דוגמה למטריצה של מסלולים עם חיובים
בדוגמה הבאה נעשה שימוש בשיטה computeRouteMatrix כדי להציג מידע על כבישי אגרה במסלול, כולל מחיר משוער לשימוש בכרטיס נסיעה:
כדי לאפשר את החישוב של פרטי החיובים, מגדירים את שדה המערך extraComputations לערך TOLLS.
כדי לציין את סוג הרכב ואת סוג הכרטיס לתשלום בכבישים, משתמשים בשדה routeModifiers של נקודות הדרך במקור של הבקשה. מחיר האגרה שמוחזר מבוסס על התמחור של סוג הרכב והמינוי שצוינו. אם צוינו יותר מכרטיס אחד, המערכת תחזיר את המחיר הזול ביותר.
משתמשים במסכת שדה התגובה כדי להגדיר את השיטה להחזרת פרטי התשלום בדרך. מציינים את הערך routes.travelAdvisory.tollInfo כדי להציג את הפרטים של המסלול כולו.
[[["התוכן קל להבנה","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-02-06 (שעון UTC)."],[[["The Routes API's `computeRouteMatrix` method allows you to calculate estimated toll fees for routes in supported cities, providing cost insights for route planning."],["To enable toll calculations, specify `TOLLS` in the `extraComputations` field and provide vehicle and toll pass details in the `routeModifiers` field within the request."],["Toll prices are estimates and are influenced by factors like vehicle type and toll pass used, with the response including the estimated price in the specified currency."],["While the Route Matrix provides toll information, detailed route specifics are not included; for that, use the `Compute Routes` functionality with single origin and destination points."],["Be aware that requests including toll fee calculations are billed at a higher rate than standard route matrix requests."]]],["To calculate toll fees for a route matrix, set the `extraComputations` field to `TOLLS`. Specify the vehicle type and toll pass using the `routeModifiers` field within the origin waypoints; the lowest-cost toll pass pricing will be applied if multiple passes are set. Use the response field mask with `routes.travelAdvisory.tollInfo` to include toll information, and note that toll fee requests have a higher billing rate. The response then contains `estimatedPrice`.\n"]]