Get a sneak peek at whats next for Permanent Hazards on our April 7th Office Hours!
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.
Post by FZ69617
New Year's gift to all editors! ;)

WME Route Speeds version 1.2.8 has been released today.

Change log:
  • New: Added "Route type" routing option. Finally. :)
  • New: Added "Try more" alternative routes option. With this experimental option enabled more route alternatives than specified by user will be requested from routing server.
  • Change: Controls' styling.
  • Improvement: Route list sorting.
  • Improvement: Route list selection can now be toggled.
  • Improvement: Better handling of route request errors.
  • Other: Minor code changes.
Hope you will enjoy this new version. :)

Happy New Year to all Wazers! :)
FZ69617
Waze Local Champs
Waze Local Champs
Posts: 933
Has thanked: 36 times
Been thanked: 236 times
Send a message

Post by FZ69617
anthndp wrote:Hi, I just wanted to report that avoid tolls and avoid freeways no longer work in 1.2.8
Thank you for the report - this was my mistake. Sorry for that.
Just FYI, also dirt roads option was affected by this bug in 1.2.8.

New fixed version 1.2.8.1 has been published - please update.
FZ69617
Waze Local Champs
Waze Local Champs
Posts: 933
Has thanked: 36 times
Been thanked: 236 times
Send a message

Post by FZ69617
WME Route Speeds version 1.2.9 has been released.

New features:
  • Centering the map on the A/B markers. Clickable labels of the A/B coordinates entry.
  • Routing options reset to the Livemap Route equivalents.
  • Added experimental "Fastest (no history)" route type option. A routing type found in old client sources, which seems to work still. I presume this requests the routes calculated without taking of the historical data into account - the routes likely similar to the ones calculated by a network disconnected client.
As always, any feedback is welcome. :)
FZ69617
Waze Local Champs
Waze Local Champs
Posts: 933
Has thanked: 36 times
Been thanked: 236 times
Send a message

Post by G_W1Z
tonestertm wrote: Thu Oct 21, 2021 10:40 pm While I'm waiting on approval to release through the official WazeDev release, here's a temporary fork, so it's not delayed any further.

IMPORTANT NOTES:
There are a couple of things still not back up to par:
- Sorting of routes currently defaults to "Use Routing Order": sort by fastest is not currently working, so the checkbox is removed for the moment.  I'll keep working on it as time permits, in case anyone still actually sorts by fastest.
- Centering on the A and B markers with a click is currently non-functional (not sure how long that's been broken, honestly. I have only rarely used it.) This, too, will be pursued as time permits.

and, some updates:

- Coordinates in the A and B location boxes are now LAT,LON, instead of LON,LAT. This should make copy/pasting coordinates less of a chore. 
- The "Try more" option has been removed, because the livemap routing server hasn't actually supported it for a couple of years. 
- Some other small fixes and updates

This is a private GreasyFork link, so you won't be able to search for it in GF. This is only intended to be a temporary fork, and will be removed once the official fork is updated.

Don't forget you will need to disable the official fork in your script handler for this to run properly. (note that it has not yet been tested in Firefox)

Temporary Repair Fork of WME Route Speeds (MapOMatic fork)
 

 
When using this I can see the A and B points but it doesn't show the routes.
 
G_W1Z
State Manager
State Manager
Posts: 1124
Answers: 1
Has thanked: 2022 times
Been thanked: 433 times
Send a message
G_W1Z
Pennsylvania SM | New Jersey LAM | District of Columbia & Maine AM
USA Regions: NOR, MAR, NER
A phoenix out of the ashes...together building a more perfect map.
» Waze Etiquette | PA Wiki | Glossary | Places | Lanes | Shields | JSG | Scripts «
https://storage.googleapis.com/wazeoped ... anager.pnghttps://j.mp/2X2TtcVhttps://www.dropbox.com/s/3o2pi4wjn6w1s ... .jpg?raw=1https://www.dropbox.com/scl/fi/yezyes6g ... 0rem&raw=1

Post by G_W1Z
Webs101 wrote: Thu Mar 16, 2023 6:48 pm The MapOMatic fork is not loading for me in the latest production update.
He is aware. It has to do with the recent WazeWrap changes. An update should be released soon.
G_W1Z
State Manager
State Manager
Posts: 1124
Answers: 1
Has thanked: 2022 times
Been thanked: 433 times
Send a message
G_W1Z
Pennsylvania SM | New Jersey LAM | District of Columbia & Maine AM
USA Regions: NOR, MAR, NER
A phoenix out of the ashes...together building a more perfect map.
» Waze Etiquette | PA Wiki | Glossary | Places | Lanes | Shields | JSG | Scripts «
https://storage.googleapis.com/wazeoped ... anager.pnghttps://j.mp/2X2TtcVhttps://www.dropbox.com/s/3o2pi4wjn6w1s ... .jpg?raw=1https://www.dropbox.com/scl/fi/yezyes6g ... 0rem&raw=1

Post by G_W1Z
Olestas wrote: Sun Oct 15, 2023 5:57 am Script is not working for me.. it appears in settings, but does not do anything.. no errors in console.
It's working for me:
Screenshot 2023-10-15 120754.gif
(1.39 MiB) Downloaded 107 times
G_W1Z
State Manager
State Manager
Posts: 1124
Answers: 1
Has thanked: 2022 times
Been thanked: 433 times
Send a message
G_W1Z
Pennsylvania SM | New Jersey LAM | District of Columbia & Maine AM
USA Regions: NOR, MAR, NER
A phoenix out of the ashes...together building a more perfect map.
» Waze Etiquette | PA Wiki | Glossary | Places | Lanes | Shields | JSG | Scripts «
https://storage.googleapis.com/wazeoped ... anager.pnghttps://j.mp/2X2TtcVhttps://www.dropbox.com/s/3o2pi4wjn6w1s ... .jpg?raw=1https://www.dropbox.com/scl/fi/yezyes6g ... 0rem&raw=1

Post by G_W1Z
Olestas wrote: Wed Oct 18, 2023 10:08 am Well.. at the end it was Disable script tick.. somehow it was on. So yeah.

Thanks for layers script though :}

For what it's worth a new version of the fork was released: viewtopic.php?f=819&t=105839&start=170#p1560939
G_W1Z
State Manager
State Manager
Posts: 1124
Answers: 1
Has thanked: 2022 times
Been thanked: 433 times
Send a message
G_W1Z
Pennsylvania SM | New Jersey LAM | District of Columbia & Maine AM
USA Regions: NOR, MAR, NER
A phoenix out of the ashes...together building a more perfect map.
» Waze Etiquette | PA Wiki | Glossary | Places | Lanes | Shields | JSG | Scripts «
https://storage.googleapis.com/wazeoped ... anager.pnghttps://j.mp/2X2TtcVhttps://www.dropbox.com/s/3o2pi4wjn6w1s ... .jpg?raw=1https://www.dropbox.com/scl/fi/yezyes6g ... 0rem&raw=1

Post by G_W1Z
With only this script running I get this error:
Screenshot 2024-02-26 061724.jpg
(583.94 KiB) Downloaded 85 times
The list of routes does not load either.
G_W1Z
State Manager
State Manager
Posts: 1124
Answers: 1
Has thanked: 2022 times
Been thanked: 433 times
Send a message
G_W1Z
Pennsylvania SM | New Jersey LAM | District of Columbia & Maine AM
USA Regions: NOR, MAR, NER
A phoenix out of the ashes...together building a more perfect map.
» Waze Etiquette | PA Wiki | Glossary | Places | Lanes | Shields | JSG | Scripts «
https://storage.googleapis.com/wazeoped ... anager.pnghttps://j.mp/2X2TtcVhttps://www.dropbox.com/s/3o2pi4wjn6w1s ... .jpg?raw=1https://www.dropbox.com/scl/fi/yezyes6g ... 0rem&raw=1

Post by Glodenox
Ah, cross-origin request issues. Those can be solved by replacing XMLHttpRequest with GM_xmlhttpRequest which doesn't have this restriction for userscripts (GreaseMonkey or TamperMonkey required, can't be done any more directly in Chrome), but from first hand experience I can say that it impacts your script quite a bit.

For example: you'll need to start using unsafeWindow to access the objects on the web page and can't pass it any objects you created in your script unless you use the cloneInto function. Debugging it all also becomes a bit more painful as the different environment of the script puts the logging elsewhere. All in all, I doubt it's worth the hassle for this script. Still it's good to know that at least there's an option to fix it.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
To respond to point 2: it fails in Firefox as you're copying an object from one environment to another. If you want to copy objects over you'll need to use cloneInto for objects and exportFunction for functions.

I've personally learnt a lot from the "Interacting with page scripts" article at MDN. So luckily we don't have to inject our code (which is quite an unsafe practice).

As an example, I have a script in the pipeline that adds certain layers to the editor and adds a tab to manipulate those layers. I only had to change my code slightly.
As I need the Waze objects I obtain them whenever they are available:

Code: Select all

 // @grant GM_xmlhttpRequest (or any other sandbox-inducing method)
function init() {
  if (!unsafeWindow.Waze) {
    setTimeout(init, 400);
    return;
  }
  var Waze = unsafeWindow.Waze;
  // you can now call any function or read any attribute of the Waze object, but will need to clone them into the context of unsafeWindow in case the Waze object will be using them - simple types are excluded from this
}
init();
I'll try to edit in an example of the cloneInto calls I had to do for that script later on (as I don't have it available here).
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png