WMEOpenData

By Twister_UK Last update May 20, 2013 — Installed 2,245 times.

Script Summary: Provides streetname suggestions pulled from the OS OpenData database, and allows selected third-party mapping sites to be opened up at the same location as the WME map



Version: 1.32

Thumb

Extension for the new Waze map editor (WME), the primary purpose of which is to search the OS OpenData Locator database of street names whenever a road segment is highlighted by the user, and generate a list of possible matches from which the user can select and with a single click copy into the WME segment properties ready for submission to Waze. To assist the selection process, a bounding box is drawn over the map corresponding to the coordinates given in the Locator data for the extents of the street name.

As a secondary role (although fans of code history may be interested to know that it was originally the primary and only purpose), the script also adds links to other mapping sites (currently OS OpenData and MusicalChairs) which open up in new tabs at the same location as the current WME view. Clicking on the links again will manually refresh these tabs, or checkboxes are also provided allowing the tabs to be automatically refreshed whenever the WME view changes.

Changelog:

0.4 - 20120628 - initial release at userscripts.org
0.5 - 20120629 - adds support for world.waze.com/map-editor/* WME URL
0.6 - 20120707 - supports swapped lat/lon ordering in permalink URL
0.7 - 20120713 - improved accuracy of lat/lon to OS gridref conversion
0.8 - 20120717 - proof of concept development version, not released
0.9 - 20120818 - supports OS Locator data lookup, improves integration with WME
0.9.1 - 20120910 - street name formatting tweak
0.9.2 - 20120917 - removed Cartouche link
0.9.3 - 20120922 - street name abbreviations tweak, improved city name selection
0.9.4 - 20121004 - increased transparency of bounding box, to improve appearance with latest version of WME Colour Highlights and to make aerial layer easier to see through the box
1.0 - 20121012 - Fixed minor bug that prevented a newly entered city name being copied into the segment properties the first time the Copy to Properties button was clicked. Added support for the beta version of WME
1.1 - 20121013 - Locator results box is now minimised by default in the non-beta WME as well, due to the new Colour Highlights script requiring more space for its own UI... In both beta and non-beta versions, the results box now pops-up on mouseover, rather than via the hide/show links in v1.0
1.2 - 20121014 - Moved Copy to Properties button to top of UI after realising this was where my mouse pointer was more often than not at the point I wanted to click the button... For editors at AM level or above, the button has been renamed to Apply to Properties, as clicking the Apply button manually is no longer required.
1.2.1 - 20121014 - Locator results popup behaviour now uses a hybrid of the auto and manually controlled schemes, to avoid the odd situations where the minimise and maximise functions got into a loop... Popup now maximises on mouseover, but will only minimise either by clicking the [hide] link or by clicking the Copy to/Apply to button.
1.3 - 20121101 - As an early Chrimbo present to myself I've obtained a SSL certificate for my server, which means the OS data can now be served up from a https: link, preventing Chrome from complaining about how hideously insecure WME had become with the script installed... Also fixes the upper/lowercase issue with Welsh streetnames containing -y- and -yr-
1.4 - 20121104 - Streetname matching uses a new sorting method, increasing the probability that the first name in the list is the correct one...
1.5 - 20121105 - Links to OpenData and Musical Chairs sites now visible in new WME beta. Replaced mouseover event with a [show] link to open results list.
1.5.1 - 20121105 - Results popup can now be reopened correctly after a copy/apply operation
1.5.2 - 20121105 - Fixed for new public and beta WME versions
1.5.3 - 20121105 - Fixed Musical Chairs auto-tracking
1.6 - 20121114 - Fixed the "scrollbar-bounce" problem in Chrome. OS results now show the ward/locality for each street. Moved the permalink into the links area on the left of the map window. Street names starting "St " are now converted to "St. ".
1.7 - 20121116 - Permalink now copied into links area, retaining the original in the lower-right corner. Highlights adjacent results with the same streetname as the selected result. Auto-selects the "Use new name" radio button when typing in the name field. Uses the November 2012 OS Locator dataset.
1.8 - 20121202 - Script interface is now presented in a draggable window. Will now perform a new lookup if user normal-clicks on a segment (i.e. not a ctrl-click to add the segment to the existing selection)
1.9 - 20121204 - Fixes tab focus issue in Chrome when auto-tracking is enabled. Added mimimise/maximise control to dragbar allowing window to be folded up for storage...
1.10 - 20121205 - Allows dragging to continue if mouse pointer moves outside the dragbar during a drag. Bumps window position up the screen when maximising if the maximised window wouldn't completely fit onto the screen at its current position. Saves window position between editing sessions.
1.11 - 20121209 - Adds drop-down list allowing city name selection from the names already defined in the current WME view. If a new segment is selected and the same street name is present in the search results as was applied to the last edited segment, this name will be pre-selected for use with this new segment. Added sanity-checking for saved window location to prevent it being rendered completely off-screen when WME was reloaded. Removed errant bit of debug code preventing script from running in latest WME beta.
1.12 - 20121210 - Maintains city name selection in drop-down list if the previously selected name is still present after a list refresh. Now applies the same 1km rule to continued use of a city name selected from the drop-down list as is used for the manually-entered name.
1.13 - 20130117 - Fixes issue with & being inserted as & amp ; when using an existing city name.
1.14 - 20130121 - Checks city names against OS Gazetteer data. Enabled operation on the new beta WME URL.
1.15 - 20130123 - Adds drop-down list showing the 10 closest place names (or 11 if the top 10 doesn't include a city, but a city is present in the unlisted results) from the Gazetteer data within a 5km radius of the selected segment. Bounding box highlight is now disabled when the UI is minimised.
1.15.1 - 20130123 - Vertical scrollbar no longer appears briefly during WME page reloads.
1.16 - 20130130 - Disables the Copy/Apply to Properties button if no segments are selected, or if any of the selected segments are locked by a higher level editor. "Place name is..." status text is now updated when the name source is changed via the radio button. Fixes a bug in the duplicate city name test, which could prevent the streetname bounding box from being rendered when a streetname was selected, until the map was panned/zoomed forcing a box redraw.
1.17 - 20130221 - Radio button labels can now be clicked to select the associated radio button (thanks to Timbones for the suggestion). Works with latest WME beta.
1.18 - 20130320 - Fixes issue with OS Gazetteer place names that contain the - character. No longer silently changes the selected Gazetteer place name if the previously selected name drops out of the list...
1.19 - 20130326 - Improved accuracy of bounding box positions.
1.20 - 20130327 - Improved speed of gazetteer searches for place names containing - characters. Fixed "question mark in a black diamond" issue with certain accented characters.
1.21 - 20130330 - Fixed auto-selection of OS placename if a county suffix is present.
1.22 - 20130402 - Added option (NameCheck) to highlight all potentially incorrect names.
1.23 - 20130403 - NameCheck no longer causes deadlock during lengthy save operations.
1.24 - 20130403 - NameCheck now ignores ramps, and handles (N)/(S)/etc direction suffixes. Auto-selection of OS placename now works if the previously used name was the extra city entry added to the drop-down list. No longer case-incorrects "IV" and "VI" roman numerals in street names...
1.25 - 20130409 - Compatibility update for new public and beta versions of WME. All roman numerals found in OS Locator data should now be case-correct...
1.26 - 20130410 - NameCheck no longer continues to highlight segments that have been correctly renamed but not yet saved.
1.27 - 20130427 - Fix for incorrect "Place name is not in OS data" gazetteer search results.
1.28 - 20130502 - NameCheck subjected to several days of in-depth performance analysis in Firefox and Chrome. The results of this work should be fairly obvious to anyone who's used NameCheck in the past, especially in densely populated areas (e.g. central London)...
1.29 - 20130503 - NameCheck highlighting corrected in areas of the map where the streetnames are defined in more than one block of OS data. WME segment highlights no longer cleared when NameCheck is deactivated.
1.30 - 20130503 - Fixed "undefined" locality bug in Chrome. Increased accuracy of NameCheck results.
1.31 - 20130513 - Uses May 2013 OS Locator dataset.
1.32 - 20130520 - Fix for placename uniqueness test.

Notes:

Due to the UK-centric nature of the external sites and streetname dataset, this script is intended for use only within the bounds of the UK map, and has not been tested beyond those bounds.

At present the OS OpenData streetname data only covers England, Scotland and Wales.

The link to the OS OpenData map viewing site requires that you also have my "OS OpenData FullHeight" script installed (http://userscripts.org/scripts/show/137248)