Skip to content

Adding support for maneuver in the directions api.#50

Merged
domesticmouse merged 2 commits intogooglemaps:masterfrom
nutsiepully:maneuver_support
Sep 28, 2016
Merged

Adding support for maneuver in the directions api.#50
domesticmouse merged 2 commits intogooglemaps:masterfrom
nutsiepully:maneuver_support

Conversation

@nutsiepully
Copy link
Copy Markdown
Contributor

The directions API returns a useful element called maneuver which mentions the next action a traveler needs to take.

This commit adds support to parse that. It was pretty simple since the system does parsing internally based on the field names. I just needed to add the file name.

"steps" : [
                ...
                     "html_instructions" : "Turn \u003cb\u003eright\u003c/b\u003e onto \u003cb\u003eWightman St\u003c/b\u003e",
                     "maneuver" : "turn-right",
                     "polyline" : {
                        "points" : "w`yuFf{yfNn@?X?X?X?zBClEGxCAj@A~BG"
                     },
                     "travel_mode" : "DRIVING"
                     ....
                  }

Thanks,
Pulkit

@broady
Copy link
Copy Markdown
Contributor

broady commented Nov 30, 2014

See #49. This field is not documented, so we shouldn't really add it to the client without a @Deprecated header.

I'll merge this when we have a plan to address the other cases of this.

Have you signed the Google CLA?

@broady
Copy link
Copy Markdown
Contributor

broady commented Nov 30, 2014

oh - thanks for the PR!

@nutsiepully
Copy link
Copy Markdown
Contributor Author

@broady - Added the header. Already signed it. Thanks for the library! This saved me a lot of time 👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be below, on maneuver. distance is a documented field.

@rwoloszyn
Copy link
Copy Markdown

Is this will be added to the library ?

@domesticmouse domesticmouse merged commit a9caea6 into googlemaps:master Sep 28, 2016
domesticmouse added a commit that referenced this pull request Sep 28, 2016
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.

5 participants