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 HN NavPoints

Post by dBsooner
WME HN NavPoints

Version: 2021.09.14.01

Greasyfork: https://greasyfork.org/en/scripts/39056 ... -navpoints

Description: This script adds WME layers showing lines between all House Numbers and their Navigation Points, as well as the numbers themselves, even when not in the HN mode. The visibility can be disabled when zoomed out (lower #) further than a specified setting in WME Settings. The default is 5, the minimum is 4. Visibility of the layers can be controlled in the layer menu and with keyboard shortcuts.

Developers: dBsooner through WazeDev (Originally developed by MajkiiTelini)

Feature list:
  • Two layers within WME: HN NavPoints (lines) and HN NavPoints Numbers.
  • House Number mouseover tooltip, for zoom levels 6-10, with edit button for easy HN mode access.
  • Setting to disable when zoomed out wider than specified zoom level (minimum 4, default 5).
  • Ability to use keyboard shortcuts to toggle each layer independently.
  • Settings, including keyboard shortcuts, synchronize between browsers with the help of WazeWrap.
  • Spinner in top left corner of WME map pane to indicate when script is actively processing.
  • Mouseover tooltip for house numbers to show full address as well as edit button to enter house number edit mode. Tooltip can be disabled in settings.
Changelog:

Code: Select all

2021.09.14.01: NEW: Auto-select input box when adding a new HN.
               BUGFIX: HN and lines not clearing on first click.
               BUGFIX: HN and lines not added back if no changes made after deselection.
2021.08.30.01: CHANGE: Change forum post URL.
2021.08.26.02: CHANGE: Update zoom levels to new WME numbers.
2021.07.28.01: NEW: Fix WME bug by forcing WME to clean its HN object array when exiting house numbers mode, thus preventing WME from growing the array astonishingly large, wasting resources.
               NEW: Multiple new functions to aide in the bugfixes named below.
               CHANGE: Allow HNs to be drawn concurrently with other map features. (MUCH faster)
               CHANGE: WazeWrap.Requires.Icon class used now instead of injecting my own OpenLayers.Icon class.
               CHANGE: Less data stored within HNs and Lines objects.
               CHANGE: Now using the new WME font for HNs.
               BUGFIX: Clicking the reload / refresh icon in WME would not clear HNs or Lines in some instances.
               BUGFIX: HNs and Lines were either removed, not removed or were multiplied (multiple numbers and lines for same HN) in certain situations.
               BUGFIX: Selecting a house number input field would not remove the HN or Line in certain situations.
2020.07.27.02: NEW: Setting to disable house number mouseover tooltip.
               NEW: With the mouseover tooltip disabled, script reverts to previous style of
                    numbers to increase performance.
               NEW: Setting to disable keeping the house numbers layer on top of other layers.
               CHANGE: WME map object references.
               CHANGE: Changes to allow for better ability to select features behind house numbers: house numbers smaller, nav point line layer zindex.
               BUGFIX: Incorrect display, omitting of data in a right-to-left text locale.
               BUGFIX: Memory management by removing lines and numbers no longer in the map extent.
2020.07.08.01: CHANGE: WME compaitibility update.
2020.06.16.01: NEW: HN number mouseover tooltip (zooms 6-10). Edit button for easy HN mode access.
               CHANGE: Lots of under-the-hood stuff to increase performance.
               CHANGE: Latest WME update compatibility.
               BUGFIX: Reloads not properly refreshing HN and lines.
2019.12.06.01: CHANGE: WME v2.43-40-gf367bffa4 compatibility.
2019.10.18.01: NEW: Initial WazeDev version release.
               NEW: Updated to utilize WazeWrap features.
               NEW: Settings saved to WazeWrap for easy access from other browsers.
               NEW: Disable when zoom level < # setting created. Set in WME Settings. (Minimum: 4)
               NEW: Spinner in top left corner of WME when HN NavPoints are loading.
               CHANGE: Lots of under the hood stuff to enhance experience.
               BUGFIX: Keyboard shortcuts to toggle layers now remembered.
Color code (lines and number outlines):
Forced & unedited => red
Forced & edited => orange
Unforced & unedited => yellow
Unforced & edited => white

Screenshots:
https://i.ibb.co/NrNSkdy/HN-Nav-Points-Both-On.png https://i.ibb.co/yq0bJry/HN-Nav-Points-Numbers-Only.png
https://i.ibb.co/kyRPq04/HN-Nav-Points-Lines-Only.png https://i.ibb.co/qk73Pyt/HN-Nav-Points-HN-Mode.png
https://i.ibb.co/n3jCLx8/image.png
 
 
 
 
 
 
dBsooner
Map Editor - Level 5
Map Editor - Level 5
Posts: 662
Has thanked: 333 times
Been thanked: 377 times
Last edited by dBsooner on Wed Sep 29, 2021 3:29 pm, edited 14 times in total.
https://s.waze.tools/c5s.pnghttps://s.waze.tools/s0175.pnghttps://storage.googleapis.com/wazeopedia-files/c/c1/Badge_BetaTester.pnghttps://s.waze.tools/beta.pnghttps://storage.googleapis.com/wazeopedia-files/a/ad/Badge_Mentor.png
• AM: Eastern Oklahoma, DFW, Southern Florida
• Wiki: WME | Editing Manual | Best Practices | FAQ | Places
• AT&T | iPhone XS Max | iOS 13.5.1 | Waze Latest Beta

Post by dbcm
Hi! I'm getting the erro below here: https://www.waze.com/editor?env=row&lon ... 568&zoom=6

Code: Select all

Uncaught TypeError: Cannot read property 'attributes' of undefined
    at drawHNLines (userscript.html?id=afc24a0a-a1e6-49f9-aeab-9364f222c6e4:208)
    at initialize.requestHNs (userscript.html?id=afc24a0a-a1e6-49f9-aeab-9364f222c6e4:144)
    at initialize.triggerEvent (vendor-3772879e64537e85ca8c.js:1)
    at initialize.e.onLoadEnd (vendor-3772879e64537e85ca8c.js:1)
    at initialize.triggerEvent (vendor-3772879e64537e85ca8c.js:1)
    at initialize.onImageLoad (vendor-3772879e64537e85ca8c.js:1)
    at HTMLImageElement.<anonymous> (vendor-3772879e64537e85ca8c.js:1)
dbcm
Coordinators
Coordinators
Posts: 644
Has thanked: 201 times
Been thanked: 696 times
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯

Post by dbcm
Might be because of the roads there has no direction.

I fixed your plugin with this code

Code: Select all

function drawHNLines(type, segment) {
    HNNavPointsLayer.removeFeatures(HNNavPointsLayer.getFeaturesByAttribute("segmentId", segment.id));
    for (var j = 0; j < segment.numbers.length; j++) {
        let seg = W.model.segments.objects[segment.id];
        if (seg)
            drawHNLine(type, seg.attributes.primaryStreetID, segment.id, segment.numbers[j]);
    }
}
dbcm
Coordinators
Coordinators
Posts: 644
Has thanked: 201 times
Been thanked: 696 times
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯

Post by bummerdude69
MajkiiTelini wrote:And showing sample from upcoming function - show numbers without HN mode:
I hope there's an easy button to turn that on and off. :shock: :D
bummerdude69
Area Manager
Area Manager
Posts: 196
Has thanked: 217 times
Been thanked: 48 times


Post by dBsooner
MajkiiTelini wrote:I know and I was prepared ;)
New version is available.

And I have a problem: since our CZ community is no longer working with house number (we have decided to use another solution to maintain house numbers) I have no place where can I test this script completely ... And I do not have a proper motivation to further develop... ;)

So if anyone wants to be responsible for this script, let me know. I hope I can still be a useful support...
I’d be happy to take over development and continue down the road with it. I’d bring it into the WazeDev team collaboration group GitHub and GreasyFork. Do you want to discuss this more privately? Thank you for all the work you’ve done! It’s a great script which a lot of us use heavily!
dBsooner
Map Editor - Level 5
Map Editor - Level 5
Posts: 662
Has thanked: 333 times
Been thanked: 377 times
https://s.waze.tools/c5s.pnghttps://s.waze.tools/s0175.pnghttps://storage.googleapis.com/wazeopedia-files/c/c1/Badge_BetaTester.pnghttps://s.waze.tools/beta.pnghttps://storage.googleapis.com/wazeopedia-files/a/ad/Badge_Mentor.png
• AM: Eastern Oklahoma, DFW, Southern Florida
• Wiki: WME | Editing Manual | Best Practices | FAQ | Places
• AT&T | iPhone XS Max | iOS 13.5.1 | Waze Latest Beta

Post by dBsooner
WME HN NavPoints v2019.10.18.01 is out1!

TL;DR: WME HN NavPoints is now being developed, supported and maintained by me through WazeDev. The logic is the same, the colors are the same, the GreasyFork URL has changed. When you perform the next 'update' of your scripts, specifically WME HN NavPoints, you will be prompted to replace it with the new WazeDev version (2019.10.18.01). That's all you need to do.

Further reading:

Greetings, WME HN NavPoints users! First, thank you to MajkiiTelini for allowing me, through the WazeDev team, to take over development of this extremely useful script! Long live community supported scripts!!

So, as MajkiiTelini stated in a previous post, he has stepped aside from developing this script as it is no longer useful in his home area. Understandably, this also removes the "desire" to continue to develop and support it, let alone makes it more challenging as you don't use it when you are editing. Fortunately, he allowed me to move the code into the WazeDev team repository for continue development by the WazeDev team members. I have taken the code and did some (hopefully) nice little changes.

This thread will continue to be the thread for WME HN NavPoints to preserve the history of the script. I have taken over as the thread owner and will continue to update the OP with information to keep it the home for latest info.

Now on to the goods!

What's new?

Visually, not much. There is a new spinner located in the top left corner of the WME map pane that indicates when WME HN NavPoints is actively processing HN NavPoints or Numbers. Look for it just to the left of the map location (city, state, etc).

There is a new setting to disable the display of the HN NavPoints and Numbers when you zoom out wider than your specified zoom level. The minimum is 4 as anything wider (zooms 1-3) than that do not include segments less than mH in the data (they are actual in the tiles you see), so there isn't any data to put on the screen. Default setting is 5.

WazeWrap features have been utilized throughout the script to bring it into alignment with other WazeDev team scripts. The setting for disable < zoom level is also synchronized between browsers if you have setup a WazeWrap pin code.

I found a bug in the way keyboard shortcuts were being handled and fixed them, along with the assistance of WazeWrap here. So if you choose to use shortcuts to toggle the layers on/off, they will now save and be retained through sessions (as well as synced to other browsers [see previous paragraph]).

The rest is all "under the hood". I rewrote some of the logic involved in determining the way to gather, process and display the data to hopefully increase efficiency (read: less resources, faster processing, etc).

Thank you all for listening to my rant, on with the show!

Changelog:

Code: Select all

2019.10.18.01: NEW: Initial WazeDev version release.
               NEW: Updated to utilize WazeWrap features.
               NEW: Settings saved to WazeWrap for easy access from other browsers.
               NEW: Disable when zoom level < # setting created. Set in WME Settings. (Minimum: 4)
               NEW: Spinner in top left corner of WME when HN NavPoints are loading.
               CHANGE: Lots of under the hood stuff to enhance experience.
               BUGFIX: Keyboard shortcuts to toggle layers now remembered.
dBsooner
Map Editor - Level 5
Map Editor - Level 5
Posts: 662
Has thanked: 333 times
Been thanked: 377 times
Last edited by dBsooner on Wed Oct 23, 2019 9:02 pm, edited 1 time in total.
https://s.waze.tools/c5s.pnghttps://s.waze.tools/s0175.pnghttps://storage.googleapis.com/wazeopedia-files/c/c1/Badge_BetaTester.pnghttps://s.waze.tools/beta.pnghttps://storage.googleapis.com/wazeopedia-files/a/ad/Badge_Mentor.png
• AM: Eastern Oklahoma, DFW, Southern Florida
• Wiki: WME | Editing Manual | Best Practices | FAQ | Places
• AT&T | iPhone XS Max | iOS 13.5.1 | Waze Latest Beta

Post by dBsooner
And we are off!

Original post has been updated with the information and this post has been modified to show the specific changes.
dBsooner
Map Editor - Level 5
Map Editor - Level 5
Posts: 662
Has thanked: 333 times
Been thanked: 377 times
https://s.waze.tools/c5s.pnghttps://s.waze.tools/s0175.pnghttps://storage.googleapis.com/wazeopedia-files/c/c1/Badge_BetaTester.pnghttps://s.waze.tools/beta.pnghttps://storage.googleapis.com/wazeopedia-files/a/ad/Badge_Mentor.png
• AM: Eastern Oklahoma, DFW, Southern Florida
• Wiki: WME | Editing Manual | Best Practices | FAQ | Places
• AT&T | iPhone XS Max | iOS 13.5.1 | Waze Latest Beta

Post by cnor_il
Hi

Why do I get "script alert history"? "
cnor_il
Posts: 2046
Has thanked: 1766 times
Been thanked: 497 times
Attachments
קנור - מתנדב בקהילת עורכי המפה
Cnor - A volunteer in the Israeli community of Waze map editors
https://s.waze.tools/c5s.pngהודעה ראשונה בפורום הנחיות להוספת מקום כללים לפתיחת בקשות עדכון בפורום עדכון מפה

Post by BtBalways
dBsooner wrote:
lg1992 wrote:Bug: If a house number includes a non-digit character, the tooltip only shows the street name. Here's an example. There're four numbers on this segment, all include a Hebrew letter. I added one with an English letter, and the tooltip doesn't show it either.
I believe I have this fixed in the latest beta release. I'm going to let it run for a couple more days before I release it to public.
I for one hadn't even realised it was there. I have used RapidHN to add long runs but generally don't show numbers while editing but simply rely on Nav point lines to indicate whether numbers exist on a particular road.

Thank you for prompting me to read interpolation/extrapolation rules again to discover why it hasn't happened on some places I have edited. Still can't find where coloured 'forced' etc is explained though.

Sent from my Nexus 7 using Tapatalk
BtBalways
Area Manager
Area Manager
Posts: 495
Has thanked: 411 times
Been thanked: 100 times
Roy - (3)AM; N.Surrey