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 Enhanced Search

Post by JustinS83
WME Enhanced Search

Version: 2019.04.08.02

Greasyfork: https://greasyfork.org/en/scripts/38111 ... ced-search

Description: First I want to give props to Sebiseba and WME Bookmarks for having developed the functionality to do some of this years ago. I loved this functionality but found that I never used the rest of the Bookmarks script so I thought I could do something in a stand alone script and add more functionality since it isn't tied into other features & wouldn't complicate another script.

This script enhances the WME search box by allowing you to paste or drag-and-drop URLs, segment IDs, Place IDs, mapComment IDs, etc. into the search box and it be automatically parsed to move to the location specified in the URL and select any objects that may exist (if it is a WME PL).

Note:The first time you paste into the search box with this script active Chrome will prompt you to ask if you want to allow waze.com to access the clipboard. You must allow this for the script to work. It does not allow the script to do anything nefarious - just access the data you are pasting into the search box.

What is currently supported for parsing on paste:
  • WME PLs
    • Will jump to the coordinates in the PL
    • Will set the zoom to the zoom in the PL
    • Select any item in the PL: segments, Places, mapComments, URs, MPs
  • Livemap PLs
  • Google Maps URLs
  • Bing Maps URLs
  • OpenStreetMap URLs
  • What3Words URLs (https://w3w.co/wounds.client.face)
    • The three word code only will be parsed, too (wounds.client.face)
  • Plus.codes URLs (https://plus.codes/86FQ9J4V+6C)
    • Plus.codes pasted directly (86FQ9J4V+6C)
  • Mandrillapp urls
  • Segment IDs
  • Place IDs
If the segment or venue not found on screen, it is looked up via Segment Finder (thank you Joyriding!) and jumps to the location (if found) and selects them.

Regular expression highlighting of segments and Places is also possible! See this post for more information. Along with the highlighting a display of how many segments and Places were found with the given regular expression will display. Clicking on these displays will select all of those segments or Places. See this post for more information.

A blue border is placed on the search box to indicate the script is installed and running.
https://imgur.com/szNs9dY.png


Changelog:

Code: Select all

2019-04-08 - 2019.04.08.02 - Venue search by ID (when off screen) now works for ROW and IL.
2019-04-02 - 2019.04.02.02 - Adding support for finding segments in ROW and IL when the segment ID is pasted directly and they are not on screen
2019-04-02 - 2019.04.02.01 - A display for how many segments and Places are found with the supplied regex search now displays when searching.  Clicking on either of these will select all of the highlighted segments/Places.
2019-04-01 - 2019.04.01.01 - Added regular expression highlighting for segments and Places (primary and alt names)
2019-03-29 - 2019.03.29.02 - Initial release!
JustinS83  
Waze Global Champs
Waze Global Champs
Posts: 1463
Has thanked: 215 times
Been thanked: 2389 times

POSTER_ID:17015339

1

Send a message
Last edited by JustinS83 on Tue Apr 09, 2019 3:04 am, edited 11 times in total.

Post by juliansean
Looks like this morning's WME update broke this script. Putting a PL in the search will bring you to the area, but won't set the corresponding zoom and won't select the road segment, UR, or MC.

Obviously, I use this script all the time, so I hope you have time to fix it. Your work is appreciated.

Respectfully,

Sean
juliansean
Country Manager
Country Manager
Posts: 1349
Answers: 1
Has thanked: 351 times
Been thanked: 379 times
Send a message
Sean Julian
CM
SM: TX, LA, MS, AR, OK
AM: SE FL, Boston, MA, Brooklyn, NY, Bronx, NY, Manhattan, NY, Queens, NY, E CA, SW KS


Post by juliansean
I turned off all scripts but that one, and still can't get any UR's to come up. It will jump to the location, but not open the UR's. Very strange.
juliansean
Country Manager
Country Manager
Posts: 1349
Answers: 1
Has thanked: 351 times
Been thanked: 379 times
Send a message
Sean Julian
CM
SM: TX, LA, MS, AR, OK
AM: SE FL, Boston, MA, Brooklyn, NY, Bronx, NY, Manhattan, NY, Queens, NY, E CA, SW KS


Post by juliansean
I did disable all but yours. Line 349 is where the error jumps.

http://prntscr.com/ojgjkv
http://prntscr.com/ojgk6v


Sorry, just saw you know the issue.
juliansean
Country Manager
Country Manager
Posts: 1349
Answers: 1
Has thanked: 351 times
Been thanked: 379 times
Send a message
Sean Julian
CM
SM: TX, LA, MS, AR, OK
AM: SE FL, Boston, MA, Brooklyn, NY, Bronx, NY, Manhattan, NY, Queens, NY, E CA, SW KS


Post by juliansean
Thank you Justin!
juliansean
Country Manager
Country Manager
Posts: 1349
Answers: 1
Has thanked: 351 times
Been thanked: 379 times
Send a message
Sean Julian
CM
SM: TX, LA, MS, AR, OK
AM: SE FL, Boston, MA, Brooklyn, NY, Bronx, NY, Manhattan, NY, Queens, NY, E CA, SW KS


Post by juliansean
I have a minor bug to report. I have an Excel spreadsheet of PL's from UR's I am working. If a UR is closed but I still use my spreadsheet to copy and then paste into "enhanced search," the URL doesn't disappear from the search bar. If this happens too many times in a row (haven't found an exact number yet) when I finally get to a valid UR, "enhanced search" won't actually open the UR. I have to reload the page. I "think" if enhanced search was made to clear out the search bar every time whether the PL opened a UR or not, this would not be an issue.

***edit***

The search bar doesn't clear, even with a valid PL that pulls up a UR, if that UR is in the same screen frame as a previous UR.

http://prntscr.com/oqhv0f

If this isn't possible, no big deal. I am very capable of reloading a page. But, if this was an easy fix, I'd appreciate it. Thank you!

http://prntscr.com/oqhihw

Second picture is when a UR comes up then the search bar clears.

http://prntscr.com/oqhkdo
juliansean
Country Manager
Country Manager
Posts: 1349
Answers: 1
Has thanked: 351 times
Been thanked: 379 times
Send a message
Sean Julian
CM
SM: TX, LA, MS, AR, OK
AM: SE FL, Boston, MA, Brooklyn, NY, Bronx, NY, Manhattan, NY, Queens, NY, E CA, SW KS


Post by juliansean
I am having an issue (and maybe I'm misunderstanding the script) where when a new editor asks for a downlock, and I copy their PL, enhanced search isn't just selecting the segment(s) but also allowing changes to my WME setup. In the past, ES would essentially strip &s=1234567890& from the pl, and it isn't doing that any more.

Thank you.

Example... https://www.waze.com/en-US/editor/?env= ... ,518202004 the $s=1630928343& from the editor's PL is no longer stripped in Enhanced Search
juliansean
Country Manager
Country Manager
Posts: 1349
Answers: 1
Has thanked: 351 times
Been thanked: 379 times
Send a message
Sean Julian
CM
SM: TX, LA, MS, AR, OK
AM: SE FL, Boston, MA, Brooklyn, NY, Bronx, NY, Manhattan, NY, Queens, NY, E CA, SW KS


Post by juliansean
Happening to me as well.
juliansean
Country Manager
Country Manager
Posts: 1349
Answers: 1
Has thanked: 351 times
Been thanked: 379 times
Send a message
Sean Julian
CM
SM: TX, LA, MS, AR, OK
AM: SE FL, Boston, MA, Brooklyn, NY, Bronx, NY, Manhattan, NY, Queens, NY, E CA, SW KS


Post by juliansean
Thank you Justin. Much better!
juliansean
Country Manager
Country Manager
Posts: 1349
Answers: 1
Has thanked: 351 times
Been thanked: 379 times
Send a message
Sean Julian
CM
SM: TX, LA, MS, AR, OK
AM: SE FL, Boston, MA, Brooklyn, NY, Bronx, NY, Manhattan, NY, Queens, NY, E CA, SW KS


Post by JustinS83
Update released - 2019.04.01.02

Regular expression (regex) highlighting is now possible! With regex highlighting your searches must start and end with '/'. Example: /McDonald's/
If you want your search to be case insensitive you can append the 'i' flag to the end: /mcdonald's/i

This will search all segments and Places checking both the primary and alternate names.

The search item must be at least two characters long.

The highlighting color right now is a light orange - if this is too difficult to see I may adjust (no you are not getting a configuration for the highlight color).

Examples:

This will highlight any segment or Place that has "oo" in the name (no, I don't know why you would want to do this)
https://imgur.com/dqm2Tlz.png

Maybe you know someone incorrectly abbreviated "Way" to "Wy" in a specific area and you want to quickly highlight them (this will highlight all segments/Places that end with "Wy")
https://imgur.com/d7lZJQt.png

Or you want to find all of the roads with state route names to make sure they meet the minimum FC classification
https://imgur.com/TfiK3N4.png

None of the examples really use the power of regex customization, but they demonstrate how it can be very easy to type in something in a second or two rather than setting something up in another script, or painfully searching manually.
JustinS83  
Waze Global Champs
Waze Global Champs
Posts: 1463
Has thanked: 215 times
Been thanked: 2389 times
Send a message