[Script] WME PlaceNames

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.

Moderators: Unholy, bextein

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 PlaceNames

Postby ragacs » Tue Nov 11, 2014 8:05 pm

This little script will display names of the places (area and point) on a separate layer. Use the Layer selector pane or the hotkey (Shift+N) to turn it on or off.
Alternatively you can try GitHub link if GreasyFork is down

PlaceNames_shot2.png
(207.56 KiB) Downloaded 3535 times

It could color Area places by type (code is the same as WMECH, but using separate flag to remain compatible at least partially).
Also you could highlight Public Places without name or Private Places without house number. House numbers will be displayed for Point places without a name (with italic font).
You could define filters with and without utilizing regular expressions, for example "school" will match only exact string "school" but "/scho+l/i" will match regardless of casing and the number of "o" characters (e.g.: sChoool).
There is an option to show place lock levels and limit the displaying of place names to conserve resources. Filtering works on lock levels too just enter L3 to show only places with Lock 3.
You'll find these options on a separate tab on the side panel called PlaceNames.
Works in both beta and production WME, tested on Chrome with Tampermonkey.

Known bugs:
- script doesn't automatically load after you log in, but it will after you refresh the page
- Place Names layer appears behind the Places layer, so the markers will obstruct reading a little
- Place Names layer toggle hotkey sometimes changes to Ctrl+C

Planned features:
- Highlight Places by missing city/street field
- Highlight Private places with hidden name/category/telephone or other info
- Color Places by lock level

I am a beginner in JavaScript, HTML and OpenLayers so anyone could help get rid of the bugs please send me a PM.

Suggestions, feature requests are also welcome.

Release notes:
  • v0.3 is released on 11/12/2014: Shift+N hotkey for layer toggle, Link to forum topic (this one), option to display only point place names - please select one option on the side panel after updated
  • v0.4 is released on 11/16/2014: Removed NaN names, Moved names of Point places below the point, Highlighting Point places, Showing house numbers of nameless point places, Highlighting Parking lots too
  • v0.5 is released on 11/29/2014: New master 'Enable' switch, Storing on/off state of layer, Highlighting private places without house number, Name filtering option, Handling non-breaking spaces, Placement of names corrected for area places, Refactored internals to be less resource hungry and more compatible
  • v0.51 is released on 01/18/2015: House numbers for residential point places will be displayed even if there is a hidden name. Missing hotkey translation text added.
  • v0.6 is released on 11/03/2015: New options added for showing lock level and stop drawing names over a specified limit. There is also a new statistics line to see the script working.
  • v0.7 is released on 01/11/2016: Internationalization added. Please help me correctly translate strings to your favorite language. Check this post for the details. Thanks!
  • v0.71 is released on 01/14/2016: CS, NL translations added, provided a "translate me!" link
  • v0.72 is released on 03/18/2016: FR, PL translations added
  • v0.73 is released on 08/06/2016: IW translation added, beta WME fix
  • v0.74 is released on 09/15/2016: ES translation added
  • v0.76 is released on 11/09/2016: pt-BR translation added, Fixed script starting issues with the new WME (due to missing English strings)
  • v0.80 is released on 03/31/2017: Adapted to the new Layer selector pane
Acknowledgements:
  • Watt - requested POI name display
  • Szata76 - suggested the hotkey code for the layer
  • napauy - requested the name search and shifting of the names for POI places
  • AlanOfTheBerg - spotted NaN and area name placement problem, requested remembering of the layer state, highlighting of the POIs without HN
  • Griev0us - spotted the nbsp problem
  • ommrianxo - suggested techniques and tips to reduce footprint and resource usage
  • Twister-UK - suggested code to calculate area geometry
  • Olestas - requested the house numbers for suspicious residential places
  • glomp - spotted a missing translation problem on the keyboard shortcuts screen
  • Fredo-p - requested the lock level displaying and the limiting of the displayed place names
  • Glodenox - suggested Firefox 44 compatibility and other small tricks with I18n, provided NL translation
  • bures - provided CS translation
  • TCholewa - provided PL translation
  • no1ne - provided FR translation
  • okrauss - provided IW (Hebrew) translation
  • ancho85 - provided ES translation
  • GabiruDriverX - provided pt-BR translation
Thanks for all your invaluable feedback!
Last edited by ragacs on Fri Mar 31, 2017 8:56 pm, edited 15 times in total.
ragacs
Area Manager
Area Manager
 
Posts: 388
Joined: Thu Apr 25, 2013 8:15 am
Location: Hungary
Has thanked: 525 times
Been thanked: 280 times

Re: [Script] WME PlaceNames

Postby napauy » Tue Nov 11, 2014 8:26 pm

Good job. I'll try. Keep going !!
napauy
Master Raider
Master Raider
 
Posts: 522
Joined: Wed Nov 06, 2013 4:01 am
Location: URUGUAY
Has thanked: 203 times
Been thanked: 172 times

Re: [Script] WME PlaceNames

Postby ragacs » Wed Nov 12, 2014 8:56 pm

Script updated to v0.3. See release notes in the opening post.
ragacs
Area Manager
Area Manager
 
Posts: 388
Joined: Thu Apr 25, 2013 8:15 am
Location: Hungary
Has thanked: 525 times
Been thanked: 280 times

Re: [Script] WME PlaceNames

Postby napauy » Thu Nov 13, 2014 1:18 am

Hi ragacs:
I wanted to know, if possible, place the text below or above the point. (in the case of place's point type), to improve visualization.
It is possible to generate some kind of search?
For example put the word School and is highlighted with a special color the places that meet this requirement?
These are just suggestions and ideas you already, we'll say that they seem !!

Greetings !!
napauy
Master Raider
Master Raider
 
Posts: 522
Joined: Wed Nov 06, 2013 4:01 am
Location: URUGUAY
Has thanked: 203 times
Been thanked: 172 times

Re: [Script] WME PlaceNames

Postby ragacs » Thu Nov 13, 2014 8:07 am

napauy wrote:place the text below or above the point. (in the case of place's point type), to improve visualization.

I tried it when implemented the point place names, but currently I am able to shift only by original coordinates (meters/feets) so it will be zoom-dependent. Bigger zoom places the label further away. That's why they are left on the points.

Highlight options will be extended, I can add some filtering by name as well.
Thanks for the suggestions! :)
ragacs
Area Manager
Area Manager
 
Posts: 388
Joined: Thu Apr 25, 2013 8:15 am
Location: Hungary
Has thanked: 525 times
Been thanked: 280 times

Re: [Script] WME PlaceNames

Postby AlanOfTheBerg » Thu Nov 13, 2014 10:04 pm

Suggest either a different word, or no name at all, for Places which do not have a name. Script currently displays, "NaN" which is technically kind of correct.
AlanOfTheBerg
Waze Global Champs
Waze Global Champs
 
Posts: 23614
Joined: Sat Aug 28, 2010 8:48 pm
Location: US Country Manager - Oregon, USA
Has thanked: 1128 times
Been thanked: 4823 times

Re: [Script] WME PlaceNames

Postby ragacs » Thu Nov 13, 2014 11:04 pm

AlanOfTheBerg wrote:Suggest either a different word, or no name at all, for Places which do not have a name. Script currently displays, "NaN" which is technically kind of correct.

Welcome, Alan :)
I didn't meet with NaN string yet, so it might be a browser incompatibility. It should display simply nothing for places without a name. What is your configuration?
(Browser type and version, Tampermonkey/Greasemonkey used or not, maybe the OS version.)
ragacs
Area Manager
Area Manager
 
Posts: 388
Joined: Thu Apr 25, 2013 8:15 am
Location: Hungary
Has thanked: 525 times
Been thanked: 280 times

Re: [Script] WME PlaceNames

Postby AlanOfTheBerg » Fri Nov 14, 2014 4:30 pm

ragacs wrote:I didn't meet with NaN string yet, so it might be a browser incompatibility. It should display simply nothing for places without a name. What is your configuration?
(Browser type and version, Tampermonkey/Greasemonkey used or not, maybe the OS version.)

Win7, Chrome 38.0.2125.104, Tampermonkey 3.9.

Example: https://www.waze.com/editor/?env=usa&lo ... 217.177569

It looks like there is a single space (or other whitespace character) in the Name field.
Attachments
noname_cemetery_NaN.png
(348.63 KiB) Downloaded 5576 times
AlanOfTheBerg
Waze Global Champs
Waze Global Champs
 
Posts: 23614
Joined: Sat Aug 28, 2010 8:48 pm
Location: US Country Manager - Oregon, USA
Has thanked: 1128 times
Been thanked: 4823 times

Re: [Script] WME PlaceNames

Postby ragacs » Sun Nov 16, 2014 10:51 pm

napauy wrote:I wanted to know, if possible, place the text below or above the point. (in the case of place's point type), to improve visualization.

AlanOfTheBerg wrote:Suggest either a different word, or no name at all, for Places which do not have a name. Script currently displays, "NaN" which is technically kind of correct.

These are fixed in v0.4. Please update and try it!
Thanks for all your suggestions and support.
ragacs
Area Manager
Area Manager
 
Posts: 388
Joined: Thu Apr 25, 2013 8:15 am
Location: Hungary
Has thanked: 525 times
Been thanked: 280 times

Re: [Script] WME PlaceNames

Postby AlanOfTheBerg » Tue Nov 18, 2014 9:50 pm

ragacs wrote:These are fixed in v0.4. Please update and try it!
Thanks for all your suggestions and support.

Looks good.

Next request: remember the state of the layer on/off between page loads. If I turn Place Names layer off, then reload the browser window, they turn back on. It should load in the same state I left it.
AlanOfTheBerg
Waze Global Champs
Waze Global Champs
 
Posts: 23614
Joined: Sat Aug 28, 2010 8:48 pm
Location: US Country Manager - Oregon, USA
Has thanked: 1128 times
Been thanked: 4823 times

Next

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: abc1357, fjsawicki