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

Adopt named arrival instructions from Directions API #1123

Closed
1ec5 opened this issue Feb 15, 2018 · 10 comments
Closed

Adopt named arrival instructions from Directions API #1123

1ec5 opened this issue Feb 15, 2018 · 10 comments
Assignees
Labels
feature New feature request.

Comments

@1ec5
Copy link
Contributor

1ec5 commented Feb 15, 2018

Spoken instructions for an arrive step should include the name of the waypoint. In typical SDK usage, the developer supplies a Waypoint.name that’s either the name of a point of interest or an address. The user would find it very useful to hear the address when arriving at the destination. Arriving at a named waypoint is a basic use case, so the SDK should handle it without requiring any developer intervention.

Currently, the arrival instructions come from the Directions API, like any other instruction. In the absence of Directions API support for this feature, the SDK would need to ignore the arrive step’s SpokenInstruction objects in favor of its own homegrown instruction strings. For localization, we have two options:

/cc @mapbox/navigation-ios @mapbox/guidance

@1ec5 1ec5 added feature New feature request. Google Maps parity labels Feb 15, 2018
@1ec5
Copy link
Contributor Author

1ec5 commented Feb 15, 2018

Note that it would be insufficient to append the waypoint name to the server-generated instruction, for the following reasons:

  • This SDK sends an SSML string to the Voice API. We lack access to an XML parser, so we can’t reliably modify the SSML string in any way, not even to append to the sentence.
  • If OSRM knows which side of the street the destination is on, the instruction includes the phrase “on the left/right”; the waypoint name would have to come before that phrase.
  • Appending the waypoint name to the instruction would be ungrammatical in some of the languages we support (and some major languages we don’t yet support, like Japanese).

@bsudekum
Copy link
Contributor

@1ec5 would this require some server involvement? IE the response would change to

"voiceInstruction": "You have arrived at {replace text here}."

@1ec5
Copy link
Contributor Author

1ec5 commented Feb 21, 2018

would this require some server involvement?

That would be a sensible alternative to what’s proposed above. However, if the Directions API doesn’t add any support for this option, then we’d need to build some of our own voice instructions on the client side, essentially.

@brsbl-zz brsbl-zz added pink and removed pink labels Mar 5, 2018
@akitchen akitchen changed the title Name the waypoint in arrival spoken instructions Spoken instructions for an arrive step should include the name of the waypoint Mar 26, 2018
@akitchen
Copy link
Contributor

akitchen commented Apr 9, 2018

Server will name the waypoint in the banner, but MapboxDirections.swift will eventually need to change.

@brsbl-zz
Copy link

This should no longer be blocked upstream

@1ec5
Copy link
Contributor Author

1ec5 commented Apr 23, 2018

Next steps:

@1ec5 1ec5 changed the title Spoken instructions for an arrive step should include the name of the waypoint Adopt named arrival instructions from Directions API Apr 23, 2018
@akitchen akitchen added size: S and removed size: M labels Apr 30, 2018
@vincethecoder
Copy link
Contributor

vincethecoder commented May 8, 2018

Update:
Per conversation with @1ec5, here is an update for this ticket requirement:

The DirectionsOptions.params getter needs to add another URLQueryItem to the array based on mapping all the waypoints to their names.

@1ec5
Copy link
Contributor Author

1ec5 commented May 8, 2018

☝️ will happen as part of mapbox/mapbox-directions-swift#271.

@vincethecoder
Copy link
Contributor

@vincethecoder
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request.
Projects
None yet
Development

No branches or pull requests

5 participants