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 wasd42
Good day everyone! Didn't know that my script is still in use :) Thanks!

I've updated the script to support new editor version.
wasd42
Area Manager
Area Manager
Posts: 37
Has thanked: 13 times
Been thanked: 47 times
Send a message

Post by wasd42
Updated script to v.0.9:
- NEW (requested by Griev0us): Landmark simplification using OpenLayers build-in simplify method for polygons. You can tune the algorithm by setting "Simplify landmark" parameter on MagicWand settings tab.
wasd42
Area Manager
Area Manager
Posts: 37
Has thanked: 13 times
Been thanked: 47 times
Send a message

Post by wasd42
AlanOfTheBerg wrote:In Chrome/Win7 Tampermonkey, once the Magic Wand creates a landmark, there are no geometry handles so I cannot change the shape.

EDIT: I found that when the "resize landmark" option is checked, the geometry nodes disappear. And now I re-read the notes that found this is a known situation. Why is it this way?
This is how it works in OpenLayer JS Library, the library Waze Editor is based on - it's either resize or reshape :/
wasd42
Area Manager
Area Manager
Posts: 37
Has thanked: 13 times
Been thanked: 47 times
Send a message

Post by wasd42
Olestas wrote:Bug
When place selected, there are two same settings :D
Enable resize - Enable resize.
One of them should be enable rotate.]
Thanks, will fix shortly!
wasd42
Area Manager
Area Manager
Posts: 37
Has thanked: 13 times
Been thanked: 47 times
Send a message

Post by wasd42
foxitrot wrote:Will this ever be shortly fixed? ;) (Just one string, on line 232, under "var insertLandmarkSelectedButtons = function(e) ...")
Hey! Sorry for a huge delay but I've started a new feature back then and couldn't just update that button :)

Happy to say that WME MagicWand has been updated to support newest Editor version plus I've introduced a new Highlight mode: set "Enable Highlight" option ON to highlight those landmarks that need to be orthogonalized.

Thanks everyone for your feedback!
wasd42
Area Manager
Area Manager
Posts: 37
Has thanked: 13 times
Been thanked: 47 times
Send a message

Post by wasd42
Olestas wrote:Can you add highlight for places that are smaller than manually entered area?
What is "manually entered area"?
wasd42
Area Manager
Area Manager
Posts: 37
Has thanked: 13 times
Been thanked: 47 times
Send a message

Post by wasd42
Hello, everyone!

Thank you for making me aware of the problem, but I cannot find a solution for ModifyFeature control issue. Previously, I used Waze.map.getControlsByClass(/.*geometryediting.*/i) to find a ModifyFeature control, but now it is gone and there are no obvious (and not-so-obvious) replacement in place.

Any ideas where to find it? :)
wasd42
Area Manager
Area Manager
Posts: 37
Has thanked: 13 times
Been thanked: 47 times
Send a message

Post by wasd42
Hey, everyone!
Sorry for the long response! I've fixed the script (rotate, resize options) AND finally introduced a proper concave hull algorithm, which means that now landmarks of any complex layout can be created automatically! Thanks, Andrii Heonia (http://stackoverflow.com/users/2561331/andriiheonia) for help!

Error "Cannot create landmark, need at least 3 points to create polygon" means that the script was unable to find enough pixels of the similar colour where you clicked to build a concave hull. Please, try some other point nearby. Also, it happens that the server stops responding to tiles request for some reason, so try to refresh the page.
wasd42
Area Manager
Area Manager
Posts: 37
Has thanked: 13 times
Been thanked: 47 times
Send a message
Last edited by wasd42 on Mon Mar 20, 2017 2:05 pm, edited 1 time in total.

Post by wasd42
Iridium1 wrote: - For me I always get the "Please, try again, no useful points found" status when trying to pick a color.
- I cannot "toggle" back to the green status when clicking on the (activated) red button - only a reload of the page helps.?
You are most welcome! :)

Both issues seem to be connected. As you are using Chrome, would you open the Developer Console (Options -> More tools -> Developer Tools), reload the Editor page, try to use Magic Wand and take a look whether any errors will appear in the console, please?
wasd42
Area Manager
Area Manager
Posts: 37
Has thanked: 13 times
Been thanked: 47 times
Send a message

Post by wasd42
Thanks, Iridium1! The bug should be fixed now, please update to version 2.0.2.
wasd42
Area Manager
Area Manager
Posts: 37
Has thanked: 13 times
Been thanked: 47 times
Send a message