[Script] WME Enhanced Search

:o I really didn’t know that! I’m guessing that since it opens the result in google maps I just need to find a script to open the WME from that location. Thanks JustinS83!

I’m not sure what you mean - if you use this search format in WME it will go to that location in WME. Google search is used in the background, but the results take you to the location in WME.

I’m learning now that I can do that. You are a life saviour. Thanks again.

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

Working for me. Looks like another script is blowing up and interfering :slight_smile:

It’s working fine for me as well.

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.

Did you disable toolbox?

Nevermind, I just realized the issue :lol: I’ll get it fixed shortly.

[s]I did disable all but yours. Line 349 is where the error jumps.

http://prntscr.com/ojgjkv
http://prntscr.com/ojgk6v[/s]

Sorry, just saw you know the issue.

Update: 2019.07.24.01

Fixes the bug with UR selection when following a WME URL

Thank you Justin!

Two suggestions for enhancement:

  1. support marker=true in, just as it is supported when the URL is pasted into the browser address bar
  2. support for the wmebr showpur / endshow to to open PURs. https://www.waze.com/en-US/editor?zoom=5&lon=-75.915576&lat=40.365122&showpur=186188180.1861750724.20707&endshow
    Use case: loading WME + scripts takes too long, so I use WMEBR with a click, ctrl-C, ctrl-W, and paste
    into the enhanced search window.

Thanks for considering these

I don’t believe there is a mechanism that can be triggered to display the marker - I believe it is only checked/displayed when the page is loaded, but I will check.

No, I won’t support this. WMEBR’s showpur/endshow is utilizing/relying on URO+'s implementation to display the PUR (URO+ is what adds and reads the showpur/endshow) and I do not like this implementation as it needlessly modifies the URL and adds extra parsing. WME Place Interface Enhancements as the “Automatically open PUR” option which works on normal WME URLs and can/should be used instead.

1 Like

Thanks for the info. I do like WMEBR for finding high-locked PURs in a state.
I had transitioned from URO+/ URcomments to URC-e, and would need to re-install URO+ in order to use WMEBR effectively for this purpose.

Or enable the aforementioned option in PIE and it will work.

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

This script seems to be working after the latest WME update (one of the few!).

However, it is throwing an error on the Chrome console:

Uncaught (in promise) TypeError: W.map.zoomTo is not a function at jump4326 (userscript.html?id=f8b8ae08-75e3-465f-932e-76c60923e55a:518) at parsePaste (userscript.html?id=f8b8ae08-75e3-465f-932e-76c60923e55a:290) at HTMLInputElement.readPaste (userscript.html?id=f8b8ae08-75e3-465f-932e-76c60923e55a:277)
That’s when pasting a permalink into the Search box. Pasting a segment ID works fine. I haven’t tried any other search types, so I’m not sure if any of them might be broken.

As long as it’s still working, I won’t worry too much, but you might want to look at it at some point. :wink:

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=usa&lon=-96.57616&lat=33.13226&s=1630928343&zoom=6&segments=518202002,518202004 the $s=1630928343& from the editor’s PL is no longer stripped in Enhanced Search

ES doesn’t even parse that part of the URL, sonit doesn’t matter that it isn’t stripped - ES won’t mess with the layers except to turn on the segment or places layers if they aren’t enabled and segments or places is found in the url