-
Notifications
You must be signed in to change notification settings - Fork 132
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
Added support for multiple/alternate routes, update dependencies #62
Conversation
please merge this |
How to use or add alternative parameter in my code, there is no code related to alternate routes in the example |
Take a look at my first commit |
@aaqibism at your first commit
in the inner loop
Isn't there any example code to share with me please. |
I think you’re looking at the wrong example. Look in example/lib/main.dart
|
|
Dear @aaqibism
when I
|
Dear Aqib, can you merge polyline support changes to the branch we can
access.
Thanks
…On Mon, Feb 21, 2022 at 6:14 AM Aaqib Ismail ***@***.***> wrote:
@aaqibism <https://github.com/aaqibism> at your first commit
if (result.points.isNotEmpty) {
result.points.forEach((PointLatLng point) {
result.points.first.forEach((PointLatLng point) {
polylineCoordinates.add(LatLng(point.latitude, point.longitude));
});
}
in the inner loop result.points.first.forEach() forEach is not defined,
at mouse hover showing this
The method 'forEach' isn't defined for the type 'PointLatLng'.
Try correcting the name to the name of an existing method, or defining a method named 'forEach'.dart[undefined_method](https://dart.dev/diagnostics/undefined_method)
Isn't there any example code to share with me please.
I think you’re looking at the wrong example. Look at in
example/lib/main.dart
if (result.routes[0].points.isNotEmpty) {
result.routes[0].points.forEach((PointLatLng point) {
polylineCoordinates.add(LatLng(point.latitude, point.longitude));
});
—
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKQBVPW7IZCHPD2PSQSAGJDU4JCGDANCNFSM47XNITQA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
--
***@***.***
Zia Akbari
|
Dear @aaqibism , can you merge polyline support changes to the branch we can Thanks |
I’m not the owner of the repo, I don’t know how to otherwise. |
Dear @Dammyololade, would you be able to do something about it? |
Added an extra parameter, alternatives, from Google Maps API Docs for receiving multiple routes. Solves #61, #63
Adds models for bounds, legs, status_codes, and geocoded_waypoints from the json response received from the API. Updated avoid parameter according to Google Maps Documentation.
Added function to parse json body to use for server-side API calls that return the json data.
Supports both coordinate or place_id for origin and destination.