Update from staff for script writers

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.

Update from staff for script writers

Postby karlcr9911 » Tue Nov 22, 2016 4:50 pm

An update from staff regarding scripts:

OP (only viewable if you have access to WME Beta Testing forum): https://www.waze.com/forum/viewtopic.ph ... 9#p1541409

delilush wrote:Hi Everyone,

A few updates:

*Confidential section removed*

'Connection Refactor' release:
Our WME dev team has lately been working on a significant upgrade to improve our ability to develop different features that rely on turn data. This upgrade will be rolled out in the coming beta. It is not visible in the interface but may have different implications that we want you to be aware of:
Once the beta is released, we will ask you to pay extra attention to edits involving segments' splits, merge, turns, disconnection of segments and TBRs. We've run an internal sanity check and don't expect any special issue. However, if you see any weird behaviour - please let us know. (I will repeat this in the beta release post as well).

Scripts:
I understand that this issue is extremely frustrating and wanted to say a few words about it. Some are general comments, and some specific info that will hopefully make the solution for broken scripts easier.
Generally, as you probably know, it is very complicated to support scripts written externally.
The WME code was not designed as a public API. Although we don't obfuscate the code, we cannot commit that ongoing work on different features will not damage externally written scripts.
However, although we don't currently have the dev resources required to open an API and maintain it, we definitely want to find a way to help our script writers in preserving important scripts.
Here are a few solutions we came up with, together with our devs:
  • The beta is a great opportunity for the community to detect issues with scripts and report them before they go to production. We will work with the dev team and do our best to fix the problem before releasing a version to a wide base of editors.
    However, I do want to highlight that it is important that you check your scripts and report issues as part of the beta testing. After the beta release, if you notice that scripts are broken send us the details of where the error occurs.
  • If the devs are aware of a potential "script breaker" for an upcoming beta version, we will let you know about those changes together with the release. That being said, not in every case can we predict where scripts might break.

As tomorrow's beta includes the Connection Refactor, a major code change, we expect scripts to be affected. Here is some info that can be helpful for script writers to adapt their scripts. (if you don't write code, you can stop reading here ;) ):
  • connections are no longer stored on segments (fwdConnections and revConnections attributes do not longer exist on the segment object).
  • Turn TBRs are also no longer stored on the segments (fwdRestrictions and revRestrictions attributes do not longer exist on the segment object)
  • All connection data (turns, TBRs and instruction override) is now stored in a new object called TurnGraph, which can be accessed by calling
    Code: Select all
    W.model.getTurnGraph()
  • For example: To get the turn from segment 1 (forward direction) to segment 2 (reverse direction) you need to call the following.
    Code: Select all
    W.model.getTurnGraph().getTurn(Vertex.forwardOf(1),Vertex.reverseOf(2))
    The Vertex object can be accessed using require("Waze/Model/Graph/Vertex")

Please let us know if you have any questions.
Thanks,
Daliah
Regional Coordinator - U.S. South Central
iOS Beta Leader / Alpha Tester | WME Beta Tester
[ img ][ img ][ img ][ img ][ img ][ img ]
SCR Wazeopedia
karlcr9911
Global Champ Mentor
Global Champ Mentor
 
Posts: 2390
Joined: Fri Aug 23, 2013 2:05 am
Location: North East Texas, USA
Has thanked: 564 times
Been thanked: 1529 times

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: RichardPyne, robindlc