Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix distance and duration values, basic support for proxy and additional HTTP headers #93

Merged
merged 7 commits into from
Jun 25, 2024

Conversation

twklessor
Copy link
Contributor

Currently distance and duration is not parsed and translated correctly. For example the distance distanceValue and durationValue are not correct and cannot be used as such. They do not include the distance and duration from all the legs.

I have introduced these values for the PolylineResult that is reflected in the legs;

 List<String>? distanceTexts; // All the distance texts
 List<int>? distanceValues; // All the distance values 
 int? totalDistanceValue; // The total distance value
 List<String>? durationTexts; // All the duration texts
 List<int>? durationValues; // All the duration values
 int? totalDurationValue; // The total duration value

I have taken the liberty to not include tests as we basically use reduce to infer values directly from Google.

lib/src/network_util.dart Outdated Show resolved Hide resolved
Co-authored-by: Maxence <66376846+Maouxi@users.noreply.github.com>
@twklessor
Copy link
Contributor Author

@Maouxi You're completely right, I've accepted your change, Thanks!

@twklessor twklessor changed the title Fix distance and duration values Fix distance and duration values, basic proxy support and additional HTTP headers May 6, 2024
@twklessor twklessor changed the title Fix distance and duration values, basic proxy support and additional HTTP headers Fix distance and duration values, basic support for proxy and additional HTTP headers May 7, 2024
@Dammyololade Dammyololade merged commit a101ac9 into Dammyololade:master Jun 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants