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 US Government Boundaries

Post by
WME US Government Boundaries
Plots US boundaries (federal / state / local) as a layer on the map.
(not compatible with Firefox / Greasemonkey)

Currently supports:
  • ZIP codes
https://greasyfork.org/en/scripts/25631 ... boundaries

Version 0.3.3
Displays the ZIP code located at the center point of the map view in the black header bar. Click the ZIP code there to open the USPS's "ZIP code to city" conversion web page.

Planned Features
  • Add polygon preferences (color, fill, line thickness, opacity, etc)
  • Display "default" city name along with ZIP code in header bar
  • Add other boundary types (only if requested by users, so please comment here if you want to see more boundary types added).

Post by citeman
Love this simple script... however, any chance you can make this script have a click on/off in the layers area?
citeman
State Manager
State Manager
Posts: 731
Has thanked: 792 times
Been thanked: 305 times
- CITEMAN
Remember to keep Wazing!

https://s.waze.tools/c5s.png https://j.mp/3aCaEGq https://storage.googleapis.com/wazeoped ... -01sml.png
Closure & Restrictions Fanatic


Post by Alpha_VA
Since today, in Win Chrome, the script is not working anymore, even if it's the sole script activated.
Alpha_VA
Posts: 209
Has thanked: 61 times
Been thanked: 22 times


Post by bart99gt
The "Get USPS Routes" feature doesn't seem to be working this morning. Unsure if it is an issue with WME or something on the back end. It just spins and spins and doesn't load anything.
bart99gt
Posts: 531
Has thanked: 91 times
Been thanked: 239 times
MAR LAM (W DC Suburbs)
MS/AR/Atlanta Metro AM

Post by bart99gt
Not sure what is going on on my end then. I've disabled every script and add-on in Chrome, including those having nothing to do with WME, and it still isn't working properly.
bart99gt
Posts: 531
Has thanked: 91 times
Been thanked: 239 times
MAR LAM (W DC Suburbs)
MS/AR/Atlanta Metro AM

Post by ABelter
(Cross-posting from the Discord Scripts Server #General)

It looks like the USPS URL is using a slightly different WKID now. Other than the different lat/lon and radius automatically generated, the spatialReference part of the URL is the only difference. The current USGB url returned no features when I accessed it directly in browser; the new URL returned a full array of features.

URL used by USGB:

Code: Select all

https://gis.usps.com/arcgis/rest/services/EDDM/selectNear/GPServer/routes/execute?f=json&env%3AoutSR=102100&Selecting_Features=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22features%22%3A%5B%7B%22geometry%22%3A%7B%22x%22%3A-80.93286%2C%22y%22%3A35.25243%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D%7D%5D%2C%22sr%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D&Distance=0.5&Rte_Box=R&userName=EDDM
URL used by the EDDM page on usps.com:

Code: Select all

https://gis.usps.com/arcgis/rest/services/EDDM/selectNear/GPServer/routes/execute?f=json&env%3AoutSR=102100&Selecting_Features=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22features%22%3A%5B%7B%22geometry%22%3A%7B%22x%22%3A-78.6001371%2C%22y%22%3A35.817210900000006%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D%7D%5D%2C%22sr%22%3A%7B%22wkid%22%3A4326%7D%7D&Distance=1&Rte_Box=R&userName=EDDM
ABelter
Posts: 43
Has thanked: 23 times
Been thanked: 18 times
Andrew aka ABelter
State Manager / North Carolina
Traffic Event Marshal / South Atlantic Region (NC, SC, TN, KY)
andrew@wazenc.us

Post by bart99gt
Any updates on a fix? Still having the same issue...
bart99gt
Posts: 531
Has thanked: 91 times
Been thanked: 239 times
MAR LAM (W DC Suburbs)
MS/AR/Atlanta Metro AM

Post by ABelter
@bart99gt - Version 2019.10.24.001 (published on 2019-10-27) includes a fix identified last week for the USPS Routes issue -- the USPS GIS server where the data was housed had a configuration change related to which domains could connect to it. So far this fix has worked for everyone!
ABelter
Posts: 43
Has thanked: 23 times
Been thanked: 18 times
Andrew aka ABelter
State Manager / North Carolina
Traffic Event Marshal / South Atlantic Region (NC, SC, TN, KY)
andrew@wazenc.us

Post by ABelter
This appears to be a case where the USPS database the script is polling has bad data. The attached screenshot shows the data returned from the routes lookup database, and I've highlighted the fields that the script uses to display city name and zip -- they are separate fields from the facility name, but as you stated are not USPS's recommended city name for that zip code.

In order to return that recommended city name, the script would need to do a second lookup to the "cities by zip code" search from USPS. This was previously discussed on Discord as a possibility, but not a likely one as the author of this script is currently on a break from scripting. Although I do believe this is the first real-life example I've seen where the recommended city was not being returned by the routes lookup -- it was previously theorized it was possible to have such a discrepancy, but all previous examples were ones where the returned city name matched the recommended, but locals used the alt name.

That said, I do have an outstanding pull request for this script that adds the "recommended city name lookup" link to the returned routes at the top left of WME that makes it much easier to confirm the recommended and alt city names. I'll see if I can get someone from WazeDev to review that at some point this week since it would benefit your use case.
chrome_2020-02-10_08-06-26.png
(15.71 KiB) Downloaded 434 times
ABelter
Posts: 43
Has thanked: 23 times
Been thanked: 18 times
Andrew aka ABelter
State Manager / North Carolina
Traffic Event Marshal / South Atlantic Region (NC, SC, TN, KY)
andrew@wazenc.us