Closed maeishoj closed 8 years ago
Hi Manuel,
I think we have two options:
1) We can extend the capabilities of the GraphHopper
class. It is certainly possible, I just never needed it myself, but I can help you with this!
2) Another option would be to use the existing events and chain them.
If you want to have a route A-B-C, you could just set route A-B in ffwdme, listen to the navigation:onroute
event and once the destination is reached, you set the route B-C in ffwdme.
What do you think?
Cheers, Christian
Hi Fabrik.
I discussed it internally today and we concluded that it's perfectly fine to iterate over the waypoints in order to do a to b, b to c, c to d and so on...
One thing i was wondering is about the voice. The demo is in German, is there a way to use another language? how? what do i need?
I appreciate your prompt response! :)
Hi! Ok, then try out approach 2 and let me know if you need further assistance.
Regarding the voice instructions: This was somehow experimental and we tried it in German first, but it is easy to translate it in any other language.
Let's take a look at one of the voice folders: https://github.com/ffwdme/ffwdme.js/tree/master/src/components/audio_instructions/voices/male
It consists of 5 files. voice.json
contains meta data for the audio sprites, all other files are the same audio recording saved in different formats.
Here are the keys of the voice.json
explained:
INIT: <silence>,
C: Go straight,
TL_now: Turn left now,
TL_100: Turn left in 100m,
TL_500: Turn left in 500m,
TL_1000: Turn left in 1km,
TSLL_now: Turn slight left now,
TSLL_100: Turn slight left in 100m,
TSLL_500: Turn slight left in 500m,
TSLL_1000: Turn slight left in 1km,
TSHL_now: Turn sharp left now,
TSHL_100: Turn sharp left in 100m,
TSHL_500: Turn sharp left in 500m,
TSHL_1000: Turn sharp left in 1km,
TR_now: Turn right now,
TR_100: Turn right in 100m,
TR_500: Turn right in 500m,
TR_1000: Turn right in 1km,
TSLR_now: Turn slight right now,
TSLR_100: Turn slight right in 100m,
TSLR_500: Turn slight right in 500m,
TSLR_1000: Turn slight right in 1km,
TSHR_now: Turn sharp right now,
TSHR_100: Turn sharp right in 100m,
TSHR_500: Turn sharp right in 500m,
TSHR_1000: Turn sharp right in 1km,
TU: Turn around, if possible,
C_100: Go straight in 100m,
C_500: Go straight in 500m,
C_1000: Go straight in 1km,
C_LONG: Follow the road running for a long while,
FINISH: You reached your destination,
EXIT1: Take first roundabout exit,
EXIT2: Take second roundabout exit,
EXIT3: Take third roundabout exit,
EXIT4: Take fourth roundabout exit,
EXIT5: Take fifth roundabout exit
So you basically have to record an audio file with all these sentences one after another (make sure to leave some seconds of silence between them). Once you are done, you have to fill out the voice.json
and enter the start time (start
) and duration (length
) in seconds for each sentences.
I hope this helps, let me know if there is anything else.
btw: If you happen to create audio instructions in another language and are willing to contribute, I would be happy to review a pull request for it. :)
Hey there!
Thanks for your help!! Absolutely! I can do that once we get to record the voice! :)
Hi and thanks for this library!
I just started looking into it and I have my own graphhopper key, etc. But what I need is to have multiple waypoints to visit. Is this at all allowed here? If so how can i do that?
/Manuel