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
The three word code only will be parsed, too (wounds.client.face)
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.
Changelog:
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!
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)
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”)
Or you want to find all of the roads with state route names to make sure they meet the minimum FC classification
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.
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 or Places.
(Edit: when will be able to customize the highlight color? I know you said something like “when hell freezes over”, but I think that leaves a lot of room for interpretation.)
For realsies:
Adding support for finding segments in ROW and IL when the segment IDs are pasted directly into the search box and they are not on screen
How about creating a script for the forum that automatically clicks the “thanks” button when I open one of your script topics to find you’ve released yet another update? All that clicking on a little icon is hard work. :lol:
I was thinking about this the other day. Good timing. I’m starting a new project so I may not have time until I am done with it…or I get bored/frustrated in the middle and decide to work on this
Now, my obligatory Feature Request: can there be a history of pasted/searched items? Oftentimes, while studying something on the map, I’ll want to jump back and forth between two (rarely, three) spots, but I don’t necessarily need to have a more permanent bookmark. It would even be fine if the history disappeared with the tab.
I love this script. I would like to know if there is a way to find a specific location between two crossing segments (+ intersection). Like “XXX Ave & YYY Road” and it would take me directly were these two segments cross each other.