[Script] WME Color Speeds v1.2.6

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

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 Color Speeds v1.2.6

Postby seb-d59 » Sat Nov 21, 2015 12:00 am

Hi everybody,

In association with Sebiseba and dummyd2.

- In preview: colorization of the speeds A to B and B to A on two-way segment
- Customizable list of speeds and/or colors for the verified speeds.
- Verified speeds out-of the the list: red dashed.
- Unverified speeds: light red dotted line.

- Compatible Kmh / mph and driving on the left or right.
I explain, on a one-way segment:
* In France colorization will be on the right of the segment.
* in England colorization will be on the left of the segment.
- It can be disabled in the Layers menu.
Layer.jpg
(1.19 KiB) Downloaded 4031 times


Fully compatible with all scripts and WME Colors HighLight.

Heu.... Enjoy :mrgreen: ;)

Available on greasyfork

Update V1.0.0 of 05/05/2016:
  • Added setting offset, opacity and thickness.
  • Possibility custom color throughout the range RGB.
  • For the USA: possibility of having a palette of color by state.

Update V1.1.0 of 19/08/2016
  • Adding road categories: Parking Lot Road and Private Road.
  • Possibility to not displaying Roundabout.
  • WME Beta compatibility.

Update V1.1.1 of 11/09/2016
  • WME Beta compatibility.

Update V1.1.3 of 25/09/2016
  • Possibility to set a palette by country.

Update V1.1.4 of 09/10/2016
  • WME Beta compatibility.

Update V1.1.5 of 10/11/2016
  • WME translation compatibility for other langages than Fr and En.

Screen in France and England for exemple :

KmhInFrance.jpg
(126.95 KiB) Downloaded 4025 times

MphInEngland.jpg
(88.53 KiB) Downloaded 4054 times

Reglages.jpg
Reglages
(18.33 KiB) Downloaded 2105 times

ColorsAdjust.jpg
Colors Adjust
(8.52 KiB) Downloaded 2100 times
Last edited by seb-d59 on Tue Aug 14, 2018 5:49 pm, edited 16 times in total.
seb-d59
Waze Local Champs
Waze Local Champs
 
Posts: 1821
Joined: Fri Jan 03, 2014 8:01 am
Location: Croix (59)
Has thanked: 504 times
Been thanked: 587 times

Re: [Script] WME Color Speeds

Postby vince1612 » Sat Nov 21, 2015 12:15 am

Merci pour le partage, toujours top les scripts made in France ;)
[ img ]
Wiki & Forum: Wiki CH (D) (FR) | Forum CH (D) (FR) (I)
Website: waze-switzerland.ch | Facebook: Waze Switzerland
1+1=3 - The result of bringing talents together goes beyond simply adding them up.
vince1612
Waze Global Champs
Waze Global Champs
 
Posts: 7913
Joined: Sun Mar 17, 2013 2:30 pm
Location: DACH Group (Germany, Austria, Switzerland)
Has thanked: 4616 times
Been thanked: 4877 times

Re: [Script] WME Color Speeds

Postby seb-d59 » Mon Nov 23, 2015 5:51 pm

vince1612 wrote:Merci pour le partage, toujours top les scripts made in France ;)

Merci à toi ;)

For information, I have to rewrite the post for better understanding.
And, I'm sorry for the late publication.
seb-d59
Waze Local Champs
Waze Local Champs
 
Posts: 1821
Joined: Fri Jan 03, 2014 8:01 am
Location: Croix (59)
Has thanked: 504 times
Been thanked: 587 times

Re: [Script] WME Color Speeds

Postby seb-d59 » Sun Nov 29, 2015 7:34 pm

Hi,

A small update that adds a grid for selected the controlled segment type and the max zoom level for this control (adjustable by clicking the pencil).

Reminder: zoom 0 = seen from afar; zoom 10 = close-ups.

Bug fix on deleting speed from the list.

----------------------------------------------------------------------------------------
Salut,

Une petite mise à jour qui ajoute une grille pour sélectionné le type de segment contrôlé et, le niveau de zoom maximum pour ce contrôle (réglable en cliquant sur le crayon).

Rappel: zoom 0 = vu de loin; zoom 10 = gros plans.

Correction d'un bug sur la suppression de la vitesse à partir de la liste.

RoadType.jpg
(9.72 KiB) Downloaded 3986 times
seb-d59
Waze Local Champs
Waze Local Champs
 
Posts: 1821
Joined: Fri Jan 03, 2014 8:01 am
Location: Croix (59)
Has thanked: 504 times
Been thanked: 587 times

Re: [Script] WME Color Speeds

Postby AlanOfTheBerg » Mon Jan 18, 2016 5:01 am

Would be great to get this localized down to the state in the US with specific colors by state to align each with the DOT map colors.
Wiki Resources: Map Editing Manual | alanoftheberg@gmail.com
Oregon-based US Country Manager | iPhone6 - VZ
AlanOfTheBerg
EmeritusChamps
EmeritusChamps
 
Posts: 23621
Joined: Sat Aug 28, 2010 8:48 pm
Location: US Country Manager - Oregon, USA
Has thanked: 1108 times
Been thanked: 4849 times

Re: [Script] WME Color Speeds

Postby AlanOfTheBerg » Tue Jan 19, 2016 4:20 pm

I'd also like to see a a few more color selections (more granular) including black/grays, and the ability to set opacity manually as well.

EDIT: I took out the rgb color selections for the couleurs Array and am playing with two different ones. The first is by color family, the second by groups of websafe colors. Both of these require removing the "rgb" the for loop in the CSpeeds_Mainthml function.

Color Families
Code: Select all
var couleurs=new Array("Pink","LightPink","HotPink","DeepPink","PaleVioletRed","MediumVioletRed","LightSalmon","Salmon","DarkSalmon","LightCoral","IndianRed","Crimson","FireBrick","DarkRed","Red","OrangeRed","Tomato","Coral","DarkOrange","Orange","Yellow","LightYellow","LemonChiffon","LightGoldenrodYellow","PapayaWhip","Moccasin","PeachPuff","PaleGoldenrod","Khaki","DarkKhaki","Gold","Cornsilk","BlanchedAlmond","Bisque","NavajoWhite","Wheat","BurlyWood","Tan","RosyBrown","SandyBrown","Goldenrod","DarkGoldenrod","Peru","Chocolate","SaddleBrown","Sienna","Brown","Maroon","DarkOliveGreen","Olive","OliveDrab","YellowGreen","LimeGreen","Lime","LawnGreen","Chartreuse","GreenYellow","SpringGreen","MediumSpringGreen","LightGreen","PaleGreen","DarkSeaGreen","MediumAquamarine","MediumSeaGreen","SeaGreen","ForestGreen","Green","DarkGreen","Aqua","Cyan","LightCyan","PaleTurquoise","Aquamarine","Turquoise","MediumTurquoise","DarkTurquoise","LightSeaGreen","CadetBlue","DarkCyan","Teal","LightSteelBlue","PowderBlue","LightBlue","SkyBlue","LightSkyBlue","DeepSkyBlue","DodgerBlue","CornflowerBlue","SteelBlue","RoyalBlue","Blue","MediumBlue","DarkBlue","Navy","MidnightBlue","Lavender","Thistle","Plum","Violet","Orchid","Fuchsia","Magenta","MediumOrchid","MediumPurple","BlueViolet","DarkViolet","DarkOrchid","DarkMagenta","Purple","Indigo","DarkSlateBlue","RebeccaPurple","SlateBlue","MediumSlateBlue","White","Snow","Honeydew","MintCream","Azure","AliceBlue","GhostWhite","WhiteSmoke","Seashell","Beige","OldLace","FloralWhite","Ivory","AntiqueWhite","Linen","LavenderBlush","MistyRose","Gainsboro","LightGrey","Silver","DarkGray","Gray","DimGray","LightSlateGray","SlateGray","DarkSlateGray","Black");


Websafe color groups
Code: Select all
var couleurs=new Array("#000","#300","#600","#900","#C00","#F00","#003","#303","#603","#903","#C03","#F03","#006","#306","#606","#906","#C06","#F06","#009","#309","#609","#909","#C09","#F09","#00C","#30C","#60C","#90C","#C0C","#F0C","#00F","#30F","#60F","#90F","#C0F","#F0F","#030","#330","#630","#930","#C30","#F30","#033","#333","#633","#933","#C33","#F33","#036","#336","#636","#936","#C36","#F36","#039","#339","#639","#939","#C39","#F39","#03C","#33C","#63C","#93C","#C3C","#F3C","#03F","#33F","#63F","#93F","#C3F","#F3F","#060","#360","#660","#960","#C60","#F60","#063","#363","#663","#963","#C63","#F63","#066","#366","#666","#966","#C66","#F66","#069","#369","#669","#969","#C69","#F69","#06C","#36C","#66C","#96C","#C6C","#F6C","#06F","#36F","#66F","#96F","#C6F","#F6F","#090","#390","#690","#990","#C90","#F90","#093","#393","#693","#993","#C93","#F93","#096","#396","#696","#996","#C96","#F96","#099","#399","#699","#999","#C99","#F99","#09C","#39C","#69C","#99C","#C9C","#F9C","#09F","#39F","#69F","#99F","#C9F","#F9F","#0C0","#3C0","#6C0","#9C0","#CC0","#FC0","#0C3","#3C3","#6C3","#9C3","#CC3","#FC3","#0C6","#3C6","#6C6","#9C6","#CC6","#FC6","#0C9","#3C9","#6C9","#9C9","#CC9","#FC9","#0CC","#3CC","#6CC","#9CC","#CCC","#FCC","#0CF","#3CF","#6CF","#9CF","#CCF","#FCF","#0F0","#3F0","#6F0","#9F0","#CF0","#FF0","#0F3","#3F3","#6F3","#9F3","#CF3","#FF3","#0F6","#3F6","#6F6","#9F6","#CF6","#FF6","#0F9","#3F9","#6F9","#9F9","#CF9","#FF9","#0FC","#3FC","#6FC","#9FC","#CFC","#FFC","#0FF","#3FF","#6FF","#9FF","#CFF","#FFF");
Wiki Resources: Map Editing Manual | alanoftheberg@gmail.com
Oregon-based US Country Manager | iPhone6 - VZ
AlanOfTheBerg
EmeritusChamps
EmeritusChamps
 
Posts: 23621
Joined: Sat Aug 28, 2010 8:48 pm
Location: US Country Manager - Oregon, USA
Has thanked: 1108 times
Been thanked: 4849 times

Re: [Script] WME Color Speeds

Postby AlanOfTheBerg » Tue Jan 19, 2016 11:23 pm

55mph is stored at 89kph in the Waze data. The math done by the script ends up rounding to 56 instead of 55. The following code change works better I think:

fwdspeed = (fwdspeed!=null) ? (Math.trunc(fwdspeed*0.625)) : null;
revspeed = (revspeed!=null) ? (Math.trunc(revspeed*0.625)) : null;

RANT: not sure why Waze uses .625 is, as the conversion when .621 is closer. And 0.6213711922374 is significantly closer to the actual value.
Wiki Resources: Map Editing Manual | alanoftheberg@gmail.com
Oregon-based US Country Manager | iPhone6 - VZ
AlanOfTheBerg
EmeritusChamps
EmeritusChamps
 
Posts: 23621
Joined: Sat Aug 28, 2010 8:48 pm
Location: US Country Manager - Oregon, USA
Has thanked: 1108 times
Been thanked: 4849 times

Re: [Script] WME Color Speeds

Postby AlanOfTheBerg » Sat Jan 23, 2016 5:10 pm

I have verified that this Script on Mac Chrome, while it works for the display on segments, the select menu with the colors does not show the colors. Chrome is unable to override the background color used for the select options, so the entire menu is white. Selecting an option does work, but you don't have any idea what color you have selected.

Using "-webkit-appearance: none" does not help in this situation. The only possibility I can see which may help is to use jQuery to create "custom" select menus, such as the one which lets you add images and change text styles to each menu option item.
Wiki Resources: Map Editing Manual | alanoftheberg@gmail.com
Oregon-based US Country Manager | iPhone6 - VZ
AlanOfTheBerg
EmeritusChamps
EmeritusChamps
 
Posts: 23621
Joined: Sat Aug 28, 2010 8:48 pm
Location: US Country Manager - Oregon, USA
Has thanked: 1108 times
Been thanked: 4849 times

Re: [Script] WME Color Speeds

Postby seb-d59 » Sun Jan 24, 2016 9:42 am

AlanOfTheBerg wrote:55mph is stored at 89kph in the Waze data. The math done by the script ends up rounding to 56 instead of 55. The following code change works better I think:

fwdspeed = (fwdspeed!=null) ? (Math.trunc(fwdspeed*0.625)) : null;
revspeed = (revspeed!=null) ? (Math.trunc(revspeed*0.625)) : null;

RANT: not sure why Waze uses .625 is, as the conversion when .621 is closer. And 0.6213711922374 is significantly closer to the actual value.


For the conversion, Waze has changed it, because it was functional at the beginning, as we can see from the screenshot in the first post.
Thank for the tip "Math.trunc". I'll add it.

AlanOfTheBerg wrote:Would be great to get this localized down to the state in the US with specific colors by state to align each with the DOT map colors.

For that, I do not understand, you want a different color by state for the same speed?
For me 50 Mp/h is 50 Mp/h or 90km/h is 90Km/h regardless of the state or country ...

But a filter by city / state / country, why not....

For the color choice, i look what i can do, and how do that.
seb-d59
Waze Local Champs
Waze Local Champs
 
Posts: 1821
Joined: Fri Jan 03, 2014 8:01 am
Location: Croix (59)
Has thanked: 504 times
Been thanked: 587 times

Re: [Script] WME Color Speeds

Postby AlanOfTheBerg » Sun Jan 24, 2016 4:43 pm

seb-d59 wrote:
AlanOfTheBerg wrote:Would be great to get this localized down to the state in the US with specific colors by state to align each with the DOT map colors.

For that, I do not understand, you want a different color by state for the same speed?
For me 50 Mp/h is 50 Mp/h or 90km/h is 90Km/h regardless of the state or country ...

But a filter by city / state / country, why not....

Many states in the US have maps which show speed limits with specific color highlights on their maps. each state is different. Many editors can edit in multiple states to add speed limits. For me, personally, I find it much easier to compare the Waze map to the state speed limit map if the highlight colors are the same. For that to work efficiently. I would like to be able to quickly switch ALL the color highlights in WME Color Speeds from one state color palette to another by selecting the state or color scheme from a menu. That would change all the WME Color Speed colors with a single selection. The key here is making the WME Color Speeds colors match the state speed limit map colors and be able to switch the WME Color Speeds with a single selection.

Does that make more sense?
Wiki Resources: Map Editing Manual | alanoftheberg@gmail.com
Oregon-based US Country Manager | iPhone6 - VZ
AlanOfTheBerg
EmeritusChamps
EmeritusChamps
 
Posts: 23621
Joined: Sat Aug 28, 2010 8:48 pm
Location: US Country Manager - Oregon, USA
Has thanked: 1108 times
Been thanked: 4849 times

Next

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: Alpha_VA, MapOMatic, ottonomy, ramblinwreck_81