V. 2.0 -> Coming Soon!
Many complained about labels placement. Have a look at the screenshot!

What a big tease, bedo!!
![]()
Is this âWaze soonâ or soon soon??
Thanks so much for figuring out how to fix the labels!
Version 2.0 is out! :mrgreen:
- More arrows on one way streets with few geometry nodes
- Names follow the direction of the street (heads will turn
).
Let me know if something doesnât work as youâd expect.
Enjoy!
Awesome !!!
Thank you for this update. ![]()
In town the speed display can be hidden by the name of the next segment.
- Is it possible to display the speed above the segment ?
- And expand the numbers a bit of speed ?
Small update, 2.1
As the street name on short street might cover them completely, the street name on one-way streets contains now two arrows too. In this way itâs also possible to see the direction of important streets when the zoom is not close enough to draw the arrows.
Can i ask for a way to increase the font of a segment name? Just a wish, not a demand.
Hi,
can you remove this please:
console.debug = function(){}; //Comment it out for production mode
It breaks this useful function for other scripts :mrgreen:
thx!
d2
And at the same time it would probably be best to wrap the whole script inside a function to prevent a collision of function names or variables with other scripts (which seems very likely due to the very generic function names). Itâs not that hard to do as it wonât impact your script:
(function() {
// All function and variable declarations go in here as they are now
})();
For the console issue, I personally use a different function for that:
function log(obj) {
if (localStorage.svlDebug) { // just a suggestion, feel free to do something else
console.log(obj);
}
}
Also, there is a global variable svlAttempts that could be put as a var at the top of the script as it is not useful anywhere else (inside the function declaration I showed in this post). The risk of a collision with other scripts is very minimal though.
Just trying to make your script even better ![]()
This is one of those times I wish there was an option to favorite a post so I can come back to it later when I need it.
I suppose a bookmark should suffice.
Exactly, I have several bookmarks to validator posts as well for things like the complete list of checks, and typeRank lists
Sent from Android using Tapatalk
Version 2.3 is out.
- Non validated speed limits are shown with a question mark after their street name.
- Variable/methods names should not collide with other scripts anymore (thanks Glodenox)
If you want to show unverified speed limits with a dashed style, you can manually change line 941
from:
strokeDashstyle: "solid",//(attributes.fwdMaxSpeedUnverified|attributes.revMaxSpeedUnverified ? "dash":"solid"),
to:
strokeDashstyle: (attributes.fwdMaxSpeedUnverified|attributes.revMaxSpeedUnverified ? "dash":"solid"),
bedo2991, thank you so much, Vector is awesome!
I have two bugfixes, and I also made some customizations that USA editors may like, as it is geared towards common USA speeds, and also tweaks the label visibility a bit.
Line 254, I replace the getColorSpeed() function with one that uses a tweaked color scale so roads that speed up / slow down only 10 mph have more visual distinction between the colors used:
function getColorSpeed(speed)
{
if(W.prefs.attributes.isImperial) // adjust scale for Imperial
{
// speeds 15 to 75 mph (7 increments) are tuned to HSL 95 to 395 (35) for easy visual speed differentiation at common speeds
return ((speed / 1.609344 * 5) + 20) %360
}
else
{
return (speed * 3) %360; // :150 * 450
}
}
Lines 377-379 (now lines 385-387 if you replaced the above function; I will put future line # changes in () as well, for those adopting all changes), thereâs a typo in âisImperialâ. The calls to getColorSpeed() for mph also wonât have the right colors returned (in both the original and updated function), as it expects to be passed kph. Replace lines 377-379 (385-387) with these 5 to pass kph values in all cases, and to adjust the scale when using mph:
for(var k=W.prefs.attributes.isImperial?9:15; k>1; k--){
if (W.prefs.attributes.isImperial)
{ $speedLimits.append($('<span style="color:hsl('+getColorSpeed((k*10-5)*1.609344)+',100%,50%)">'+(k*10-5)+' </span>')); }
else { $speedLimits.append($('<span style="color:hsl('+getColorSpeed(k*10)+',100%,50%)">'+k*10+' </span>')); }
}
Line 666 (676): I make the fonts bigger for my old man eyes ![]()
labelFontSize = farZoom?"14px":"16px";
Line 1232 (1242): Insert a new line after âif(speed)â to add in a visual separator between the street name and the speed limits (as youâll see with the remaining changes, I make the speed limits larger in size)
speedPart += ": ";
Lines 1234, 1239, and 1247 (now 1245, 1250, and 1258):
Change all â=â to be â+=â
Starting at Line 1308 (1319).
Comment out all ânumber.replaceâ lines by placing // at the front of each line. Be sure to leave the ânumber.toStringâ line alone
Results showing 25 through 65mph colors:

I have two bugfixes, and I also made some customizations that USA editors may like, as it is geared towards common USA speeds, and also tweaks the label visibility a bit.
Will this work for us in the UK as well?
We use imperial units too, and would benefit from a larger separation of colours for limits that are only 10 mph different. However, common speed limits here are all multiples of 10, i.e. 20, 30, 40, 50, etc.
Will this work for us in the UK as well?
We use imperial units too, and would benefit from a larger separation of colours for limits that are only 10 mph different. However, common speed limits here are all multiples of 10, i.e. 20, 30, 40, 50, etc.
Yes, my modifications should work without any further changes. If youâd like to adjust the reference scale to be on the â10sâ instead of the â5sâ, in this section:
for(var k=W.prefs.attributes.isImperial?9:15; k>1; k--){
if (W.prefs.attributes.isImperial)
{ $speedLimits.append($('<span style="color:hsl('+getColorSpeed((k*10-5)*1.609344)+',100%,50%)">'+(k*10-5)+' </span>')); }
else { $speedLimits.append($('<span style="color:hsl('+getColorSpeed(k*10)+',100%,50%)">'+k*10+' </span>')); }
}
change the longest line to be instead the following (drop both âminus 5â bits):
{ $speedLimits.append($('<span style="color:hsl('+getColorSpeed((k*10)*1.609344)+',100%,50%)">'+(k*10)+' </span>')); }
Later today Iâll create a github project, then everybody can collaborare and I donât have to merge changes manually :).
Inviato dal mio PLK-L01 utilizzando Tapatalk
Quickly created one here: https://github.com/bedo2991/svl
Here is a list of issues: https://github.com/bedo2991/svl/issues (you need a Github account to create new ones).
Here is how to fork a repository: https://help.github.com/articles/fork-a-repo/
can you remove this please:
console.debug = function(){}; //Comment it out for production modeIt breaks this useful function for other scripts :mrgreen:
Now fixed in version 2.4
Quickly created one here: https://github.com/bedo2991/svl
Awesome! Iâve merged in my color changes for imperial units since thatâs just a universal fix. Iâll see about re-implementing some of the other changes I proposed as user options, since theyâre a significant deviation from your existing representation of speed limit text (unless youâd rather they be the new default formatâŚ)
Imperial fix uploaded to production -> V. 2.5 is out.
As of Firefox version 44 (currently in beta) it is not allowed to assign a value to unsafeWindow (as it is an undefined constant for some reason). Iâm currently checking some of the scripts in the forum to make sure they wonât break once Firefox 44 goes live (January 26). Iâve checked your userscript and it uses unsafeWindow a bit, so you may run into problems. Either way, the code below wonât do anything useful any more as this way of retrieving the unsafeWindow has been removed. Iâve seen other scripts just using unsafeWindow without that check and they seem to run fine.
[code] var bGreasemonkeyServiceDefined = false;
try {
bGreasemonkeyServiceDefined = (typeof Components.interfaces.gmIGreasemonkeyService === "object");
} catch (err) { /* Ignore */ }
if (typeof unsafeWindow === "undefined" || !bGreasemonkeyServiceDefined) {
unsafeWindow = (function() {
var dummyElem = document.createElement('p');
dummyElem.setAttribute('onclick', 'return window;');
return dummyElem.onclick();
})();
}[/code]