Get a sneak peek at whats next for Permanent Hazards on our April 7th Office Hours!
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 Reply
Forum rules
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

DO NOT START a new thread unless it is about a new idea. Keep discussion of existing tools within the main thread for that tool.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

[Script] WME Road Width Helper (WRWH)

Post by bedo2991
After fighting a little bit with the WME's UI, here is a simple script that helps inputting the road width values.

Installation link: https://github.com/bedo2991/wme-road-wi ... se.user.js

Instructions
  1. Select one or more one-way segments.
  2. Use one of the keyboard shortcuts listed below to change the segments' lane width.
The first time you use a shortcut, a preference panel appears on the WME. There you can set a value for the lane width to be used every time a shortcut gets pressed. When empty, the WME's default lane-width for the selected road type gets used.

Default Shortcuts
  • 1 to 9 (not from the NumPad): set the selected segments as x lanes width.
  • 0 (not from the NumPad): remove all width-related lanes information from the selected segments.
  • + increase the lanes width of 0.1m (fixed*)
  • - decrease the lanes width of 0.1m (fixed*)
*You may change the numeric shortcuts in the WME's key shortcuts panel. Plus and minus can't be changed.

Known issues:
- The preference panel can't be moved.
- It only supports one-way segments.
- Values set in the preference panel are not persistent.

I am open to ideas and suggestions, but I am not planning to put too much effort in this script.

Recommended accessory script, to see the road width on the WME (SVL): https://github.com/bedo2991/svl/release ... se.user.js

F.A.Q.
About this script:
- "Apply default value" checkbox (enabled by default): when selected, the current WME's default value gets inserted as the segment lane width. This assures that if the country-specific default values change, all values that you have inserted don't change. This is also a clever choice for countries which have lane widths which are not related to the WME road type (i.e.: mapping stuff as major highway for routing...). When unchecked, if you try setting the same width as the current default, the input field is left empty (and Waze will use the road-type default value for your country).

About SVL:
- The width that SVL shows includes the entire drawn segment, not just the colored part. For example, if the segment is a bridge, i.e. elevation > 0 (shown with 2 black lines at the edges), those lines are also part of the total segment width.
- The width shown by SVL takes into consideration that Earth isn't flat, so the width displayed should be rather accurate (if you don't believe me, you can try it yourself on a place with a known size like a volleyball court).
 
 
 
bedo2991
Waze Global Champs
Waze Global Champs
Posts: 2380
Answers: 2
Answers: 2
Has thanked: 236 times
Been thanked: 625 times

POSTER_ID:4945632

1

Send a message

Post by bedo2991
WazingArch wrote: Mon Mar 14, 2022 3:50 pm Hi, it seems that the script deselects "Use default lane width" option when using a shortcut to apply widths. This should be corrected as soon as possible to my opinion. 
Regards.

 
@WazingArch I can't reproduce it / I can't understand what you mean, maybe.
That checkbox mostly makes sense if you have the "Width" field set to "Waze default" (Empty).
When the "Apply default value" checkbox is disabled, the script tells WME to use the checkbox "default width", if it's checked, the script sets the current WME's default value as the actual road width.


 
bedo2991
Waze Global Champs
Waze Global Champs
Posts: 2380
Answers: 2
Has thanked: 236 times
Been thanked: 625 times
Send a message

Post by bedo2991
That's a WME glitch. If you can't type the lane width there it means it's using the default one (and after you save the checkbox is shown as checked).
bedo2991
Waze Global Champs
Waze Global Champs
Posts: 2380
Answers: 2
Has thanked: 236 times
Been thanked: 625 times
Send a message

Post by bedo2991
V. 0.4.3 is out!
- Fix for the new WME selectionManager
bedo2991
Waze Global Champs
Waze Global Champs
Posts: 2380
Answers: 2
Has thanked: 236 times
Been thanked: 625 times
Send a message

Post by bedo2991
V. 0.4.4 was released yesterday to fix the changes of the newest WME production release.
As today the WME was rollbacked, those fixes are now errors that make the script break.

I won't be able to release a new version in the meanwhile. You may manually install V. 0.4.3 again and disable TM's automatic updates for a while.
bedo2991
Waze Global Champs
Waze Global Champs
Posts: 2380
Answers: 2
Has thanked: 236 times
Been thanked: 625 times
Send a message

Post by bedo2991
Thanks, I am tracking it here. https://github.com/bedo2991/wme-road-wi ... r/issues/1

It will either be fixed today or in September :D
bedo2991
Waze Global Champs
Waze Global Champs
Posts: 2380
Answers: 2
Has thanked: 236 times
Been thanked: 625 times
Send a message

Post by bedo2991
And... it was today.
V. 0.4.5 is out
- Don't set the road width while the editor is not allowed to edit.
bedo2991
Waze Global Champs
Waze Global Champs
Posts: 2380
Answers: 2
Has thanked: 236 times
Been thanked: 625 times
Send a message

Post by pox_online
Hi @bedo2991 ,
is it possible that when the housenumber mode is active, to disable the listener?
With the script active it is possible to set Roadwith in Housenumber mode, when for example the cursor in the HN Bubble is not active. That causes that is not possible to save anymore.
Regards
Peter
pox_online
Waze Local Champs
Waze Local Champs
Posts: 1281
Answers: 1
Has thanked: 180 times
Been thanked: 273 times
Send a message

Post by WazingArch
What I expect is when I use WRWH shortcut to input a number of lanes, the script to keep the option "Use default lane width" checked. Currently the script unchecks the option. This way if ever the default WME widths get updated, the box will be updated. It seems that the script is not working this way or perhaps I misunderstand it.
Waze-Map-Editor (1).png
(19.95 KiB) Downloaded 481 times
 
 
 
 
 
 
 
 
 
WazingArch
Coordinators
Coordinators
Posts: 576
Has thanked: 250 times
Been thanked: 159 times
Send a message
Coordinator BG • Global Champ • CM Manager BG • Translator
https://www.waze.com/wiki/images/f/ff/W ... 00k_6c.png
Уики България | Best map editing practice