googlemaps / google-maps-services-go

Go client library for Google Maps API Web Services
https://pkg.go.dev/googlemaps.github.io/maps
Apache License 2.0
737 stars 214 forks source link

Directions: Support `maneuver` field in `Step` #255

Closed p1ass closed 2 years ago

p1ass commented 3 years ago

Description

According to the Directions API document, a step may contain maneuver field which is the action to take for the current step.

maneuver contains the action to take for the current step (turn left, merge, straight, etc.). This field is used to determine which icon to display, and can contain one of the following values: turn-slight-left, turn-sharp-left, uturn-left, turn-left, turn-slight-right, turn-sharp-right, uturn-right, turn-right, straight, ramp-left, ramp-right, merge, fork-left, fork-right, ferry, ferry-train, roundabout-left, roundabout-right. Values in this list are subject to change. (Not available through the Directions.Step interface.)

https://developers.google.com/maps/documentation/directions/get-directions#Steps

However, Step struct doesn't have Maneuver field.

https://github.com/googlemaps/google-maps-services-go/blob/6584713ac1bcf770c964487964b7299cf370866f/directions.go#L298-L333

Expected behavior

Step should contain Maneuver as below:

type Step struct {
    Maneuver *string // Maneuver may be nil
}
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

stale[bot] commented 2 years ago

Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.