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 True Segment Length

Post by
WME True Segment Length

Version: .6

Greasyfork: https://greasyfork.org/en/scripts/25444 ... ent-length

Description: The length displayed when selecting a segment is not the segments "true" length - this value is displayed from a length that is rounded to whole meters and displayed. Due to this, the displayed value can be off by up to .5 meters (or more when converting to feet!) which is important when working with smaller segments.

This script calculates the geodesic length of the segment and displays the value in both feet and meters, to two decimal places. This will work for a single segment or multiple selected segments.
Screenshot - 12_6_2016 , 10_21_54 AM.png
Changelog:
2017-01-09 - v.6 - Only displays both imperial and metric if editing in the USA, per request.
2016-12-07 - v.5 - You can now measure the length of unsaved segments! This fixes a bug in FF and allows you to use unsaved segments as a measuring tape.
2016-12-07 - v.4 - Fixed a bug where using the Speed Limit script would cause this script to continuously add lengths to the panel

2016-12-06 - v.3 - detecting changes and updating the measured length when the segment geometry is changed or the user uses Undo. The length of the segment will be bold when there are changes to that segment (working on if it is possible to only detect geometry changes).

POSTER_ID:17015339

1

Send a message
Last edited by JustinS83 on Mon Jan 09, 2017 7:24 pm, edited 5 times in total.

Post by AquaZR1
Thank you for this script. I am having an issue however, When saving after creating new segments the screen stays dark and hangs. When I turn this script off I no longer have the issue. I am using Chrome on a W10 laptop.
AquaZR1
Area Manager
Area Manager
Posts: 292
Answers: 2
Has thanked: 235 times
Been thanked: 73 times
Send a message

Post by AquaZR1
JustinS83 wrote:
AquaZR1 wrote:Thank you for this script. I am having an issue however, When saving after creating new segments the screen stays dark and hangs. When I turn this script off I no longer have the issue. I am using Chrome on a W10 laptop.
I haven't been able to reproduce this issue. WME occasionally locks up for me upon saving without this script. Are you getting any errors in your console?
Don't have my laptop with me right now to test but on my desktop here at work I do not see the error. I will see if I can recreate it later.

Cheers!
AquaZR1
Area Manager
Area Manager
Posts: 292
Answers: 2
Has thanked: 235 times
Been thanked: 73 times
Send a message

Post by bures
JustinS83 wrote:
Olestas wrote:but my side bar is cluttered enough as-is with tabs
And some users don't want cluttered side bar with two lines of script output. ;) If you don'ť want to add a tab merge the two lines into one. For example: Length: 187 ft / 57 m.
bures
Waze Global Champs
Waze Global Champs
Posts: 993
Has thanked: 288 times
Been thanked: 345 times
Send a message

Post by carloslaso
THIS IS AWESOME!!
carloslaso
Waze Global Champs
Waze Global Champs
Posts: 3300
Answers: 1
Has thanked: 729 times
Been thanked: 1225 times
Send a message

Coordinador de Comunidad en México / Foro MX
Supervisor Noroeste México

iPhone 15 Pro Max / iOS 17ß / Waze ß 4.x

Post by carloslaso
bures wrote:
JustinS83 wrote:
Olestas wrote:but my side bar is cluttered enough as-is with tabs
And some users don't want cluttered side bar with two lines of script output. ;) If you don'ť want to add a tab merge the two lines into one. For example: Length: 187 ft / 57 m.
Is it posible to leave decimals? That will help a lot with the less than 15 meter penalty.
15.1m or 16.3m
carloslaso
Waze Global Champs
Waze Global Champs
Posts: 3300
Answers: 1
Has thanked: 729 times
Been thanked: 1225 times
Send a message

Coordinador de Comunidad en México / Foro MX
Supervisor Noroeste México

iPhone 15 Pro Max / iOS 17ß / Waze ß 4.x

Post by carloslaso
Bump!

So people do not forget this great script exists. :)
carloslaso
Waze Global Champs
Waze Global Champs
Posts: 3300
Answers: 1
Has thanked: 729 times
Been thanked: 1225 times
Send a message

Coordinador de Comunidad en México / Foro MX
Supervisor Noroeste México

iPhone 15 Pro Max / iOS 17ß / Waze ß 4.x

Post by dinohoo
ojlaw wrote: Tue Nov 22, 2022 3:54 pm It looks like a recent WME update broke this useful script.

 
Seconded, only showing a round number for me now
dinohoo
State Manager
State Manager
Posts: 86
Has thanked: 34 times
Been thanked: 22 times
Send a message

Post by dspille
Thanks. I am seeing this issue as well, although I had not been able to determine what was causing it. I will disable this script to see if the issue goes away.
dspille
Country Manager
Country Manager
Posts: 416
Has thanked: 477 times
Been thanked: 139 times
Send a message

Post by dspille
Not sure if anyone else is having any issues with this. I am running v0.7 of this script on Chrome v62.0.3202.89. With this script active, I am able to reproduce a freeze in WME when attempting to save a newly created segment. Steps to reproduce:

1) Create new road segment and complete properties
2) Leave road segment selected
3) Press save

WME freezes. I have to do a hard refresh.

One thing I noticed is that if I do not leave the road segment selected before I save, it doesn't freeze when saving.

Here are the console error messages at the time of save.

Code: Select all

Uncaught TypeError: Cannot set property 'innerHTML' of undefined
    at e.updateDisplay (eval at <anonymous> (:2:479), <anonymous>:1421:91)
    at initialize.triggerEvent (https://editor-assets.waze.com/production/js/vendor-efcb6931e3f930843ecc.js:62:131769)
    at e.value (https://editor-assets.waze.com/production/js/app-ad24b4e88b948a11fb0c.js:1:251181)
    at https://editor-assets.waze.com/production/js/app-ad24b4e88b948a11fb0c.js:1:681921
    at Object.d.protect (https://editor-assets.waze.com/production/js/app-ad24b4e88b948a11fb0c.js:1:13698)
    at e.value (https://editor-assets.waze.com/production/js/app-ad24b4e88b948a11fb0c.js:1:680903)
    at Object.<anonymous> (https://editor-assets.waze.com/production/js/app-ad24b4e88b948a11fb0c.js:1:679091)
    at d (https://editor-assets.waze.com/production/js/vendor-efcb6931e3f930843ecc.js:24:22472)
    at Object.fireWith [as resolveWith] (https://editor-assets.waze.com/production/js/vendor-efcb6931e3f930843ecc.js:24:23235)
    at s (https://editor-assets.waze.com/production/js/vendor-efcb6931e3f930843ecc.js:24:58304)
    at XMLHttpRequest.<anonymous> (https://editor-assets.waze.com/production/js/vendor-efcb6931e3f930843ecc.js:24:64156)
dspille
Country Manager
Country Manager
Posts: 416
Has thanked: 477 times
Been thanked: 139 times
Send a message

Post by Glodenox
Heads-up: this script will be affected by an upcoming change within the WME objects: W.location will no longer exist in the next (or one of the next) versions of the WME. This script seems to use W.location.code once, see this sticky for more information.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1568
Answers: 1
Has thanked: 278 times
Been thanked: 946 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png