Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.
Post by hebermc
I'm not sure if this is a known bug: When you select about 50 new segments and try to apply a city name to all of them the extension starts checking for angles (could see it happening in the console) and takes forever to end, twice google asked if I wanted to kill the page and the 3rd time it crashed chrome.
hebermc
Emeritus Local Champ
Emeritus Local Champ
Posts: 1651
Has thanked: 340 times
Been thanked: 582 times
Send a message


Post by herrchin
Interesting example! It seems that JAI is simply evaluating each endpoint's turn angle independently and comparing their difference, presuming a mostly-straight median segment. To truly check for parallelism would require evaluating absolute directions of departure segments instead of relative angles between connected segments.
herrchin
Country Manager
Country Manager
Posts: 333
Has thanked: 199 times
Been thanked: 161 times
Send a message

Post by iainhouse
Is there any reason not to push that beta version to general release? I've been using it for months without problems. :)
iainhouse
EmeritusChamps
EmeritusChamps
Posts: 11143
Answers: 1
Has thanked: 2173 times
Been thanked: 8188 times
Send a message
https://storage.googleapis.com/wazeoped ... c4/AGC.pnghttps://sign.waze.tools/s2000.pnghttps://sign.waze.tools/c6.png
My scripts: WME FixUI WME Presets :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season

Post by iainhouse
It looks like JAI may have been hit by the latest WME update. I'm seeing no functionality at all from the script.

I'm seeing this in the console:

Code: Select all

VM2448:122 Uncaught TypeError: Cannot read property 'on' of undefined
	junctionangle_init @ VM2448:122
	(anonymous function) @ VM2448:2198
And the debugger takes me to this statement at line 122:

Code: Select all

		window.Waze.model.segments.events.on({
			"objectschanged": ja_calculate,
			"objectsremoved": ja_calculate
		});
Line 2198 is the call to junctionangle_init.

I'm using development version 1.12
iainhouse
EmeritusChamps
EmeritusChamps
Posts: 11143
Answers: 1
Has thanked: 2173 times
Been thanked: 8188 times
Send a message
https://storage.googleapis.com/wazeoped ... c4/AGC.pnghttps://sign.waze.tools/s2000.pnghttps://sign.waze.tools/c6.png
My scripts: WME FixUI WME Presets :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season

Post by iainhouse
ituajr wrote:It appears that the U-turn avoidance conditions are not being evaluated correctly by JAI. The third condition is described in Preventing median U-turns as "In/out parallelism: The in and out segments (A and C) are within ±5° of parallel to each other."
I believe that JAI is correct, whereas that Wiki page is not. "Parallelism" is not the criterion. The criterion is 2 turn angles that add up to 180° (or very close).

If all the segments are straight, then 2 turns adding up to 180° means that the incoming & outgoing segments will be parallel. But if the middle segment is curved (as shown in your example above), then 2 angles adding up to 180° means the incoming & outgoing segments definitely won't be parallel.

In fact, the easiest way to "break" u-turn prevention (if you want to enable u-turns) is to kink the connecting segment. In & out remain parallel, but the total angle is no longer 180°
iainhouse
EmeritusChamps
EmeritusChamps
Posts: 11143
Answers: 1
Has thanked: 2173 times
Been thanked: 8188 times
Send a message
https://storage.googleapis.com/wazeoped ... c4/AGC.pnghttps://sign.waze.tools/s2000.pnghttps://sign.waze.tools/c6.png
My scripts: WME FixUI WME Presets :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season

Post by iainhouse
Or you could use WME RA Util which shows the angles and whether they will produce normal instructions or not.

If the angles are wrong, you can use the script to move the attachment points until they are; plus you can rotate, resize & move the entire roundabout.

I reckon you'll find that a lot easier than playing with an overlay. ;)
rautil.png
(293.5 KiB) Downloaded 431 times
iainhouse
EmeritusChamps
EmeritusChamps
Posts: 11143
Answers: 1
Has thanked: 2173 times
Been thanked: 8188 times
Send a message
https://storage.googleapis.com/wazeoped ... c4/AGC.pnghttps://sign.waze.tools/s2000.pnghttps://sign.waze.tools/c6.png
My scripts: WME FixUI WME Presets :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season

Post by iainhouse
The latest WME update has made some changes to the layers menu. Since JAI adds an option to the layers menu, it will need updating to match the changed style of the new menu.

Not an urgent matter - it still works, just looks a bit different. :)
iainhouse
EmeritusChamps
EmeritusChamps
Posts: 11143
Answers: 1
Has thanked: 2173 times
Been thanked: 8188 times
Send a message
https://storage.googleapis.com/wazeoped ... c4/AGC.pnghttps://sign.waze.tools/s2000.pnghttps://sign.waze.tools/c6.png
My scripts: WME FixUI WME Presets :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season

Post by iainhouse
Hi there.

WME is deprecating the use of OL as an alias to access the OpenLayers object in WME. As of the latest production version of WME, a warning is produced in the console every time OL is used.

Since that production release I've been having some performance issues with WME. In particular, if I open the Chrome console, something is causing WME to produce thousands of these alerts continuously. With the console open, Chrome uses up all the available memory within a minute or two and then becomes unresponsive when the memory runs out.

I'm sorry to say, but it looks like JAI is the culprit. There are 28 references to OL in the script. When I replace them all with OpenLayers the problem stops completely. I'm not sure why it would be continuously generating these errors, but it definitely is.

The fix is simple enough - replace all occurrences of "OL." with "OpenLayers.". You'll need the ".", otherwise you'll replace the characters "OL" in the icon string on line 10. ;)
iainhouse
EmeritusChamps
EmeritusChamps
Posts: 11143
Answers: 1
Has thanked: 2173 times
Been thanked: 8188 times
Send a message
https://storage.googleapis.com/wazeoped ... c4/AGC.pnghttps://sign.waze.tools/s2000.pnghttps://sign.waze.tools/c6.png
My scripts: WME FixUI WME Presets :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season

Post by iainhouse
Thanks, Seb - that's working nicely. :mrgreen:
karlcr9911 wrote:Thanks Iain...looks like a whole lot of scripts are still using OL vs OpenLayers.
To be honest, mine is one of them! :lol:

At the moment, this is nothing but a warning message produced in the console. I'm only producing a few warnings and I didn't expect them to have any impact on WME. Presumably you have to cause a lot before there's an issue!

Interestingly, the warning comes from a part of the native WME code marked up as being for the assistance of community scripts. So WME includes specific features/warnings that are only there to help us stay compatible with WME changes. :ugeek:
iainhouse
EmeritusChamps
EmeritusChamps
Posts: 11143
Answers: 1
Has thanked: 2173 times
Been thanked: 8188 times
Send a message
https://storage.googleapis.com/wazeoped ... c4/AGC.pnghttps://sign.waze.tools/s2000.pnghttps://sign.waze.tools/c6.png
My scripts: WME FixUI WME Presets :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season