[Script] WME HN NavPoints

Works for me. :smiley:

Hi! I’m getting the erro below here: https://www.waze.com/editor?env=row&lon=-1.40545&lat=42.84568&zoom=6

Uncaught TypeError: Cannot read property 'attributes' of undefined at drawHNLines (userscript.html?id=afc24a0a-a1e6-49f9-aeab-9364f222c6e4:208) at initialize.requestHNs (userscript.html?id=afc24a0a-a1e6-49f9-aeab-9364f222c6e4:144) at initialize.triggerEvent (vendor-3772879e64537e85ca8c.js:1) at initialize.e.onLoadEnd (vendor-3772879e64537e85ca8c.js:1) at initialize.triggerEvent (vendor-3772879e64537e85ca8c.js:1) at initialize.onImageLoad (vendor-3772879e64537e85ca8c.js:1) at HTMLImageElement.<anonymous> (vendor-3772879e64537e85ca8c.js:1)

Permalink shows the land completely without HNs…?

I have also received similar issue few weeks ago, but cannot able to reproduce it.
Do you know the exact steps to the error?

Might be because of the roads there has no direction.

I fixed your plugin with this code

function drawHNLines(type, segment) { HNNavPointsLayer.removeFeatures(HNNavPointsLayer.getFeaturesByAttribute("segmentId", segment.id)); for (var j = 0; j < segment.numbers.length; j++) { let seg = W.model.segments.objects[segment.id]; if (seg) drawHNLine(type, seg.attributes.primaryStreetID, segment.id, segment.numbers[j]); } }

I love this. Already solved several URs easily with it. Thanks so much!

OK, pushed. Thanks!

Hmm, interesting. Can it show numbers itself without opening HN mode?

I have never thought about this until now :wink:

But yes, in general it is possible.

Can you do it, please? With separate checkbox of course.

Yes, if you add that please make it an option so we can turn it off. I can see that it will completely take over the screen in some areas

Ok, christmas holiday should give me the time to do it :wink:

After the WME (prod) this morning, your script causes WME to need to be rebooted after every save. I turned all scripts off, went through one by one. Yours is the only one that causes the issue. I have all scripts but yours back on and no issue.

I really like your script, so I hope it’s an easy fix :).

Sean

It will be not so easy. I will look further onto it.

But I have found very helpful message in my inbox from Joyriding, so you can install new version 0.5.5 already now!

Great! Thank you!

Sean

Thanks for the update.

This is still throwing an error when in house number edit mode and you click into a house number

userscript.html?id=aced2ede-b3e2-4d26-a06b-2825b4d2fc2b:258 Uncaught TypeError: Cannot read property 'id' of undefined at initialize.eval (userscript.html?id=aced2ede-b3e2-4d26-a06b-2825b4d2fc2b:258) at initialize.triggerEvent (vendor-35832ee1066e825bf6f6.js:1) at HTMLDivElement.<anonymous> (app-73b6cfea0e16cdbb4cb8.js:1) at HTMLDivElement.dispatch (vendor-35832ee1066e825bf6f6.js:1) at HTMLDivElement.f.handle (vendor-35832ee1066e825bf6f6.js:1)

It is failing on this line

var HNtoRemove = W.model.segments.objects[marker.model.parent.id].attributes.primaryStreetID + "|" + marker.model.number + "|" + marker.model.id;

Because parent on marker.model does not exist.

Thanks, it is fixed.

I know this is a layer that can be enabled/disabled, but if this is going to supersede HN Tool I think it might be nice for the tool to be active when in HN mode even if the layer is turned off.

Just wanted to say this script is awesome. :wink:

Please edit the first post with this information so it is not lost in the thread. Thanks!