Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting toll data from Google Maps or other maps provider for a given route in a mobile app [closed]

I am building a mobile app for users to use when driving. It will keep track of the user's location, and at the end of the trip it will tell the user the distance travelled, and the cost of the trip.

The cost of the trip will be calculated by the distance travelled * cost per km and any additional toll costs. The issue I have now is getting the toll data.

  1. What maps provider can I use to get this toll data reliably? I heard Google Maps, HERE maps and OpenStreetMaps have them.
  2. How do I get toll data? I looked around online and could find that they can provide the toll data if the route is pre-calculated by the map provider (I send in the start and end location). For my app, I'm unsure where to look or what to look for. I guess I will be storing a series of GPS coordinates as the user drives, do I just send all these coordinates to some API to process?

Thanks.

like image 623
Justin Leo Avatar asked Mar 13 '23 17:03

Justin Leo


2 Answers

On OpenStreetMap, while tolls sections are mapped, the fees amount are not present, as they are a non-geographical feature. However, an external database could be used in conjection of OSM data to keep track of these fees.

like image 185
gileri Avatar answered Mar 16 '23 07:03

gileri


Tollsmart has APIs for all tunnels, bridges and toll roads in the US & Canada and yes you can just send the coordinates and it will calculate the toll costs for the route. Note that there are many variable such as vehicle size, time of day (peak and off-peak pricing), transponder discounts (i.e., E-ZPass). Our APIs can handle all these variables and more.

like image 20
Jim Kovarik Avatar answered Mar 16 '23 08:03

Jim Kovarik