rodazuero / gmapsdistance

Future
GNU General Public License v3.0
75 stars 40 forks source link

Duration vs Duration in Traffic time #50

Open ioanpat55 opened 5 years ago

ioanpat55 commented 5 years ago

Hi and thanks for your very helpful R package.

I have been looking through the guidance and testing the package but can't see to find in my outputs the duration in traffic column? I think irrespective of the traffic model (default should be best guess) the API output should have a duration time value and duration in traffic time value, but I can only see one column in outputs called Time.Time. when i change the traffic model to pessimistic or optimistic the time value changes in my output but i'm not clear if that's the duration or duration in traffic (only the second should be affected by the traffic model). Is there any way to see both the normal vs traffic durations in the output?

I have set the mode to driving, using a departure time and have a valid API key too. Many thanks and apologies if I missed this anywhere in the guidance!

rodazuero commented 5 years ago

The function returns the total time (including time in traffic). However, I think it is be possible to get time in traffic separately when driving mode is selected. I will set up this as a feature request. Many thanks for your comment.

giacomodc commented 5 years ago

Hi, thank you as well for your package.

I'm having a similar issue, and I believe the returning variable $Time corresponds only to the "duration" value and does not report the "duration_in_traffic", even when I add a departure time. In other words, the departure time is not taken into account in the query.

Would be great if the departure time is considered! thank you.

Attaching my code. gmapsdistance.txt