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:Timbones wrote: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.
Code: Select all
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>')); }
}
Code: Select all
{ $speedLimits.append($('<span style="color:hsl('+getColorSpeed((k*10)*1.609344)+',100%,50%)">'+(k*10)+' </span>')); }
Re: [Script][Beta] Street Vector Layer