[Script] WME Junction Angle Info

There is an algorithm in the wiki [emoji6]

Sent using Tapatalk for Android 4.4.2

Algorythm does not help in difficult situations.

If you have a specific example I can try to help.

Sent using Tapatalk for Android 4.4.2

I find the Flow Chart in the wiki very useful though. It helps train editors to be more independent than relying on scripts to “predict” a certain voice prompt :slight_smile:

Hmm… I have tried different configurations, but failed all the time.

Needs to be:

  1. Keep right, major.
    https://www.waze.com/editor/?env=row&lon=23.87029&lat=56.96754&layers=1477&zoom=6&segments=142703515,79495519

  2. Continue straight (best continuation)
    https://www.waze.com/editor/?env=row&lon=23.87046&lat=56.96732&layers=1477&zoom=6&segments=142703515,271798926

What you need is a variation of a wayfinder. Since the right branch of the fork has the same Primary name, Alt name, and Road type, and the left side has none of the above, the right side is considered the best continuation. To change this you must fool the server, we do that with wayfinders. But we’ll modify the way finder to give you the continuation on the left.

You’ll need to add a new junction node just north of the existing junction, one on each branch.
For the right branch the new node can be at the geometry point.
For the left branch the new node should be exactly 5 meters north of the fork.
This will create a small stub segment at the begining of each branch which we can manipulate without affecting map appearance.

Change the stub on the right to remove both names (make it a no name segment).

Change the Stub on the left to be MH, and add an alt name of A10 to match the segment south of the fork.


In this setup the left side is now the same type, and has a cross matching alt name.
The right side is only a type match. The server looking at this will assume the left is BC, and give no instructions there. The right side will get a keep right to A10 because of name inheritance.

If you run into any problems I can assist to look into it.

Sent using Tapatalk for Android 4.4.2

Something like this?

If I understood correctly he was asking for the angles to be drawn on the segments they apply to like this.
(unavailable attachment: 2015-04-14 04.52.29.png)

Sent using Tapatalk for Android 4.4.2

Try with JAI version 1.8.1:
https://greasyfork.org/en/scripts/9192-wme-junction-angle-info

Thanks, forgot about additionals nodes, but wanted to go without them. Will try that.

Hmm… it shows as keep when loading permalink. But after moving map and checking again, it shows best continuation.

I cannot reproduce this.

Guessed “keep” does not change for this selection:
https://www.waze.com/editor/?env=row&lon=24.12078&lat=56.94807&layers=1477&zoom=9&segments=272633729,102806274
even after far moves and significant zoom changes.

The only BC I see for this junction is:
https://www.waze.com/editor/?env=row&lon=24.12087&lat=56.94809&layers=1477&zoom=9&segments=272633729,261936257

Does others experience this strange problem also?

I found out that I actually had 2 JAI scripts. One in extenstions and other in Tampermonkey. Now all works. Thanks :smiley:

I uploaded a new version (1.8.2) on GH with the latest fixes by FZ69617 included, and a new option for angle display mode (absolute, which is default and the previous behaviour, and departure). If nobody complains about critical bugs, I’ll upload FF and Chrome extensions during the day tomorrow (UTC+3 time zone)

The screenshot looks great. Can’t wait to try it.

Sent using Tapatalk for Android 4.4.2

This is good.

For your concern that the instruction depends on which direction you are going, my intent was to include both. you can only color for one unless you use two circles. But even with a single circle, you can display a short version of the reverse direction in the same circle. Might be time to start adopting little arrows (like Waze does) instead of the coloring and < and >, but f you are pressed for time, the following might work:

| ## = continue
{ ## = keep left

} = keep right

< ## = turn left

> = turn right

% = Exit right (for right-drive)

If you want to get fancy, you can use Livemap integration to get the instructions, same as Route Checker and Route Speeds. This would take the (changeable) algorithm out of your code, future-proofing it against instruction algorithm changes, but not against API changes. Note that Livemap does not support Exit (it would always come in as KEEP), and this would add a slew of network transactions in place of a local calculation.

Pulling from livemap means only being able to give routing on live segments in their live state, and not reflecting any changes since the tile build. That is the true benefit of this script, its immediacy.

Sent using Tapatalk for Android 4.4.2

Good point

The whole idea about supporting bidirectional information has been lurking in my mind for a longer time. Also, that would probably mean that it should be possible to select segments in any order (like a-c-b instead of a-b-c or c-b-a as you have to do now to make sure the information is displayed for the direction you wanted). The biggest issue is probably how to output the info, so it’s perfectly clear what it means. Any UI designers/experts/wannabes around to give ideas? Or even better, make the code for it :wink:

Arrows (←↑→↓ ↔↕) could possibly be used, with a marker on each side of the road ( when instructions would differ, taking into account the left/right hand traffic)…

On a side note, I’d probably need to refactor some of the code to make it both faster and easier to implement changes…

1.8.3 being published on AMO and Chrome store (should autoupdate for Greasemonkey/Tampermonkey users)… Extension in Chrome store will probably be available soon, while the Firefox addon will be enabled once reviewed =)

Added a note-to-self-or-anyone-else-interested about the U-turns, and amended directionality issue with bidirectional support.