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.
Post by Timbones
Actually, the highlights stay when the road layer is turned off, as it's only the images that disappear. You can still select and edit the segments...
Timbones
Coordinators
Coordinators
Posts: 7358
Answers: 2
Has thanked: 954 times
Been thanked: 2916 times
Send a message
Timbones(6) • UK Coordinator • Forum Moderator • Closure Monitor
Scripts: WME Colour HighlightsWME Route TesterWME Geometries

Post by tonestertm
AdreNalinGuY wrote:How is the work going folks? Anything ready for beta testing or not? :D
There's a (mostly) unwritten rule in Developer forums that the best way to ask about progress is to not. :)

Sometimes it is considered acceptable to post something like, "Really looking forward to this" or some such. Remember, this is all volunteer labor. ;)
tonestertm
US Waze Champs
US Waze Champs
Posts: 1441
Has thanked: 441 times
Been thanked: 836 times
Send a message

Post by turnertr
I don’t believe GIS-L is really the place to do FC highlighting. That would be more for street names but not functional classification.
turnertr
US Waze Champs
US Waze Champs
Posts: 136
Has thanked: 18 times
Been thanked: 23 times
Send a message

Post by voludu2
I just installed this in Chrome, started a new Chrome window -- and don't see any sort of Highlights tab.
What have I done wrong?

I did try installing Timbones' color highlighter. That seems to work just fine. Then I disabled it and re-enabled the FC highlighter -- nothing.

It seems like a very good idea, and I'd like to help with the testing.
voludu2
Posts: 3098
Has thanked: 559 times
Been thanked: 863 times
Send a message

Post by voludu2
Source of problem:
Uncaught TypeError: Property 'onclick' of object #<HTMLParagraphElement> is not a function script.js:43

fix:
find
dummyElem.setAttribute('onclick', 'return window');
and replace with
dummyElem.onclick= function(){return window;};
Dell 32-bit
Windows 7 Home
Chrome Version 33.0.1750.146
voludu2
Posts: 3098
Has thanked: 559 times
Been thanked: 863 times
Send a message

Post by voludu2
Uncaught ReferenceError: Waze is not defined
Waze.map.events.register("zoomend", null, FChighlightSegments);
To fix this, find
// register some events...
Waze.map.events.register("zoomend", null, FChighlightSegments);
And add before that
Waze = unsafeWindow.Waze;
In the Color Highlighter, this is handled in a function, with a little care to make sure that Waze is a global.

And, yes
Colour Highlights is working for you with dummyElem.setAttribute('onclick', 'return window');
I don't know why it works in one script and not in the other. Something else must be different between them, but I don't know what it is.
voludu2
Posts: 3098
Has thanked: 559 times
Been thanked: 863 times
Send a message

Post by voludu2
Actually, I thought about this and realized I was going about it all wrong.

I took another approach that made your script work perfectly.

* I started with the bootstrap.user.js file that the original used, and modified it to call your FC Highlights file.
* I also used the manifest.json file to specify the resources used (it won't load them if they aren't in the manifest). I removed any lines I could not understand from that file, including the key.

This seems to work perfectly. None of those silly errors with Waze or W not being defined.

I attached a zip of the directory
MyExtension12345.zip
(67.59 KiB) Downloaded 185 times
voludu2
Posts: 3098
Has thanked: 559 times
Been thanked: 863 times
Send a message

Post by voludu2
I am finding this quite useful. Thanks!

Would it be possible to include a checkbox or button to temporarily turn it off while investigating something else nearby? Sometimes FC hightlighter, Color Highlighter, and toolbox all want to highlight the same segment(s), and it is useful to see just one at a time, without refreshing the whole browser.

Thanks again for a useful extension.
voludu2
Posts: 3098
Has thanked: 559 times
Been thanked: 863 times
Send a message

Post by voludu2
Cleaning my glasses again....
so many interfaces. so little brainpower.

Thanks
voludu2
Posts: 3098
Has thanked: 559 times
Been thanked: 863 times
Send a message