Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Saat menghitung matriks rute, sebaiknya pertimbangkan biaya tol di rute dalam matriks. Untuk kota tertentu, Anda dapat menghitung
estimasi tarif tol untuk rute dalam mata uang yang sesuai.
Untuk daftar lokasi tol yang didukung, lihat referensi untuk
TollPass.
Contoh tarif tol matriks rute
Contoh berikut menggunakan metode computeRouteMatrix untuk menampilkan informasi tol di 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 jalan tol
yang ditampilkan didasarkan pada harga yang digunakan oleh jenis kendaraan dan kartu jalan 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 tol dalam respons. Tentukan
routes.travelAdvisory.tollInfo untuk menampilkan informasi untuk seluruh rute.
[[["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-04-16 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"]]