[Script] Street to River Plus

I am not sure if the script dev is still updating this script but a couple things need updating.

  1. The script still references Waze. which is deprecated and will eventually be removed. (note: script will currently still work without this change since)
    All references should be changed to W.

  2. The following line

if (sel.type == "segment" && sel.state == "Insert") {

needs to be changed to

if (sel.type == "segment" && sel.state == "INSERT") {
  1. When I comment/delete these 3 lines, the temporary red road deletes as expected.

if (newRiver.isGeometryEditable()){ Waze.model.actionManager.add(new UpdateSegmentAddress(newRiver, {countryID: city.countryID, stateID: city.stateID, emptyCity: true, emptyStreet: true})); }

// if (newRiver.isGeometryEditable()){ // Waze.model.actionManager.add(new UpdateSegmentAddress(newRiver, {countryID: city.countryID, stateID: city.stateID, emptyCity: true, emptyStreet: true})); // }

Thanks John! Works great!

I am not able to duplicate either. I have tested with (shown in GIF) and without my above fix (excluding the “INSERT” change)

What line numbers ? Thanks

Try around line 394-396

Thanks

This fixed the script for me too, thanks :sunglasses:

Hi. I have just installed this script and attempting to add a river by following the instructions on the first post. However I keep getting the attached error message. Anyone else getting this?
Screenshot 2021-11-01 084453.png

MODERATOR NOTE: places screenshot inline to allow it to show.

Did you draw a new segment and leave it unnamed and selected?

Hi John,

Thanks for your prompt response. Yes I drew a new street segment and left it unnamed and selected. I also attempted as other options to also put the width and name in, but I also get the same error.

Thanksscrnli_03_11_2021_14-54-13.gif

Try this one:
https://www.waze.com/forum/viewtopic.php?p=2103845#p2103845

Excellent that one worked for me. Thanks for this

Hi, I haven’t used this script for a while. I reactivated it but it doesn’t work, and I can’t find any updates.
Can you give me some information on this?
Thank you

Well I use this version but I needed to do the fix in picture and it has worked as expected after that.SRP.PNG

Thanks, now it works

Adding myself to the list of users having trouble.

I have 16.07.25 installed.

When I attempt to create a new river or extend an existing one, I get a pop up error: “No unsaved and selected new street found!”

I’ve used this script extensively and am confident I am using it correctly… draw a new segment and activate the script on it immediately before it is saved, etc…

Have you made the modification to script as mentioned in few comments earlier? Quite simple fix that has worked for me and others.

I had not looked that close, sorry and thank you. Just saw others struggling and checked that I had the latest version. My bad for not looking closer. Hopefully the script author can make this fix to the source soon. I’ll go edit the script…

=====
if you have problem with original script, try to use this fork:

updated 21-11-2022