How do I access the fare property for transit destinations in the google JavaScript API? The following line does not work:
alert(response.routes[j].legs[k].fare.value);
The API page says:
the fare contains the total fare (i.e. the total cost of tickets) for this route. This property is returned only for transit requests and only for routes where tariff information is available for all transit legs. Information includes:
- currency: ISO 4217 currency code indicating the currency in which the amount is expressed.
- value: the total fare in the currency indicated above.
thanks
source share