[Script] WME Speedhelper

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 Speedhelper

Postby Glodenox » Mon Jul 09, 2018 9:20 am

FYI: these country codes are based on the FIPS 10-4 country code list, which was one of several country code lists used by the US government. In 2008 the US government decided to standardize on the much more commonly used ISO 3166 country code list, but Waze never made the switch. (credit to matsalka for having pointed to FIPS 10-4 in the beta suggestions forum)
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1189
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 667 times
Been thanked: 1335 times

Re: [Script] WME Speedhelper

Postby Glodenox » Tue Mar 19, 2019 6:31 pm

This is the line that will need to be added for Pakistan. This would indeed be very useful for the MapRaid that is taking place there.
Code: Select all
   PK:         {'sgn': BGa, 'ann':'kph', 'spd':[ 40, 50, 60, 80, 100, 120 ]}, //-------------------------------------------- 107. Pakistan
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1189
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 667 times
Been thanked: 1335 times

Re: [Script] WME Speedhelper

Postby Glodenox » Tue Apr 30, 2019 1:43 pm

I'm assuming there are certain moments in which W.model.countries.top is null for a short while.
A quick check at the start of the makeSigns function like in the code below could prevent this error from showing.
Code: Select all
if (W.model.countries.top == null) {
    return;
}
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1189
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 667 times
Been thanked: 1335 times

Re: [Script] WME Speedhelper

Postby glomp » Sat Jun 23, 2018 3:16 pm

Could you please update Australia and add 10 km/h, thanks.
glomp
Country Manager
Country Manager
 
Posts: 2008
Joined: Thu Aug 16, 2012 3:49 pm
Location: Western Australia
Has thanked: 479 times
Been thanked: 1026 times

Re: [Script] WME Speedhelper

Postby Guardian-SG » Sat Apr 09, 2016 3:33 pm

@gertbroos Appreciate if you can add Singapore to the list.

country name & Waze abbreviation : Singapore & SN
The list of possible speeds as displayed on the roadsigns: 40, 50, 60, 70, 80, 90
Kph or mph?: KPH

Thanks!
Waze Singapore Country Coordinator | Waze Philippines Country Manager | Team Asia Pacific
Join us in the Waze Singapore Facebook Group | Like the Waze Singapore Facebook Page
Join is in the Waze Philippines Facebook Group
Guardian-SG
Waze Global Champs
Waze Global Champs
 
Posts: 57
Joined: Sat Jul 21, 2012 11:16 am
Location: Singapore
Has thanked: 56 times
Been thanked: 36 times

Re: [Script] WME Speedhelper

Postby Horizon911 » Sun Mar 17, 2019 12:30 am

Please add Pakistan:
120, 100, 80, 60, 50, 40 (kph)
Thanks.
Horizon911
 
Posts: 440
Joined: Mon Jun 12, 2017 7:04 pm
Has thanked: 230 times
Been thanked: 19 times

Re: [Script] WME Speedhelper

Postby iainhouse » Sat Nov 21, 2015 1:05 pm

I've got an alternative suggestion for those wanting to set speed in one direction only. Whether this is possible or not, I don't know - just something to think about. ;)

How about detecting a "drag" event on the sign, as opposed to a click? If you can detect a drag event and a direction/distance, then a drag to the right on the speed icon would add an A->B speed; a drag to the left would add a B->A speed. You would probably need to check the length of the drag, to avoid detecting the normal, small errors in mouse control.

Anyway, I'd be surprised if as many as 1 in 1,000 segments worldwide have different speed limits in different directions. So whatever you feel able to for those asking for this, I'm sure they will appreciate it. ;)
[ img ][ img ][ img ]
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 10625
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 2911 times
Been thanked: 8862 times

Re: [Script] WME Speedhelper

Postby iainhouse » Sun Nov 29, 2015 9:07 pm

It would be even better if you could do a conversion based on country and units selected by editor.

I always have my units set to metric, although the UK is imperial. Every time you update this script, I then alter it to multiply the applied speed by 1.6. Except when I forget. :lol:
[ img ][ img ][ img ]
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 10625
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 2911 times
Been thanked: 8862 times

Re: [Script] WME Speedhelper

Postby iainhouse » Mon Nov 30, 2015 12:05 am

gertbroos wrote:
iainhouse wrote:It would be even better if you could do a conversion based on country and units selected by editor.

I always have my units set to metric, although the UK is imperial. Every time you update this script, I then alter it to multiply the applied speed by 1.6. Except when I forget. :lol:


I can take a look to see if it's not too much extra work :)


I managed to make this work by modifying the addsign.onclick function:
Code: Select all
var conversionfactor=1.0;
if ( !Waze.model.isImperial && ABBR.ann[0]=='m') conversionfactor=1.609344;
if ( Waze.model.isImperial && ABBR.ann[0]=='k') conversionfactor=0.621371;
$("input[name=fwdMaxSpeed]").val(allowedspeed*conversionfactor).change();
$("input[name=revMaxSpeed]").val(allowedspeed*conversionfactor).change();

I notice that you have some countries with "kmh" and some with "kph". I'm not sure if that's deliberate, but I got round it by only testing the first character of the value.

I'm also indebted to Glodenox for locating the value for the user's settings. I was looking for that earlier this week, but couldn't find it!

Please note that my professional programming is mostly 20 years behind me and I used so many languages back then, I can never remember the right syntax for anything now! If I've done the above inefficiently or inelegantly, please feel free to laugh publicly at me before improving it. :D
[ img ][ img ][ img ]
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 10625
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 2911 times
Been thanked: 8862 times

Re: [Script] WME Speedhelper

Postby iainhouse » Thu Sep 01, 2016 9:21 pm

kpouer wrote:Hi gertbroos, I noticed a strange problem in Algeria:
the speed are good, but when I click on one speed button, like 120, the value that is filled is 193. Like if the buttons were setting speeds in miles. Il Algeria it's all km/h ;)
thanks

You have your imperial/metric units set wrong. 120mph = 193kph. ;)

Probably (I'm too tired not to be sure it's not the other way round) you have your units set to metric, but the Algeria normal units are MPH.
[ img ][ img ][ img ]
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 10625
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 2911 times
Been thanked: 8862 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: KuniaKid