[Script] WME Toolbox (1.8.22)

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, Glodenox, JustinS83

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.

Re: [Script] WME Toolbox (1.6.1)

Postby GiorgioLontano » Fri Jun 12, 2015 12:14 am

BellHouse wrote:OK, I now need to leave further investigations for tomorrow. Sorry for any inconvenience, but I'm sure we'll find a solution. Soon! :)

I don't know if it helps your investigations, but I have found that I can force Toolbox to reappear by navigating away from WME and then hitting the back and forward buttons on the browser a couple of times. I'm using Chrome.
[ img ] [ img ] [ img ] [ img ]
Navigation and Localization Expert
GiorgioLontano
Experts
Experts
 
Posts: 120
Joined: Sun Apr 29, 2012 6:02 pm
Location: Guatemala
Has thanked: 33 times
Been thanked: 48 times

Re: [Script] WME Toolbox (1.6.11)

Postby Glodenox » Wed Jan 27, 2016 9:33 am

Hey, I maintain a script that adds other background maps (such as cadastral maps) as a new layer to the map. (no, I'm not yet ready to go public with it yet) The script puts this layer on the second spot (just above the default Google satellite imagery) and lets OpenLayers generate the necessary z-index values. The speeds added by WME Toolbox however are at a z-index that is too low for this to work.

Current situation:
z-index 100: Google satellite imagery
z-index 101: WME Toolbox-provided polylines to show the speed of a street segment
z-index 330: a custom layer with cadastral data by my script
z-index 335: the layer containing all cities
z-index 340: the layer containing all roads
Note that z-indexes for cities and roads are usually 330 and 335. But this is managed by OpenLayers.

Currently, the code simply sets this z-index as 101:
Code: Select all
this.LineLayer.setZIndex(101);

It would however be better if you use the setLayerIndex() function of OpenLayers to put the layer at the location of the roads layer to push it up. That way the z-index will always be generated correctly.
This can be achieved like this:
Code: Select all
Waze.map.setLayerIndex(this.LineLayer, Waze.map.getLayerIndex(Waze.map.getLayersBy('uniqueName', 'roads')[0]))

If you really want to continue setting the z-index of the road layer instead of letting OpenLayers manage the z-index, I propose this sort of adjustment:
Code: Select all
this.LineLayer.setZIndex(Waze.map.getLayersBy('uniqueName', 'roads')[0].getZIndex()-1);

I haven't tested this myself though. A check on whether the result is actually higher than 0 and better protection against the case where this layer does not exist (name change in WME or so) would be adviced.

Slightly related: it would also make sense to me that when the roads layer is hidden, those lines are hidden as well. Those speed limits are closely connected to the roads, I'd say.
Last edited by Glodenox on Fri Mar 18, 2016 3:15 pm, edited 1 time in total.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1172
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 641 times
Been thanked: 1324 times

Re: [Script] WME Toolbox (1.6.11)

Postby Glodenox » Wed Jan 27, 2016 2:14 pm

BellHouse wrote:Before we discuss any further on the details: are you 100% sure that you are creating overlays only of maps where it's explicitly allowed to freely copy content to commercial maps (as the Waze map)? If not, then this would be a no-go.

Yes. The currently supported maps in that script are all explicitly stated to be open data, free to be used for commercial purposes as well. There's no need to worry about that.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1172
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 641 times
Been thanked: 1324 times

Re: [Script] WME Toolbox (1.6.14)

Postby Glodenox » Sun Mar 06, 2016 10:34 pm

About the people still discussing about the maps in the script I'm working on:
- I'm a professional computer scientist and part of my education was copyright laws, I know what I can and can't do ;)
- I'm already familiar with how to get approval for maps.
- this isn't the right place for that

So let's stick to WME Toolbox-related things in here :)
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1172
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 641 times
Been thanked: 1324 times

Re: [Script] WME Toolbox (1.6.14)

Postby Glodenox » Fri Mar 18, 2016 3:30 pm

Fredo-p wrote:Page 55. This is page 62/63. You mean to tell me that in order to reply to a thread, one must have read every single page and know what was said?

Actually, you'll find that the second post on page 62 has me saying that there's no need to worry about it, that I know what I'm doing and that this isn't the right topic to discuss such things (the script isn't even really published yet). (note: I'm aware it started on page 55, but the discussion died down only recently)

taco909 wrote:Not going to happen and please do not do this.
Due to copyright issues, we are expressly prohibited from using 3rd party maps and data sources other than those provided within WME.

The entire country of Chile was reverted back to basemap because it was discovered that SOME data from OpenStreets had been copied into the Waze map.

That is not up to you to decide and I'm afraid you're wrong about your statement as the official statement adds that approved external sources are possible if the terms and conditions allow it.
I wasn't even aware of the situation in Chile, but I already decided months ago that OpenStreetMap is never going to be in that userscript due to their terms and conditions. Please don't presume I'm unable to read terms and conditions and know which restrictions apply to Waze (as that is literally the message you're sending me now with your strong wording, which hurts).

TKinneys wrote:Glodenox, I've been looking for something like this. I have a layer using REST API that I'd like to add to WME. The data is from a public government source. FC, urban FC, speed limits, are the types of data available for a specific area of 82,000 square miles. Please PM if there is interest.

That would be possible, but don't expect that in the coming months. I'm currently limiting myself to sources that use the WMS protocol. The roadmap I have in mind for that userscript contains adding support for WMTS afterwards and custom maps later on.


Now, with all that said: can we return to the subject at hand please? WME Toolbox.
On page 55 I asked to make the Z-index of the layer with road speeds dynamic instead of just setting it to 101. I've now looked back at the code I provided there and found some issues, which I've fixed now.

I also proposed to hide this layer whenever the roads layer is hidden (as these speed indications have no use without the roads layer visible). Here's how that can be done, though I suspect that the developers behind the toolbox are already experienced enough to do this themselves:
Code: Select all
var roadsLayer = Waze.map.getLayersBy('uniqueName', 'roads')[0];
var lineLayer = this.LineLayer; // necessary as 'this' will be different inside the function
roadsLayer.events.register('visibilitychanged', null, function() {
lineLayer.setVisibility(roadsLayer.getVisibility());
}
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1172
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 641 times
Been thanked: 1324 times

Re: [Script] WME Toolbox (1.7.12)

Postby Glodenox » Thu Sep 14, 2017 9:40 am

Indeed, it seems rather easy to port the Chrome extension to Firefox as they both support the WebExtension API. I doubt you haven't seen this by now, but this page explains the steps to take to do so.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1172
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 641 times
Been thanked: 1324 times

Re: [Script] WME Toolbox (1.8.4)

Postby Glodenox » Tue Apr 03, 2018 1:04 pm

At the moment WME Toolbox adds 20 map layers to the WME. Most of these are the separate highlight layers. Considering that there is a hard limit of about 70 or so layers and the WME by default already creates around 30 layers, would it be possible to tone down the amount of layers by combining them? Some people are hitting the hard limit now and WME Toolbox consumes the most. Any changes to this will most likely make showing or hiding those layers a bit slower though. I'm not convinced it'll always be noticeable though.

I see the option of using a Vector.RootContainer to store the highlight layers in, or otherwise it is also possible to adjust the style of the added vectors (display: none), but then you'd need to store all the groups of features in a separate list. Alternatively you can also just add and remove those features depending on which layers are enabled.

I'm just not sure why this issue didn't pop up any sooner. I remember the bug with the Search field that used to spawn additional layers, but I don't remember that Toolbox had such a big effect on that as it would do now.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1172
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 641 times
Been thanked: 1324 times

Re: [Script] WME Toolbox (1.8.14) Feature Request

Postby goldenvocals » Mon Apr 15, 2019 3:53 pm

Would it be possible to make a feature for toolbox that allows editors to request unlocks on their respective discord servers? I think it would be a great tool to have. In SER you have to follow this format: L#->L#,City,State,Purpose,<PL>. it would be great to have a menu box pop up and allow you to choose your region, and it remembers your default region for next time. Then to choose whether you are requesting a lock or an unlock via a radio button then the script will fill in the lock level of the segment, venue, etc and the editors level. if it's a lock up the editors level should be first and the thing they are locking second. if it's an unlock then the thing they are trying to unlock should be first and the editors level second. City and state could be populated from the City and state field of the segment venue etc. for the purpose field you could have a list of common purposes in a drop down and have an other option to fill in your own. at the bottom of the menu is a OK and a cancel button. Clicking OK copies the text to the clip board and then the editor posts it where they need it. clicking cancel ends the script without changing anything.
or you could make it so that the script looks at the lat and long to auto detect which region it's in, confirms that with the user and then give them the option to automatically (auto-magically) post to their discord server's unlock channel under the editors username. Is any of this possible? This feature would make editing so much easier, faster, and more efficient! Thanks for your time.
Goldenvocals
goldenvocals
 
Posts: 3
Joined: Sun Sep 28, 2014 4:05 am
Has thanked: 0 time
Been thanked: 1 time

Re: [Script] WME Toolbox (1.8.10)

Postby gOyDp » Fri Jan 25, 2019 8:43 pm

Hi! I was checking the console for other issues and I've noticed this GET request over and over and over again. It appears ToolBox is trying to download a csv file for something that's not even related to my country or region. Here are the files I can see it trying to get.

"ToolBox fancy permalinks - per country settings - 81 Germany.csv"
"ToolBox fancy permalinks - per country settings - 184 Reunion.csv"
"ToolBox fancy permalinks - per country settings - 185 Romania.csv"
"ToolBox fancy permalinks - per country settings - 216 Switzerland.csv"
"ToolBox fancy permalinks - per country settings - 239 Venezuela.csv"

This seems like it shouldn't be happening. Can anyone help me understand why this would be happening?
--
Thanks,

Randy "gOyDp"
FL, Area Manager, Mentor
SER Reference
SER Discord Server
Waze Mentor
gOyDp
Waze Mentor
Waze Mentor
 
Posts: 108
Joined: Wed Feb 15, 2017 2:42 pm
Has thanked: 14 times
Been thanked: 28 times

Re: [Script] WME Toolbox (1.8.14)

Postby gOyDp » Wed Apr 10, 2019 4:49 pm

I was recently promoted to 5 and can now see RevCons. Of course, that means I can now see them everywhere for some editors. The Autofix button on Toolbox doesn't seem to be working for me. In the console I see an error. Is this something that can be fixed or do I need to rely on manually fixing them?

[url]https://prnt.sc/na5ycw/[url]

Code: Select all
chrome-extension://ihebciailciabdiknfomleeccodkdejn/scripts/WME_Toolbox.prod.min.js:1016 Uncaught ReferenceError: WME_JNF_FixNode is not defined
    at Object.WME_JNF_FixNode (chrome-extension://ihebciailciabdiknfomleeccodkdejn/scripts/WME_Toolbox.prod.min.js:1016)
    at e.sec.WMETB_magicFixOthers (eval at <anonymous> (chrome-extension://ihebciailciabdiknfomleeccodkdejn/scripts/WME_Toolbox.prod.min.js:1016), <anonymous>:21:214)
    at initialize.triggerEvent (vendor-36593c9a162d903328cd.js:1)
    at e.value (app-3246c5f46d54e7b9976b.js:1)
--
Thanks,

Randy "gOyDp"
FL, Area Manager, Mentor
SER Reference
SER Discord Server
Waze Mentor
gOyDp
Waze Mentor
Waze Mentor
 
Posts: 108
Joined: Wed Feb 15, 2017 2:42 pm
Has thanked: 14 times
Been thanked: 28 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: age4670, Google [Bot], Mapman44, ojlaw, steveinark