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

Justin Leo picture Justin Leo · Jan 1, 2016 · Viewed 9.2k times · Source

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.

Answer

gileri picture gileri · Jan 1, 2016

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.