I am using Google Maps JS API and I would like to get for a route 2 different results:
- Fastest route with fares enabled
- Fastest route without fares
So far I only found the solution that I retrieve multiple routes for a trip, and filter them by the TransitFare attribute (get the route which has a fare, and get a route which's fare is 0), but this does not seem too efficient. Is there another way where I could set a e.g. fareEnabled flag for a request to get a route with or without fares incuded?
So if anyone finds this question I have an answer: https://developers.google.com/maps/documentation/javascript/directions#DirectionsRequests
So avoidTolls: Boolean,
makes sure there are no fares for the route.