I’ve been using the “WME Add Uturns from node” script quite a while, but now it has stopped working. I get the following error: “Cannot find module ‘./Waze/Action/ModifyConnection.js’”.
It seems like the ModifyConnection module has been replaced in the API? Does anyone know how to fix this code? From what I can see the problems are here:
var wazeActionModifyConnection= require("Waze/Action/ModifyConnection") //module does not exist any more.
var node = Waze.selectionManager.selectedItems[0].model;
var segIDs = node.attributes.segIDs;
for (var i = 0; i < segIDs.length; i++) {
var segment = Waze.model.segments.objects[segIDs[i]];
if (segment.attributes.fromNodeID == node.attributes.id) {
console.log('А', segment.attributes.id);
segment.attributes.fromConnections[segment.attributes.id] = true; //fromConnections is not a property of attributes any longer
Waze.model.actionManager.add(new wazeActionModifyConnection(segment.attributes.id, segment.getFromNode(), segment.attributes.id,segment.getFromNode()));