Hello,
I was faced to the same problems and I found a solution for it.
Thanks to vtnerd91 who show me the way to “Waze/Action/UpdateFeatureAddress” here
And I do the same thing for “Waze/Action/AddAlternateStreet”.
In fact, there is no need to use “addorgetcity” and “addorgetstreet”.
All is included in the new functions
[code]var WazeActionAddAlternateStreet = require(“Waze/Action/AddAlternateStreet”);
var WazeActionUpdateFeatureAddress = require(“Waze/Action/UpdateFeatureAddress”);
function add_Alternative_Street (sel, country_ID, state_ID,city_Name, street_Name) {
var attr = {
countryID: country_ID,
stateID: state_ID,
cityName: city_Name,
emptyCity: (city_Name==‘’),
streetName: street_Name,
emptyStreet: (street_Name==‘’)
};
return new WazeActionAddAlternateStreet(sel, attr,{ streetIDField: “streetIDs”});
}
W.model.actionManager.add (add_Alternative_Street(sel,city.attributes.countryID,city.attributes.stateID,cityName,streetName));
function changeStreetAdress (sel, country_ID, state_ID,city_Name, street_Name) {
var attr = {
countryID: country_ID,
stateID: state_ID,
cityName: city_Name,
emptyCity: (city_Name==‘’),
streetName: street_Name,
emptyStreet: (street_Name==‘’)
};
return new WazeActionUpdateFeatureAddress(sel, attr,{ streetIDField: “primaryStreetID”});
}
W.model.actionManager.add(changeStreetAdress (sel, city.attributes.countryID, city.attributes.stateID,city.attributes.name, newName));[/code]