Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Developer Wilayah Ekonomi Eropa (EEA)
Saat menghitung matriks rute, Anda mungkin ingin mempertimbangkan biaya tol pada rute dalam matriks. Untuk kota tertentu, Anda dapat menghitung perkiraan biaya tol untuk rute dalam mata uang yang sesuai.
Untuk mengetahui daftar lokasi jalan tol yang didukung, lihat referensi untuk
TollPass.
Contoh tarif matriks rute
Contoh berikut menggunakan metode
computeRouteMatrix
untuk menampilkan informasi tarif tol pada rute dengan perkiraan
harga saat kartu tol digunakan:
Tetapkan kolom array extraComputations ke TOLLS untuk mengaktifkan penghitungan informasi tol.
Tentukan jenis kendaraan dan jenis kartu tol menggunakan
kolom routeModifiers dari titik jalan origin permintaan. Harga tol yang ditampilkan didasarkan pada harga yang digunakan oleh jenis kendaraan dan kartu tol yang ditentukan. Jika lebih dari satu kartu ditentukan, harga yang paling murah akan ditampilkan.
Gunakan mask kolom respons untuk mengonfigurasi metode guna
menampilkan informasi tarif dalam respons. Tentukan
routes.travelAdvisory.tollInfo untuk menampilkan informasi seluruh rute.
Respons berisi informasi tentang tarif tol dalam objek
TollInfo (REST) atau
TollInfo (gRPC).
Untuk mengonfigurasi metode guna menampilkan informasi tarif tol, gunakan
masker kolom respons untuk menetapkan kolom travelAdvisory.tollInfo
dalam masker.
[[["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-04 UTC."],[[["\u003cp\u003eThe Routes API's \u003ccode\u003ecomputeRouteMatrix\u003c/code\u003e method allows you to calculate estimated toll fees for routes in supported cities, providing cost insights for route planning.\u003c/p\u003e\n"],["\u003cp\u003eTo enable toll calculations, specify \u003ccode\u003eTOLLS\u003c/code\u003e in the \u003ccode\u003eextraComputations\u003c/code\u003e field and provide vehicle and toll pass details in the \u003ccode\u003erouteModifiers\u003c/code\u003e field within the request.\u003c/p\u003e\n"],["\u003cp\u003eToll 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.\u003c/p\u003e\n"],["\u003cp\u003eWhile the Route Matrix provides toll information, detailed route specifics are not included; for that, use the \u003ccode\u003eCompute Routes\u003c/code\u003e functionality with single origin and destination points.\u003c/p\u003e\n"],["\u003cp\u003eBe aware that requests including toll fee calculations are billed at a higher rate than standard route matrix requests.\u003c/p\u003e\n"]]],["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"],null,[]]